### Polynomials of Matrix

##### 1. Cayley-Hamilton theorem

Let **A** be a diagonalizable matrix, with a basis **v**_{1}, **v**_{2}, ..., **v**_{n} of eigenvectors. Let `p`(`λ`) = `det`(**A** - `λ`**I**) be the characteristic polynomial of **A**. Then for the eigenvalue `λ`_{k} of **v**_{k}, we have

`p`(**A**)**v**_{k}

= `p`(`λ`_{k})**v**_{k} (this property)

= 0**v**_{k} = **0**. (eigenvalues are the roots of `det`(**A** - `λ`**I**))

Since applying `p`(**A**) to any vector in the basis **v**_{1}, **v**_{2}, ..., **v**_{n} gives us the zero vector, we conclude `p`(**A**) must be the zero matrix.

We just proved the following result for diagonalizable matrices. The result is called Cayley-Hamilton theorem, and is true for any square matrix.

Let `p`(`λ`) = `det`(**A** - `λ`**I**) be the characteristic polynomial of a matrix **A**. Then `p`(**A**) = **O**.

Proof Let

`p`(`λ`) = `p`_{0} + `p`_{1}`λ` + ... + `p`_{n-1}`λ`^{n-1} + `p`_{n}λ^{n}.

Let **Q**(`λ`) be the adjugate matrix of the square matrix **A** - `λ`**I**, which may be considered as a polynomial in `λ` and with matrix coefficients (see this for 2 by 2 and 3 by 3 cases):

**Q**(`λ`) = **Q**_{0} + `λ`**Q**_{1} + ... + `λ`^{q-1}**Q**_{q-1} + `λ`^{q}**Q**_{q}, where **Q**_{q} are constant matrices.

By the formula (`adj`**A**)**A** = (`det`**A**)**I**, we have

**Q**(`λ`)(**A** - `λ`**I**) = `p`(`λ`)**I** = `p`_{0}**I** + `p`_{1}`λ`**I** + ... + `p`_{n-1}`λ`^{n-1}**I** + `p`_{n}λ^{n}**I**.

On the other hand, we have

**Q**(`λ`)(**A** - `λ`**I**) = **Q**_{0}**A** + `λ`(**Q**_{1}**A** - **Q**_{0}) + ... + `λ`^{q}(**Q**_{q}**A** - **Q**_{q-1}) - `λ`^{q+1}**Q**_{q}.

Thus we get `q` = `n` -1 and

**Q**_{0}**A** = `p`_{0}**I**,

**Q**_{1}**A** - **Q**_{0} = `p`_{1}**I**,

:

**Q**_{n-1}**A** - **Q**_{n-2} = `p`_{n-1}**I**,

- **Q**_{n-1} = `p`_{n}**I**.

Multiplying powers of **A** on the right sides, we get

**Q**_{0}**A** = `p`_{0}**I**,

**Q**_{1}**A**^{2} - **Q**_{0}**A** = `p`_{1}**A**,

:

**Q**_{n-1}**A**^{n} - **Q**_{n-2}**A**^{n-1} = `p`_{n-1}**A**^{n-1},

- **Q**_{n-1}**A**^{n} = `p`_{n}**A**^{n}.

Adding all the equalities together, we get

`p`(**A**) = `p`_{0}**I** + `p`_{1}**A** + ... + `p`_{n-1}**A**^{n-1} + `p`_{n}**A**^{n} = **O**.

By this discussion, the characteristic polynmomial of a 2 by 2 matrix **A** is

`det`(**A** - `λ`**I**) = `det`**A** - (`tr`**A**)`λ` + `λ`^{2}.

Therefore the Cayley-Hamilton theorem tells us

(`det`**A**)**I** - (`tr`**A**)**A** + **A**^{2} = **O**.