<s>[INST] N-th power of a matrix I have to find the n-th power for the following matrix $$A=\begin{pmatrix} 1+\sqrt3 & 1-\sqrt3\\ \sqrt3 - 1 & \sqrt3 +1\end{pmatrix}
$$ My thoughts is that here could be the same situation as for $B=\begin{pmatrix} \sin x & - \cos x\\ \cos x & \sin x\end{pmatrix}
$ which give  $$B^n=\begin{pmatrix} \sin (nx) & - \cos (nx) \\ \cos (nx) & \sin (nx) \end{pmatrix}.
$$ So I think I have to make a connection between A and B, however in A I dont have only $1$ term per place so I dont know how to proceed. $$\frac12 A=\begin{pmatrix} \sin(\pi /6) +\cos(\pi /6) &\sin(\pi /6) - \cos(\pi /6)   \\ \cos(\pi /6) - \sin(\pi /6)   &\sin(\pi /6) +\cos(\pi /6)   \end{pmatrix}
$$ Couls you help me? 
 [/INST] As can be easily verified 
$$
\left(\begin{array}{cc}
a & -b\\
b & a
\end{array}\right)=\left(\begin{array}{cc}
\sin\theta & -\cos\theta\\
\cos\theta & \sin\theta
\end{array}\right)\left(\begin{array}{cc}
b\cos\theta+a\sin\theta & a\cos\theta-b\sin\theta\\
-a\cos\theta+b\sin\theta & b\cos\theta+a\sin\theta
\end{array}\right)
$$
but
$$
b\cos\theta+a\sin\theta=\sqrt{a^{2}+b^{2}}\left(\frac{b}{\sqrt{a^{2}+b^{2}}}\cos\theta+\frac{a}{\sqrt{a^{2}+b^{2}}}\sin\theta\right)=\rho\cos\left(\theta_{0}-\theta\right)
$$
and then
$$
\left(\begin{array}{cc}
b\cos\theta+a\sin\theta & a\cos\theta-b\sin\theta\\
-a\cos\theta+b\sin\theta & b\cos\theta+a\sin\theta
\end{array}\right)=\rho\left(\begin{array}{cc}
\cos\left(\theta_{0}-\theta\right) & \sin\left(\theta_{0}-\theta\right)\\
-\sin\left(\theta_{0}-\theta\right) & \cos\left(\theta_{0}-\theta\right)
\end{array}\right)
$$
so
$$
\left(\begin{array}{cc}
a & -b\\
b & a
\end{array}\right)=\rho\left(\begin{array}{cc}
\sin\theta & -\cos\theta\\
\cos\theta & \sin\theta
\end{array}\right)\left(\begin{array}{cc}
\cos\left(\theta_{0}-\theta\right) & \sin\left(\theta_{0}-\theta\right)\\
-\sin\left(\theta_{0}-\theta\right) & \cos\left(\theta_{0}-\theta\right)
\end{array}\right)=\rho\left(\begin{array}{cc}
\sin\theta_{0} & -\cos\theta_{0}\\
\cos\theta_{0} & \sin\theta_{0}
\end{array}\right)
$$
hence
$$
\left(\begin{array}{cc}
a & -b\\
b & a
\end{array}\right)^{n}=\rho^{n}\left(\begin{array}{cc}
\sin\left(n\theta_{0}\right) & -\cos\left(n\theta_{0}\right)\\
\cos\left(n\theta_{0}\right) & \sin\left(n\theta_{0}\right)
\end{array}\right)
$$
with
$$
\theta_0 = \arctan\left(\frac ab\right)\\
\rho = \sqrt{a^2+b^2}
$$
</s>