Eigendecomposition example
Let's look for the eigendecomposition of $A$
\[
\begin{split}
A =
\begin{pmatrix}
1&2\\
2&4\end{pmatrix}
\end{split}
\]
Step 1
Calculate $X = \lambda{I_n}-A_n$
\[
X = \begin{split}\begin{pmatrix}\lambda & 0 \\0 & \lambda \end{pmatrix}
β \begin{pmatrix}1&2\\2&4\end{pmatrix}
=
\begin{pmatrix}
\lambda-1 & -2 \\
-2 & \lambda -4
\end{pmatrix}\end{split}
\]
Step 2
Solve $det(\lambda{I_n}-A_n) = 0$. We know that $det(A_2) = ad-bc$, so we have
\[
\begin{split}
det(X) = (\lambda-1) * (\lambda -4) - (-2*-2) = 0
\\ \Leftrightarrow
\lambda^2 -4\lambda - \lambda +4 -4
\\ \Leftrightarrow
\lambda^2 - 5\lambda
\\ \Leftrightarrow
(\lambda -0)(\lambda - 5)
\end{split}
\]
We got $\lambda_1=0$ and $\lambda_2=5$.
Step 3 ($\lambda_0$)
\[
\begin{split}\begin{cases}
1x + 2y = 0x\\
2x + 4y = 0y
\end{cases}
=^{collinearity}
\begin{cases}
1x + 2y = 0\\
\end{cases}
=
\begin{cases}
x = -2y\\
\end{cases}\end{split}
\]
The first eigenvector is
\[
\begin{pmatrix}-2\alpha \\1\alpha \end{pmatrix}
\]
Step 3 ($\lambda_1$)
\[
\begin{split}\begin{cases}
1x + 2y = 5x\\
2x + 4y = 5y
\end{cases}
=
\begin{cases}
-4x + 2y = 0\\
2x + -1y = 0
\end{cases}
=^{collinearity}
\begin{cases}
2x + -1y = 0
\end{cases}
=
\begin{cases}
2x = y
\end{cases}
=
\begin{cases}
x = \frac{y}{2}
\end{cases}
\end{split}
\]
The second eigenvector is
\[
\begin{pmatrix}0.5\alpha \\1\alpha \end{pmatrix}
\]
Step 4
We can create $P$
\[
\begin{split}P =
\begin{pmatrix}
-2&0.5\\
1&1
\end{pmatrix}
\end{split}
\]
Step 5
We solve $P^{-1}$
\[
\begin{split}
\begin{pmatrix}-2&0.5& | & 1 & 0 \\1&1 & | & 0 & 1\end{pmatrix}
\Leftrightarrow^{L1 \leftarrow -0.5 L1}
\begin{pmatrix}1&-0.25& | & -0.5 & 0 \\1&1 & | & 0 & 1\end{pmatrix}
\\\Leftrightarrow^{L2 \leftarrow L2 - L1}
\begin{pmatrix}1&-0.25& | & -0.5 & 0 \\0&1.25 & | & 0.5 & 1\end{pmatrix}
\Leftrightarrow^{L2 \leftarrow 0.8 * L2}
\begin{pmatrix}1&-0.25& | & -0.5 & 0 \\0&1 & | & 0.4 & 0.8\end{pmatrix}
\\\Leftrightarrow^{L1 \leftarrow L1 + 0.25 * L2}
\begin{pmatrix}1&0& | & -0.4 & 0.2 \\0&1 & | & 0.4 & 0.8\end{pmatrix}
\end{split}
\]
π Test that $P_n * P_n^{-1} = I_n$.
Step 6
We can create $A^n$
\[
\begin{split}A^n=PD^nP^{-1}=\begin{pmatrix}-2&0.5\\1&1\end{pmatrix} * \begin{pmatrix}0^n&0\\0&5^n\end{pmatrix}
* \begin{pmatrix}-0.4 & 0.2 \\0.4 & 0.8\end{pmatrix}\end{split}
\]
π Test that $A = P * D^1 * D^{-1}$.
π Test that $A * A = P * D^2 * D^{-1}$.