Cosine of a matrix I came across this question, asked in a competitive exam. It  is as follows.

Given a matrix $M = \begin{bmatrix}2&1\\1&2\end{bmatrix}$ what is the value of $cos(πM/6)$?

I've tried series expansion but I think there is an alternative way doing it, any help is appreciated. 
Options given are
\begin{bmatrix}1/2&1\\1&1/2\end{bmatrix} \begin{bmatrix}\sqrt3/4&-\sqrt3/4\\-\sqrt3/4&\sqrt3/4\end{bmatrix} \begin{bmatrix}\sqrt3/4&\sqrt3/4\\\sqrt3/4&\sqrt3/4\end{bmatrix} \begin{bmatrix}1/2&\sqrt3/2\\\sqrt3/2&1/2\end{bmatrix} 
 A: Several Methods spring to mind. The first is particular to this problem, the other two are less interesting but more general and the ones to always consider in cases such as these:

Look at Underlying Algebraic Structure (Interestingest Method!)
You are dealing with a matrix representation of the split complex number (aka hyperbolic nunber) $2 + j$ where $j=\left(\begin{array}{cc}0&1\\1&0\end{array}\right)$ and $j^2=1$.  Entities of the form $a + b\,j$ for $a,\,b\in\mathbb{R}$ all commute, and form an algebra over the reals, but, unlike the complex numbers, they are not a field because there are divisors of zero ($z\,z^* = 0$ for $z=x\pm j\,x;\,x\in\mathbb{R}$) and so not everyone has an inverse. (Another way of looking at this appealing to a physicist is that the pseudonorm $|z| = \sqrt{z\,z^*}$ is not positive definite and is nought for "lightlike" SCNs of the form $x\pm j\,x$. Split complex numbers represent boosts.)
So, then, given the algebra is commutative, any trigonometric identity that can be proven for $\mathbb{R}$ or $\mathbb{C}$ using multiplication only of the universally convergent cosine and sine series must also hold for the split complex numbers since the multiplication of terms works in exactly the same way. The one thing we cannot do the same is division, because the SCNs may not have inverses as we have seen above whereas all nonzero reals and complexes do.
So, in particular, the identity $\cos(u+v) = \cos u\,\cos v - \sin u \,\sin v$ must hold for any split-complex $u,\,v$ because in principle this can be proven by multiplying out the universally convergent Taylor series on either side. Furthermore, for $a,\,b\in\mathbb{R}$:
$$\cos(j\,\phi)=1-j^2\,\frac{\phi^2}{2!}+j^4\,\frac{\phi^4}{4!}-\cdots=\cos\phi$$
$$\sin(j\,\phi) = j\,\sin\phi$$
whence:
$$\cos(a+j\,b) = \cos a\,\cos b-j\,\sin a\,\sin b = \left(
\begin{array}{cc}
 \cos (a) \cos (b) & -\sin (a) \sin (b) \\
 -\sin (a) \sin (b) & \cos (a) \cos (b) \\
\end{array}
\right)$$
which will get you all your needed answers.
Applying Matrix Function to the Spectrum
In this case, the Jordan normal form fully diagonalizes the matrix, so calculating the cosine power series as $\cos(\alpha\,M) = P\,\mathrm{diag}(\cos(\alpha,\,\lambda_1),\,\cos(\alpha\,\lambda_2))\,P^{-1}$ is straightforward, where $P$ is the matrix of eigenvectors and $\lambda_j$ the eigenvalues. The diagonalization is:
$$\left(\begin{array}{cc}a&b\\b&a\end{array}\right) = \frac{1}{2}\,\left(\begin{array}{cc}-1&1\\1&1\end{array}\right)\,\left(\begin{array}{cc}a-b&0\\0&a+b\end{array}\right)\,\left(\begin{array}{cc}-1&1\\1&1\end{array}\right)$$
(the orthonormal matrix of eigenvectors:
$$\frac{1}{\sqrt{2}}\,\left(\begin{array}{cc}-1&1\\1&1\end{array}\right)$$
is self inverse).
Thus you can readily show:
$$\cos\left(\begin{array}{cc}a&b\\b&a\end{array}\right) = \left(
\begin{array}{cc}
 \cos (a) \cos (b) & -\sin (a) \sin (b) \\
 -\sin (a) \sin (b) & \cos (a) \cos (b) \\
\end{array}
\right)$$
as we had before.

Power Series Directly
Another method to consider is to apply the Cayley-Hamilton theorem to simplify the power series directly. That is, using the relationship afforded by the Cayley-Hamilton theorem, a convergence Taylor series can always be reduced to a sum of matrix powers less than the dimension of the matrix.
Whence, for the $2\times 2$ matrix $M$ we always have:
$$M^2 - \mathrm{tr} (M)\, M + \det(M)\mathrm{id} = 0$$
So that you can in principle write a recurrence relationship for the co-efficients $M^{2\,n} = u_n\,\mathrm{id} + v_n\,M$ for the powers $M^{2\,n}$ for $n = 1,\,2\,\cdots$ present in the cosine series. This method works particularly well for traceless matrices (e.g. for exponentiating a traceless complex matrix to a member of $\mathrm{SL}(2,\,\mathbb{C})$, but is a little more awkward here. In principle, this method will get you the same answer, but it's messy.
A: $$M=A+B$$
where
$$A=2I$$
and
$$B=\left(\begin{array}{cc}0&1\\1&0\end{array}\right)$$
We have
$$[A,B]=0$$
and
$$B^2=I$$
So
$$\exp\left(i\frac{\pi}{6}M\right)=\exp\left(i\frac{\pi}{6}2I\right)\exp\left(i\frac{\pi}{6}B\right)$$
$$=\exp\left(i\frac{\pi}{3}I\right)\left(I+i\frac{\pi}{6}B+\cdots\right)$$
$$=\exp\left(i\frac{\pi}{3}\right)I\left(I\cos(\pi/6)+iB\sin(\pi/6)\right)$$
$$=\exp(i\pi/3)\cos(\pi/6)I+i\exp(i\pi/3)\sin(\pi/6)B$$
$$=\left(\frac{\sqrt{3}}{4}+i\frac{1}{4}\right)I+\left(\frac{1}{4}i-\frac{\sqrt{3}}{4}\right)B$$
Similary
$$\exp\left(-i\frac{\pi}{6}M\right)=\left(\frac{\sqrt{3}}{4}-i\frac{1}{4}\right)I+\left(-\frac{1}{4}i-\frac{\sqrt{3}}{4}\right)B$$
Hence
$$\cos\left(i\frac{\pi}{6}M\right)=\frac{\sqrt{3}}{4}(I-B)$$
$$=\left(\begin{array}{cc}\frac{\sqrt{3}}{4}&-\frac{\sqrt{3}}{4}\\-\frac{\sqrt{3}}{4}&\frac{\sqrt{3}}{4}\end{array}\right)$$
A: Corrected answer (02/16/2018):
One of the eigenvalues of $M$ is 3, and the relevant eigenvector is $\begin{pmatrix}
1\\
1
\end{pmatrix}$, the relevant eigenvalue of $\cos(\pi M/6)$ is 0, so you know the determinant of $\cos(\pi M/6)$, and $\cos(\pi M/6)$ multiplied by $\begin{pmatrix}
1\\
1
\end{pmatrix}$ from the right  is 0, so you know which of the options is the right one. 
