01-01-2023

Problem: Consider a matrix $$ A = \begin{bmatrix}1 & 1 & 0 \\ 0 & 2 & 3 \\0 & 0 & 3\end{bmatrix}. $$ Find a matrix $P$ such that $P^{-1}AP$ is a diagonal matrix.

Solution: To find a matrix $P$ such that $P^{-1}AP$ is a diagonal matrix, we can use the following steps:

  1. Calculate the eigenvalues of the matrix $A$, which are the values $\lambda$ that satisfy the equation $\det(A-\lambda I) = 0$.
  2. Find the eigenvectors of matrix $A$, which are the non-zero vectors $\mathbf{v} $ that satisfy the equation $A\mathbf{v} = \lambda \mathbf{v} $, where $\lambda$ is the eigenvalue associated with the eigenvector.
  3. Finally, the matrix $P$ will be the one whose columns are the eigenvectors of A.


As the matrix $A$ is an upper triangular matrix, so the eigenvalues will be its diagonal entries, i.e., $1,2$, and $3$.


Now we will find out the eigenvector associated to each eigenvalue.

$\lambda =1$.

Then we have $(A-I) \mathbf{v}_1 = 0$, so \begin{align*} & \begin{bmatrix} 0 & 1 & 0 \\ 0 & 1 & 3 \\ 0 & 0 & 2 \\ \end{bmatrix} \mathbf{v}_1 = \begin{bmatrix} 0 \\ 0 \\ 0 \\ \end{bmatrix}. \end{align*} A non-zero solution will be $\mathbf{v}_1 = \begin{bmatrix} 1 & -1 & 0\end{bmatrix}^t$, which is the eigenvector associated with eigenvalue 1.

$\lambda =2$.

Then we have $(A-2I) \mathbf{v}_2 = 0$, so \begin{align*} & \begin{bmatrix} -1 & 1 & 0 \\ 0 & 0 & 3 \\ 0 & 0 & 1 \\ \end{bmatrix} \mathbf{v}_2 = \begin{bmatrix} 0 \\ 0 \\ 0 \\ \end{bmatrix}. \end{align*} A non-zero solution will be $\mathbf{v}_2 = \begin{bmatrix} 1 & 0 & 0\end{bmatrix}^t$, which is the eigenvector associated with eigenvalue 2.

$\lambda =3$.

Then we have $(A-2I) \mathbf{v}_3 = 0$, so \begin{align*} & \begin{bmatrix} -2 & 1 & 0 \\ 0 & -1 & 3 \\ 0 & 0 & 0 \\ \end{bmatrix} \begin{bmatrix} v_{31} \\ v_{32} \\ v_{33} \\ \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 0 \\ \end{bmatrix} \\ \implies & -2v_{31}+v_{32} = 0, ~ -v_{32}+3v_{33} = 0\\ \implies & v_{32} = 2v_{31}, ~ v_{33} = \frac{1}{3}v_{32} = \frac{2}{3}v_{31} \end{align*} A non-zero solution will be $\mathbf{v}_3 = \begin{bmatrix} 3 & 6 & 2\end{bmatrix}^t$, which is the eigenvector associated with eigenvalue 3.


Thus, the required matrix $P$ will be \[ P = \begin{bmatrix} 1 & 1 & 3 \\ 0 & 1 & 6 \\ 0 & 0 & 2 \\ \end{bmatrix}. \] Now we can see that \[ P^{-1}AP = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 3 \\ \end{bmatrix}. \]