{%hackmd 5xqeIJ7VRCGBfLtfMi0_IQ %}
# Diagonalization
## Problem
Let
$$
A = \begin{bmatrix}
1 & 2 \\
1 & 2
\end{bmatrix}.
$$
Find a basis $\beta$ such that $[f_A]_\beta^\beta$ is diagonal.
## Thought
Let $\beta = \{\bu_1, \bu_2\}$. Suppose
$$
[f_A]_\beta^\beta =
\begin{bmatrix}
\lambda_1 & 0 \\
0 & \lambda_2
\end{bmatrix}.
$$
Then it means that
$$
\begin{aligned}
f_A(\bu_1) &= A\bu_1 = \lambda_1\bu_1, \\
f_A(\bu_2) &= A\bu_2 = \lambda_2\bu_2.
\end{aligned}
$$
Note that $A\bv = \lambda \bv$ for some nonzero vector $\bv$ if and only if $A - \lambda I$ is singular, which means $\det(A - \lambda I) = 0$.
## Sample answer
Compute
$$
\det(A - xI) =
\det\begin{bmatrix}
1 - x & 2 \\
1 & 2 - x
\end{bmatrix} =
x^2 - 3x = x(x-3),
$$
which has zeros $x = 0, 3$.
For $x = 3$, we have
$$
A - 3I = \begin{bmatrix} -2 & 2 \\ 1 & -1 \end{bmatrix},
\text{ which as its reduced echelong form }
\begin{bmatrix} 1 & -1 \\ 0 & 0 \end{bmatrix}.
$$
Thus, we may choose a nonzero vector $\bu_1 = \begin{bmatrix} 1 \\ 1 \end{bmatrix}$ in $\ker(A - 3I)$.
For $x = 0$, we have
$$
A - 0I = \begin{bmatrix} 1 & 2 \\ 1 & 2 \end{bmatrix},
\text{ which as its reduced echelong form }
\begin{bmatrix} 1 & 2 \\ 0 & 0 \end{bmatrix}.
$$
Thus, we may choose a nonzero vector $\bu_2 = \begin{bmatrix} 2 \\ -1 \end{bmatrix}$ in $\ker(A - 0I)$.
In summary, with $\beta = \{\bu_1, \bu_2\}$, we have
$$
[f_A]_\beta^\beta = \begin{bmatrix} 4 & 0 \\ 0 & 6 \end{bmatrix},
$$
so we found the desired basis $\beta$.
## Note
Please refer to [How to solve a system of linear equations?](https://hackmd.io/@jephianlin/HkM6o-cAh) if you need some help on how to find a basis of the kernel.
You may try other matrices such as
$$
A = \begin{bmatrix}
5 & -1 \\
-1 & 5
\end{bmatrix}
$$
in [quadratic curve](https://hackmd.io/@jephianlin/r1V8siMlR).
*This note can be found at Course website > Learning resources.*