# Nakafa Learning Content

> For AI agents: use [llms.txt](https://nakafa.com/llms.txt) for the site index. Markdown versions are available by appending `.md` to content URLs or sending `Accept: text/markdown`.

URL: https://nakafa.com/en/subjects/ai-ds/linear-methods/spectral-real-matrix
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/material/lesson/ai-ds/linear-methods/spectral-real-matrix/en.mdx

Learn when real matrices have orthonormal eigenvector bases, using normality conditions, characteristic polynomials, and counterexamples.

---

## Equivalent Conditions of the Theorem

For a real matrix $$A \in \mathbb{R}^{n \times n}$$, the following two conditions are equivalent to each other.

Visible text: For a real matrix , the following two conditions are equivalent to each other.

1. There exists an orthonormal basis of $$\mathbb{R}^n$$ consisting of eigenvectors of matrix $$A$$

2. Matrix $$A$$ is normal and the characteristic polynomial $$\chi_A(t)$$ of $$A$$ factors into linear factors in $$\mathbb{R}$$

Visible text: 1. There exists an orthonormal basis of consisting of eigenvectors of matrix 

2. Matrix is normal and the characteristic polynomial of factors into linear factors in

The main difference from the case of [complex matrices](/en/subjects/ai-ds/linear-methods/spectral-complex-matrix) lies in the additional requirement about the factorization of the characteristic polynomial. In real numbers, all roots of the characteristic polynomial must be real numbers.

Based on this theorem, several types of matrices can be diagonalized using an orthonormal basis of eigenvectors. Complex Hermitian matrices, complex unitary matrices, and real symmetric matrices always satisfy this condition. Orthogonal matrices can be orthogonally diagonalized only if their characteristic polynomial factors into linear factors in real numbers.

## Normal Matrix without Orthonormal Basis

Consider a rotation matrix for angle $$\alpha$$ that is not a multiple of $$\pi$$.

Visible text: Consider a rotation matrix for angle that is not a multiple of .

```math
A = \begin{pmatrix} \cos(\alpha) & -\sin(\alpha) \\ \sin(\alpha) & \cos(\alpha) \end{pmatrix}
```

This matrix is orthogonal and therefore automatically normal. However, its characteristic polynomial

Component: MathContainer
Children:

```math
\chi_A(t) = (\cos(\alpha) - t)^2 + \sin^2(\alpha)
```

```math
= -t^2 + 2\cos(\alpha) \cdot t + 1
```

does not factor into linear factors in real numbers for most values of $$\alpha$$. Imagine searching for solutions to a quadratic equation that has no real roots. As a result, even though the matrix is normal, there is no orthonormal basis of real eigenvectors.

Visible text: does not factor into linear factors in real numbers for most values of . Imagine searching for solutions to a quadratic equation that has no real roots. As a result, even though the matrix is normal, there is no orthonormal basis of real eigenvectors.

## Non-Normal Matrix that is Diagonalizable

The following matrix has eigenvalues $$\lambda_1 = 1$$ and $$\lambda_2 = 2$$ with algebraic multiplicity $$1$$ each.

Visible text: The following matrix has eigenvalues and with algebraic multiplicity each.

```math
A = \begin{pmatrix} 1 & 3 \\ 0 & 2 \end{pmatrix}
```

Since the eigenvalues are different, the matrix can be diagonalized. However, this matrix is not normal because

Component: MathContainer
Children:

```math
A \cdot A^T = \begin{pmatrix} 10 & 6 \\ 6 & 4 \end{pmatrix}
```

```math
A^T \cdot A = \begin{pmatrix} 1 & 3 \\ 3 & 13 \end{pmatrix}
```

These two matrices are not equal, so $$A \cdot A^T \neq A^T \cdot A$$.

Visible text: These two matrices are not equal, so .

The eigenspaces of this matrix are

Component: MathContainer
Children:

```math
\text{Eig}_A(1) = \text{Kern}(A - I) = \text{Kern}\begin{pmatrix} 0 & 3 \\ 0 & 1 \end{pmatrix} = \text{span}\begin{pmatrix} 1 \\ 0 \end{pmatrix}
```

```math
\text{Eig}_A(2) = \text{Kern}(A - 2I) = \text{Kern}\begin{pmatrix} -1 & 3 \\ 0 & 0 \end{pmatrix} = \text{span}\begin{pmatrix} 3 \\ 1 \end{pmatrix}
```

Here the kernel (null space) is the set of all vectors that are mapped to the zero vector by the matrix, while the span is the set of all linear combinations of that vector. Although the matrix can be diagonalized, there is no orthonormal basis of eigenvectors because the eigenvectors are not orthogonal to each other.