# Diagonalize Matrix Calculator

The calculator will diagonalize the given matrix (if possible), with steps shown.

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please write it in the comments below.

Diagonalize $\left[\begin{array}{ccc}1 & 1 & 3\\1 & 5 & 1\\3 & 1 & 1\end{array}\right]$.

## Solution

First, find the eigenvalues and eigenvectors (for steps, see eigenvalues and eigenvectors calculator).

Eigenvalue: $6$, eigenvector: $\left[\begin{array}{c}1\\2\\1\end{array}\right]$.

Eigenvalue: $3$, eigenvector: $\left[\begin{array}{c}1\\-1\\1\end{array}\right]$.

Eigenvalue: $-2$, eigenvector: $\left[\begin{array}{c}-1\\0\\1\end{array}\right]$.

Form the matrix $P$, whose column $i$ is eigenvector no. $i$: $P = \left[\begin{array}{ccc}1 & 1 & -1\\2 & -1 & 0\\1 & 1 & 1\end{array}\right]$.

Form the diagonal matrix $D$ whose element at row $i$, column $i$ is eigenvalue no. $i$: $D = \left[\begin{array}{ccc}6 & 0 & 0\\0 & 3 & 0\\0 & 0 & -2\end{array}\right]$.

The matrices $P$ and $D$ are such that the initial matrix $\left[\begin{array}{ccc}1 & 1 & 3\\1 & 5 & 1\\3 & 1 & 1\end{array}\right] = P D P^{-1}$.

$P = \left[\begin{array}{ccc}1 & 1 & -1\\2 & -1 & 0\\1 & 1 & 1\end{array}\right]$A
$D = \left[\begin{array}{ccc}6 & 0 & 0\\0 & 3 & 0\\0 & 0 & -2\end{array}\right]$A