<s>[INST] Finding a formula of a power of a matrix Part of a solution I came across of calculating the following matrix:
$$\begin{pmatrix}\frac{\sqrt{2}}{2} & -\frac{\sqrt{2}}{2}\\
\frac{\sqrt{2}}{2} & \frac{\sqrt{2}}{2}
\end{pmatrix}^n$$
I'm trying to find a formula for this matrix so I can prove it using induction. I tried to calculate $M^2,M^3,M^4$ but I can seem to see the pattern. How should I approach this issue?  
 [/INST] Idea
$$
\\\begin{pmatrix}\frac{\sqrt{2}}{2} & -\frac{\sqrt{2}}{2}\\
\frac{\sqrt{2}}{2} & \frac{\sqrt{2}}{2}
\end{pmatrix}=\begin{pmatrix}1 & -1\\
1 & 1
\end{pmatrix}\cdot\frac{\sqrt{2}}{2}
\\\begin{pmatrix}1 & -1\\
1 & 1
\end{pmatrix}^n\cdot\Big(\frac{1}{\sqrt{2}}\Big)^n=\begin{pmatrix}-i & i\\
1 & 1
\end{pmatrix}\cdot\begin{pmatrix}(1-i)^n & 0\\
0 & (1+i)^n
\end{pmatrix}\cdot\begin{pmatrix}-i & i\\
1 & 1
\end{pmatrix}^{-1}\cdot\frac{1}{2^{\frac n 2}}
$$
</s>