---
# System prepended metadata

title: Untitled

---

## Diagnonalizable Matrices

### Created By: Orion Sinacori

Diagonal matrices are some of the easiest matrices to work with, especially when it comes to matrix multiplication. A diagonal matrix is a matrix that consists of all zero entries aside from the main diagonal. For instance, the identity matrix is a diagonal matrix as the only non-zero entries are those on the main diagonal as such:

$\begin{bmatrix}
1&0&0\\
0&1&0\\
0&0&1\\
\end{bmatrix}$

One of the major benefits of a diagonal matrix is that finding the power of one is much easier than a matrix that has non-zero entries outside of the main diagonal. For instance, the matrix

$\begin{bmatrix}
a&0&0\\
0&b&0\\
0&0&c\\
\end{bmatrix}^7 = \begin{bmatrix}
a^7&0&0\\
0&b^7&0\\
0&0&c^7\\
\end{bmatrix}$

Diagonal matrices don't appear too often so this convienience seems to be a rare occurance, but we can diagonalize specific matrices. An $n \times n$ matrix is diagonalizable if and only if $A$ has $n$ linearly independent eigenvectors. If $A$ is diagonalizable then we can write it in the form $A=PDP^{-1}$ where $P$ is the eigenvectors that correspond to the eigenvalues that make up the digonal entries of $D$.

To better understand this, let's work through an example. Suppose we have the matrix $A$ where 
$A = \begin{bmatrix}
1&0\\
2&-1\\
\end{bmatrix}$

and we want to find $A^k$ where $k$ is some positive integer. First we need to find the eigenvalues of $A$. 

$\begin{align*}
(1 - \lambda)(-1 - \lambda)& = \lambda^2 - 1\\
& =(\lambda + 1)(\lambda -1 ) 
\end{align*}$

So we have $\lambda_1 = -1$ and $\lambda_2 = 1$. This means we can have our eigen vectors be 
$\vec{v}_1 = \begin{bmatrix}
0\\
1\\
\end{bmatrix}$, $\vec{v}_2 = \begin{bmatrix}
1\\
1\\
\end{bmatrix}$

This means that 
$P = \begin{bmatrix}
0&1\\
1&1\\
\end{bmatrix}$, and $D = \begin{bmatrix}
1&0\\
0&-1\\
\end{bmatrix}$.

Now we can try to find $A^k$. First we will show that $A^k = PD^KP{-1}$ in general. Suppose We have $A^K=(PDP^{-1})^k$. This would mean we would have $PDP^{-1}PDP^{-1}$ $k$ times. Every $PP^{-1} term will cancel leaving us with $PD^kP^{-1}. Now that we have shown $A^k = PD^KP{-1}$, we can find $A^k$ for our specific problem. Notice:

$\begin{align*}
A^k & = \begin{bmatrix}
0&1\\
1&1\\
\end{bmatrix}\begin{bmatrix}
-1^k&0\\
0&1^k\\
\end{bmatrix}\begin{bmatrix}
-1&1\\
1&0\\
\end{bmatrix}\\
& = \begin{bmatrix}
0&1^k\\
-1^k&1^k\\
\end{bmatrix} \begin{bmatrix}
-1&1\\
1&0\\
\end{bmatrix}\\ 
& = \begin{bmatrix}
1^k&0\\
(-1)\cdot (-1)^k + 1^k&-1^k\\
\end{bmatrix}\\
& = \begin{bmatrix}
1^k&0\\
(-1)^{k+1} + 1&-1^k\\
\end{bmatrix}
\end{align*}$

Using our final matrix we can find any exponent of $A$. This method is very useful for large values of $k$ where multiplying $A$ by itself multiple times would be overwhelming such as if you wanted to find $A^{100}$. 

For extra practice, find $A^3$ where 
$A = \begin{bmatrix}
4&2&2\\
2&4&2\\
2&2&4\\
\end{bmatrix}$ 

and one eigenvalue for $A$ is 8.