$\sin(A)$, where $A$ is a matrix

Yes, $e^A$ always converges for a square matrix $A.$ In practice, $e^A$ is found by writing the Jordan normal form of $A,$ let us call it $J,$ with a basis of characteristic vectors for $A$ written as the columns of another matrix, call it $P.$ Then we have $$ J = P^{-1} A \; P.$$ It is possible that $J$ is diagonal, and this is guaranteed if the eigenvalues of $A$ are distinct. Otherwise, there are a few 1's in the diagonal immediately above the main diagonal of $J.$

Oh, before I forget, $$ \sin x = \frac{e^{ix}- e^{-ix}}{2 i}$$ and the same formula gives you $\sin A.$

Meanwhile, it is not difficult to find $e^J$ as $J$ is diagonal or, at least, in Jordan form, and the matrix with only the diagonal elements of $J$ commutes with the matrix that has only the off-diagonal elements of $J.$ Then, finally, we use the identity $$ e^A = e^{P J P^{-1}} = P \; e^J P^{-1}$$ which follows easily from formal properties of the defining power series.

EDIT: the fundamental fact of life is that, IF $A,B$ commute, then $e^{A+B} = e^A e^B = e^B e^A.$ If $A,B$ do not commute there is no assurance. Meanwhile, for the identity matrix $I$ and a real or complex number $z,$ we do get $e^{zI} = e^z I.$ Put that together, you get $e^{A + 2 \pi i I} = e^A.$ Also, $e^{0I} = I,$ and $e^{-A} = \left( e^A \right)^{-1}.$


First, there is no nice direct formula for the entries of the matrix exponential. It gets quite complicated to compute for non-diagonalizable matrices.

Pick your favorite analytic function: $f(x) = \sum\limits_{j=0}^\infty a_jx^j$. Let $A$ be an $n \times n$ matrix and let $\|A\|=\sqrt {\sum\limits_{1 \leq i,j \leq n} |a_{ij}|^2}$.

It's not hard to show that $\|A^j\| \leq \|A\|^j$. Thus $\|\sum_{j=0}^k a_jA^j\| \leq \sum_{j=0}^k |a_j|\|A\|^j$ and so if $f(\|A\|) =\sum\limits_{j=0}^\infty a_j\|A\|^j$ is absolutely convergent, then the series for $f(A)=\sum\limits_{j=0}^\infty a_jA^j$ is convergent.

Now we know that the series for $\sin$, $\cos$, $\exp$ are absolutely convergent everywhere, so $\sin(A)$, $\cos(A)$, $e^A$ are defined for all square matrices.

If you only deal with diagonalizable matrices, then life is much simpler. Suppose $P^{-1}AP=D=\mathrm{diag}(\lambda_1,\dots,\lambda_n)$. The given (any) function $f(x)$, you can define $$f(D) = \begin{pmatrix} f(\lambda_1) & 0 & \cdots & 0 \\ 0 & f(\lambda_2) & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & f(\lambda_n) \end{pmatrix}$$ Then define $f(A)=Pf(D)P^{-1}$.

For diagonalizable matrices this definition gives the same results as the series definition for sin, cos, and exp. But it also allows you to define $\sqrt{A}$ (when all eigenvalues are non-negative) and many other such matrix functions.

$\sin^2(A)+\cos^2(A)=I_n$ for diagonalizable matrices. I also think it holds in general, but I can't think of a proof right now.

Functions of matrices are quite important. The matrix exponential appears all over mathematics. It connects Lie algebras and Lie groups. I'm not aware of any obvious uses or geometric interpretation for matrix sine and cosine. I have seen the square root of a matrix appear several times in the context of numerical linear algebra.


To extend Bill's answer: as I mentioned here, one can use the Jordan decomposition instead of the eigendecomposition when computing the sine of a matrix (or a cosine, or any matrix function, really). One thus needs a method for computing the sine for scalars and Jordan blocks; for the Jordan block

$$\mathbf J=\begin{pmatrix}\lambda&1&&\\&\lambda&\ddots&\\&&\ddots&1\\&&&\lambda\end{pmatrix}$$

with (algebraic) multiplicity $k$ (i.e., $\mathbf J$ is a $k\times k$ matrix), the applicable formula is

$$f(\mathbf J)=\begin{pmatrix}f(\lambda)&f^\prime(\lambda)&\cdots&\frac{f^{(k-1)}(\lambda)}{(k-1)!}\\&f(\lambda)&\ddots&\vdots\\&&\ddots&f^\prime(\lambda)\\&&&f(\lambda)\end{pmatrix}$$

(see here for a proof). Since we have the neat chain of derivatives

$$\sin^{(p)}(x)=\begin{cases}\sin\,x&\text{if }p\bmod 4=0\\\cos\,x&\text{if }p\bmod 4=1\\-\sin\,x&\text{if }p\bmod 4=2\\-\cos\,x&\text{if }p\bmod 4=3\end{cases}$$

or more simply, $\sin^{(p)}(x)=\sin\left(x+p\frac{\pi}{2}\right)$, it is quite easy to compute the sine of a Jordan block.


In inexact arithmetic, the Jordan decomposition is exceedingly difficult to compute stably. One has to employ different methods in this case. One way is to replace the Jordan decomposition with a Schur decomposition; there is a method due to Beresford Parlett for computing matrix functions for general triangular matrices, but I won't discuss that further, and instead concentrate on a different evaluation method. The key is that the sine and cosine satisfy a neat duplication formula:

$$\begin{align*}\sin\,2x&=2\sin\,x\cos\,x\\\cos\,2x&=2\cos^2 x-1\end{align*}$$

Thus, just as in the scalar case, one can employ argument reduction: halve the matrix a sufficient number of times until its norm is tiny (and remember the number of times $m$ this halving was done), evaluate some good approximation for sine and cosine at that transformed matrix (either truncated Maclaurin series or Padé does nicely, with a slight edge for Padé approximants), and finally apply the two duplication formulae in tandem $m$ times to arrive at the sine and cosine of the starting matrix. This has more details.


Nick Higham discusses quite a lot on these methods in his book; see that chapter I linked to and the references therein.