Matrix diagonalization simplifies computations, particularly when dealing with repeated applications of a transformation matrix. It transforms the original matrix $T$ into a diagonal matrix $T_E$, enabling efficient computation of matrix powers.
## Problem Setup
Consider a transformation matrix $T$ that describes the change in position of an object $v$ per unit time. Starting from the object's initial position $v_0$, the position after $n$ steps is given by:
$ v_n = T^n *v_0 $
This involves multiplying $T^n$, which requires multiplying $T$ by itself $n$ times. For large $n$, this becomes computationally expensive. Matrix diagonalization offers an efficient alternative.
## Diagonal Matrix
A diagonal matrix has non-zero elements only on its main diagonal.
$ D= \begin{bmatrix} a&0&0\\ 0&b&0\\ 0&0&c \end{bmatrix}$
When a diagonal matrix is multiplied by itself, only the diagonal elements are affected:
$
D^2= \begin{bmatrix} a^2&0&0\\ 0&b^2&0\\ 0&0&c^2 \end{bmatrix}, \quad
D^n= \begin{bmatrix} a^n&0&0\\ 0&b^n&0\\ 0&0&c^n \end{bmatrix}
$
## Changing to Eigenbasis
Diagonalization relies on the eigenbasis of $T$, where the [[Eigenvectors]] of $T$ form the [[Changing Basis Vectors|new basis vectors]]. In this basis, the transformation $T$ is reduced to a diagonal matrix $T_E$.
We collect the new basis vectors, i.e. all eigenvectors of $T$ as column vectors in matrix $C$.
$ C= \begin{bmatrix} \begin{pmatrix}\vdots \\ x_1 \\ \vdots \end{pmatrix} \begin{pmatrix}\vdots \\ x_2 \\ \vdots \end{pmatrix} \begin{pmatrix}\vdots \\ x_3 \\ \vdots \end{pmatrix} \end{bmatrix}$
By re-expressing $T$ in this new basis $T_E$ we obtain a diagonal matrix, where the diagonal elements are the corresponding eigenvalues.
$ T_E= \begin{bmatrix} \lambda_1&0&0\\ 0&\lambda_2&0\\ 0&0&\lambda_3\\ \end{bmatrix} $
## Transformation Chain
The relationship between $T,C$ and $T_E$ is given by:
$ T=C\cdot T_E \cdot C^{-1}$
where:
- $C^{-1}$: maps vectors form the standard basis to the eigenbasis.
- $T_E$: is the transformation $T$ expressed in eigenbasis.
- $C$: maps the result back from eigenbasis to standard basis.
The power $T^n$ is computed as:
$ T^n=C \cdot T_E^n \cdot C^{-1}$
The full chain of transformations there looks as follows:
![[matrix-diagonalization.png|center|400]]
$
\begin{align}
T &= C\,T_E\,C^{-1} \\[4pt]
T^2 &= C\,T_E\,C^{-1} * C\,T_E\,C^{-1} \\[4pt]
T^2 &= C\,T_E\,T_E\,C^{-1} \\[4pt]
T^2 &= C\,T_E^2\,C^{-1}
\end{align}
$