# 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/characteristic-polynomial
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/material/lesson/ai-ds/linear-methods/characteristic-polynomial/en.mdx

Explore characteristic polynomials to find eigenvalues, understand algebraic multiplicity, and analyze matrix trace relationships in linear algebra.

---

## Definition and Basic Concepts

To find the eigenvalues of a matrix, we need a very important mathematical tool in linear algebra. Imagine we want to find all values $$\lambda$$ that make the matrix $$A - \lambda I$$ become singular (not invertible).

Visible text: To find the eigenvalues of a matrix, we need a very important mathematical tool in linear algebra. Imagine we want to find all values that make the matrix become singular (not invertible).

Let $$A \in \mathbb{K}^{n \times n}$$. We can form a special function:

Visible text: Let . We can form a special function:

Component: MathContainer
Children:

```math
\chi_A(t) = \det(A - t \cdot I)
```

```math
\chi_A(t) = a_n \cdot t^n + a_{n-1} \cdot t^{n-1} + \cdots + a_1 t + a_0
```

This function is a polynomial of degree $$n$$ in $$t \in \mathbb{K}$$, which we call the **characteristic polynomial** of $$A$$.

Visible text: This function is a polynomial of degree in , which we call the **characteristic polynomial** of .

with coefficients $$a_0, \ldots, a_{n-1}, a_n \in \mathbb{K}$$.

Visible text: with coefficients .

In fact, $$\chi_A(t)$$ is indeed a polynomial of degree $$n$$ for every matrix $$A \in \mathbb{K}^{n \times n}$$.

Visible text: In fact, is indeed a polynomial of degree for every matrix .

## Matrix Trace and Polynomial Coefficients

Let $$A \in \mathbb{K}^{n \times n}$$ be a square matrix. The **trace** of $$A$$ is the sum of the diagonal elements:

Visible text: Let be a square matrix. The **trace** of is the sum of the diagonal elements:

```math
\text{trace} A = \sum_{i=1}^n a_{ii}
```

The matrix trace has a close relationship with the coefficients of the characteristic polynomial.

### Relationship of Coefficients with Trace and Determinant

In the characteristic polynomial $$\chi_A(t)$$ of $$A$$, its coefficients have special meaning:

Visible text: In the characteristic polynomial of , its coefficients have special meaning:

```math
a_n = (-1)^n, \quad a_{n-1} = (-1)^{n-1} \cdot \text{trace} A, \quad a_0 = \det A
```

This means:

- The highest coefficient is always $$(-1)^n$$
- The second highest coefficient is related to the matrix trace
- The constant term is the determinant of the matrix

Visible text: - The highest coefficient is always 
- The second highest coefficient is related to the matrix trace
- The constant term is the determinant of the matrix

## Eigenvalues as Polynomial Roots

The most important concept of the characteristic polynomial is its relationship with eigenvalues.

Now, let's look at a very important relationship: $$\lambda \in \mathbb{K}$$ is an eigenvalue of $$A$$ if and only if $$\det(A - \lambda \cdot I) = 0$$.

Visible text: Now, let's look at a very important relationship: is an eigenvalue of if and only if .

In other words, **eigenvalues are the roots of the characteristic polynomial**.

The equation for $$t \in \mathbb{K}$$:

Visible text: The equation for :

```math
\det(A - t \cdot I) = 0
```

is what we call the **characteristic equation** of $$A$$.

Visible text: is what we call the **characteristic equation** of .

## Algebraic Multiplicity

Now, what happens if an eigenvalue appears multiple times as a root of the characteristic polynomial? Let $$A \in \mathbb{K}^{n \times n}$$ and $$\lambda \in \mathbb{K}$$. The multiplicity of the root $$t = \lambda$$ of the characteristic polynomial $$\chi_A(t)$$ is called the **algebraic multiplicity** $$\mu_A(\lambda)$$ of the eigenvalue $$\lambda$$ of $$A$$. We say $$\lambda$$ is an eigenvalue with multiplicity $$\mu_A(\lambda)$$ of $$A$$.

Visible text: Now, what happens if an eigenvalue appears multiple times as a root of the characteristic polynomial? Let and . The multiplicity of the root of the characteristic polynomial is called the **algebraic multiplicity** of the eigenvalue of . We say is an eigenvalue with multiplicity of .

### Multiplicity Bounds

For every eigenvalue $$\lambda$$, it holds:

Visible text: For every eigenvalue , it holds:

```math
0 \leq \mu_A(\lambda) \leq n
```

## Relationship between Geometric and Algebraic Multiplicity

One important result in eigenvalue theory is the relationship between geometric and algebraic multiplicity.

For any matrix $$A \in \mathbb{K}^{n \times n}$$ and $$\lambda \in \mathbb{K}$$, we have an interesting relationship:

Visible text: For any matrix and , we have an interesting relationship:

```math
0 \leq \dim \text{Eig}_A(\lambda) \leq \mu_A(\lambda) \leq n
```

> The geometric multiplicity of every eigenvalue is always less than or equal to its algebraic multiplicity.

Why does this happen? This can be explained using basis transformation and Jordan block form.

## Examples of Characteristic Polynomial Calculation

After understanding the basic concepts, let's see how to apply them in concrete examples of characteristic polynomial calculation:

### Third-Order Matrix Example

Let $$A = \begin{pmatrix} 3 & 2 & -1 \\ 1 & 0 & -4 \\ 3 & 0 & 1 \end{pmatrix} \in \mathbb{K}^{3 \times 3}$$. The characteristic polynomial of $$A$$ is:

Visible text: Let . The characteristic polynomial of is:

Component: MathContainer
Children:

```math
\chi_A(t) = \det \begin{pmatrix} 3-t & 2 & -1 \\ 1 & -t & -4 \\ 3 & 0 & 1-t \end{pmatrix}
```

```math
= (3-t) \cdot (-t) \cdot (1-t) - 2 \cdot (1 \cdot (1-t) + 3 \cdot 4) + 1 \cdot 3 \cdot t
```

```math
= -3t + 3t^2 + t^2 - t^3 - 2 + 2t - 24 - 3t
```

```math
= -t^3 + 4t^2 - 4t - 26
```

For $$\mathbb{K} = \mathbb{R}$$, $$\chi_A(t)$$ only has the root $$\lambda_1 \approx -1.8003$$ with algebraic multiplicity $$\mu_A(\lambda_1) = 1$$.

Visible text: For , only has the root with algebraic multiplicity .

For $$\mathbb{K} = \mathbb{C}$$, $$\chi_A(t)$$ has roots $$\lambda_1 \approx -1.8003$$, $$\lambda_2 \approx 2.9001 + 2.4559i$$, and $$\lambda_3 \approx 2.9001 - 2.4559i$$ with algebraic multiplicities $$\mu_A(\lambda_1) = \mu_A(\lambda_2) = \mu_A(\lambda_3) = 1$$ respectively.

Visible text: For , has roots , , and with algebraic multiplicities respectively.

### Simple Example

The characteristic polynomial of matrix $$A = \begin{pmatrix} 1 & 2 \\ 0 & 1 \end{pmatrix}$$ is:

Visible text: The characteristic polynomial of matrix is:

Component: MathContainer
Children:

```math
\chi_A(t) = \det(A - t \cdot I) = \det \begin{pmatrix} 1-t & 2 \\ 0 & 1-t \end{pmatrix}
```

```math
= (1-t) \cdot (1-t) - 0 \cdot 2 = (1-t)^2
```

```math
= t^2 - 2 \cdot t + 1
```

This matrix has the root $$\lambda = 1$$ with algebraic multiplicity $$\mu_A(1) = 2$$. $$\lambda = 1$$ is the only eigenvalue of $$A$$. We have calculated that $$\dim \text{Eig}_A(1) = 1$$.

Visible text: This matrix has the root with algebraic multiplicity . is the only eigenvalue of . We have calculated that .

## Geometric Transformation Examples

Now, let's explore something fascinating: how the characteristic polynomial works on common geometric transformations we often encounter in $$\mathbb{R}^2 \to \mathbb{R}^2$$:

Visible text: Now, let's explore something fascinating: how the characteristic polynomial works on common geometric transformations we often encounter in :

### Rotation

Rotation with $$A = \begin{pmatrix} \cos(\alpha) & -\sin(\alpha) \\ \sin(\alpha) & \cos(\alpha) \end{pmatrix}$$ has the characteristic polynomial:

Visible text: Rotation with has the characteristic polynomial:

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

This has real roots if and only if $$\cos(\alpha)^2 - 1 \geq 0$$, that is $$\cos(\alpha)^2 = 1$$, so $$\alpha = 0$$ or $$\alpha = \pi$$.

Visible text: This has real roots if and only if , that is , so or .

### Reflection

Reflection along axes with $$A = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}$$ has the characteristic polynomial:

Visible text: Reflection along axes with has the characteristic polynomial:

```math
\chi_A(t) = (1-t) \cdot (-1-t) = t^2 - 1
```

The eigenvalues are $$\lambda_1 = 1$$ and $$\lambda_2 = -1$$ with $$\mu_A(1) = \mu_A(-1) = 1$$.

Visible text: The eigenvalues are and with .

### Scaling

Scaling with $$A = \begin{pmatrix} s & 0 \\ 0 & s \end{pmatrix}$$ has the characteristic polynomial:

Visible text: Scaling with has the characteristic polynomial:

```math
\chi_A(t) = (s-t)^2 = t^2 - 2 \cdot s \cdot t + s^2
```

The eigenvalue is $$\lambda = s$$ with $$\mu_A(s) = 2$$.

Visible text: The eigenvalue is with .

### Shearing

Shearing with $$A = \begin{pmatrix} 1 & s \\ 0 & 1 \end{pmatrix}$$ with $$s \neq 0$$ has the characteristic polynomial:

Visible text: Shearing with with has the characteristic polynomial:

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

The eigenvalue is $$\lambda = 1$$ with $$\mu_A(1) = 2$$.

Visible text: The eigenvalue is with .

## Properties of Similar Matrices

Similar matrices have a fascinating property: they have the same characteristic polynomial, and therefore have the same eigenvalues, the same trace, and the same determinant.

Let's see why this is true. Let $$S \in \mathbb{K}^{n \times n}$$ be invertible and $$B = S^{-1} \cdot A \cdot S$$. Then:

Visible text: Let's see why this is true. Let be invertible and . Then:

Component: MathContainer
Children:

```math
\chi_B(t) = \det(B - t \cdot I) = \det(S^{-1} \cdot A \cdot S - t \cdot S^{-1} \cdot I \cdot S)
```

```math
= \det(S^{-1} \cdot (A - t \cdot I) \cdot S)
```

```math
= \det S^{-1} \cdot \det(A - t \cdot I) \cdot \det S = \chi_A(t)
```

### Eigenvector Properties of Similar Matrices

Now, what about the eigenvectors of similar matrices? Let $$A, B \in \mathbb{K}^{n \times n}$$ be similar matrices with $$B = S^{-1} \cdot A \cdot S$$ and invertible matrix $$S \in \mathbb{K}^{n \times n}$$. If $$\lambda \in \mathbb{K}$$ is an eigenvalue of both $$A$$ and $$B$$, and $$v \in \mathbb{K}^n$$ is an eigenvector of $$A$$ for eigenvalue $$\lambda$$, then $$w = S^{-1} \cdot v$$ is an eigenvector of $$B$$ for eigenvalue $$\lambda$$.

Visible text: Now, what about the eigenvectors of similar matrices? Let be similar matrices with and invertible matrix . If is an eigenvalue of both and , and is an eigenvector of for eigenvalue , then is an eigenvector of for eigenvalue .

Let's see why this is true. Let $$A \cdot v = \lambda \cdot v$$ and $$w = S^{-1} \cdot v$$. Then:

Visible text: Let's see why this is true. Let and . Then:

Component: MathContainer
Children:

```math
B \cdot w = S^{-1} \cdot A \cdot S \cdot S^{-1} \cdot v = S^{-1} \cdot A \cdot v
```

```math
= S^{-1} \cdot \lambda \cdot v = \lambda \cdot S^{-1} \cdot v = \lambda \cdot w
```

This shows that similarity transformation not only preserves eigenvalues, but also provides a systematic way to transform eigenvectors.