# How to diagonalize a 3x3 matrix

Last updated: Jan. 1, 2019
Diagonalize a 3x3 matrix,

, and find a non-singular matrix diagonalizing $A$.

### Answer

In general,
matrix diagonalization is to find a diagonal matrix $\Lambda$ satisfying

for a square matrix $A$.
Here, $P$ is a non-singular matrix and is called a matrix which diagonalizes $A$.

It is known that the diagonal elements of the diagonalized matrix are the eigenvalues of the original matrix.
Therefore, by obtaining eigenvalues of $A$
and arranging them in diagonal elements,
diagonalized matrix $\Lambda$ is obtained.

**
Derivation of diagonal matrix $\Lambda$
**

In order to obtain the eigenvalue $\Lambda$ of $A$,
we need to solve
the characteristic equation

$$
\tag{1}
$$
, which is a polynomial equation in the variable $\lambda$.
Since the left-hand side is a

3x3 determinant,
we have

. Equation $(1)$ is expressed as

By factorizing the left-hand side, we have

The solution is

Arranging this solution in diagonal elements,
the diagonalized matrix $\Lambda$ is obtained as

**
Derivation of non-singular matrix which diagonalizes $A$
**

In general,
a non-singular matrix $P$ diagonalizing a matrix $A$ is a matrix whose columun vectors are eigenvectors of $A$.
Therefore, $P$ is obtained, if eigenvector for each eigenvalue of $A$ is obtained.

Case: $\lambda=-1$

In this case,
the eigenvector is a vector $\mathbf{x}$ that satisfies

Let $\mathbf{x}$ be

. We have

.
This equation is a simultaneous linear equation expresseed as

.
Solving this gives

. Therefore the eigenvector for $\lambda=1$ is

, where $x_{3}$ is an arbitrary value (see

Appendix).
Here, we set $ x_ {3} = 1 $ for convenience, and

$$
\tag{2}
$$

Case: $\lambda=1$

In this case,
the eigenvector is a vector $\mathbf{x}$ that satisfies

Let $\mathbf{x}$ be

. We have

.
This equation is a simultaneous linear equation expresseed as

.
Solving this gives

. Therefore the eigenvector for $\lambda=1$ is

, where $x_{3}$ is an arbitrary value (see

Appendix).
Here, we set $ x_ {3} = 1 $ for convenience, and

$$
\tag{3}
$$

Case: $\lambda=2$

In this case,
the eigenvector is a vector $\mathbf{x}$ that satisfies

. Let $\mathbf{x}$ be

. We have

.
This equation is a simultaneous linear equation expresseed as

.
Solving this gives

. Therefore the eigenvector for $\lambda=2$ is

, where $x_{3}$ is an arbitrary value (see

Appendix).
Here, we set $ x_ {3} = 1 $ for convenience, and

$$
\tag{4}
$$

As mentioned above,
since the non-singular matrix $P$
diagonalizing the matrix $A$
is a matrix whose eigenvectors as column vectors,
from $ (2) (3) (4) $, we obtain

$$
\tag{5}
$$

## Verification of the answer

We will check whether the matrix $P$
obtained in equation $(5)$
actually diagonalizes the matrix $A$.
that is, whether
the matrix $P$ and $A$ and the diagonal matrix $\Lambda$ satisfy

To do that,
we need derive the inverse matrix $P^{- 1}$ of the non-singular matrix $P$.

Derivation of $P^{-1}$:

We will derive the inverse matrix $ P^{- 1} $ by

Gaussian elimination.
To do this,
we define
a matrix in which $P$ and the identity matrix I are arranged side by side,

$$
\tag{6}
$$
, and
tramsform the left half matrix to the identity matrix by the elementary row operations.

As a result,
the matrix appearing in the right half becomes the inverse matrix $A ^ {- 1}$ of $A$.

According to this method,
performing the elementary row operations to the matrix $(6)$,
we have

Therefore, we obtain

From this, we can calculate
$P^{-1}AP$ as

.
We confirmed that the matrix $P$ is a matrix that diagonalizes the matrix $A$.