Exponentiation of a symmetric $2 \times 2$ matrix Why does the following hold?
$$\left[\begin{matrix}a & b\\b & a\end{matrix}\right]^k=\frac{1}{2}\left[\begin{matrix}\left(a - b\right)^{k} + \left(a + b\right)^{k} & - \left(a - b\right)^{k} + \left(a + b\right)^{k}\\- \left(a - b\right)^{k} + \left(a + b\right)^{k} & \left(a - b\right)^{k} + \left(a + b\right)^{k}\end{matrix}\right]$$

Guide:
Given a symmetric $2 \times 2$ matrix $A$, one way to commpute $A^k$ is as follows:
$$\begin{bmatrix} a & b \\ b & a \end{bmatrix}\begin{bmatrix} 1 \\ 1 \end{bmatrix} = (a+b) \begin{bmatrix} 1 \\ 1 \end{bmatrix}$$
$$\begin{bmatrix} a & b \\ b & a \end{bmatrix}\begin{bmatrix} 1 \\ -1 \end{bmatrix} = (a-b) \begin{bmatrix} 1 \\ -1 \end{bmatrix}$$
Diagonalize the matrix in the form of $A=UDU^T$ where $U$ is orthogonal and $D$ is diagonal, then $A^k=UD^kU^T$.
