Linear Algebra & DE · Unit 1 · Topic 05

Cayley–Hamilton theorem: a matrix satisfies its own equation.

Short answer

Every square matrix satisfies its characteristic equation. For a 2×2 matrix: \[A^2 - (\operatorname{tr}A)A + |A|\,I = 0\]

For \(A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}\): \(A^2 - 5A - 2I = 0\), so \(A^{-1} = \tfrac{1}{2}(A - 5I)\).

Engineering MathsB Tech / BEBSc
01

What the theorem says

Before you start: you need the characteristic equation from eigenvalues and eigenvectors, and matrix multiplication.

Cayley–Hamilton theorem

Every square matrix satisfies its own characteristic equation. If \[|A - \lambda I| = 0 \text{ is } \lambda^n + c_1\lambda^{n-1} + \dots + c_{n-1}\lambda + c_n = 0,\] then \[A^n + c_1A^{n-1} + \dots + c_{n-1}A + c_nI = 0\]

2×2 form

\[A^2 - (\operatorname{tr}A)A + |A|\,I = 0\]

3×3 form

\[A^3 - (\operatorname{tr}A)A^2 + S_2A - |A|\,I = 0\]

Notice the constant term turns into a multiple of \(I\). The right-hand side is the zero matrix, not the number 0.

Why is it true? A short check for 2×2 is to multiply out \(A^2 - (a + d)A + (ad - bc)I\) for \(A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}\): every entry cancels. The general proof uses \((A - \lambda I)\operatorname{adj}(A - \lambda I) = |A - \lambda I|\,I\) and compares powers of \(\lambda\) on both sides. Most questions ask you to verify it or use it, so that is the focus here.

02

Using it for the inverse and for powers

The inverse

Take the 3×3 form and move the last term across: \(A(A^2 - (\operatorname{tr}A)A + S_2I) = |A|\,I\). If \(|A| \ne 0\), divide by \(|A|\):

Inverse from Cayley–Hamilton

\[A^{-1} = \frac{1}{|A|}\Big(A^2 - (\operatorname{tr}A)A + S_2I\Big) \qquad \text{(3×3)}\]

\[A^{-1} = \frac{1}{|A|}\Big((\operatorname{tr}A)I - A\Big) \qquad \text{(2×2)}\]

Higher powers

For a 2×2 matrix, the theorem writes \(A^2\) in terms of \(A\) and \(I\). Multiply by \(A\) and substitute again, and \(A^3\), \(A^4\), and every higher power, also become \(pA + qI\). For a 3×3 matrix every power reduces to \(pA^2 + qA + rI\).

  1. Find the characteristic equation from the trace, \(S_2\) and \(|A|\).
  2. Replace \(\lambda\) by \(A\) and the constant \(c\) by \(cI\).
  3. Verify (if asked) by computing \(A^2\), \(A^3\) and adding up entry by entry.
  4. Rearrange for \(A^{-1}\), or multiply through by \(A\) repeatedly for higher powers.
03

Solved examples

Example 1: Verifying for a 2×2 matrix

Easy

Verify the Cayley–Hamilton theorem for \(A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}\).

  1. \(\operatorname{tr}A = 5\), \(|A| = 4 - 6 = -2\). Characteristic equation: \(\lambda^2 - 5\lambda - 2 = 0\).
  2. \(A^2 = \begin{bmatrix} 7 & 10 \\ 15 & 22 \end{bmatrix}\) and \(5A = \begin{bmatrix} 5 & 10 \\ 15 & 20 \end{bmatrix}\).
  3. \(A^2 - 5A - 2I = \begin{bmatrix} 7 - 5 - 2 & 10 - 10 \\ 15 - 15 & 22 - 20 - 2 \end{bmatrix} = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}\).

Answer\(A^2 - 5A - 2I = 0\), so \(A\) satisfies its characteristic equation.

Example 2: Inverse of a 2×2 matrix

Easy

Use the theorem to find \(A^{-1}\) for \(A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}\).

  1. From Example 1, \(A^2 - 5A - 2I = 0\). Multiply by \(A^{-1}\): \(A - 5I - 2A^{-1} = 0\).
  2. So \(A^{-1} = \tfrac{1}{2}(A - 5I) = \tfrac{1}{2}\begin{bmatrix} -4 & 2 \\ 3 & -1 \end{bmatrix}\).
  3. Check: \(A\cdot\tfrac{1}{2}\begin{bmatrix} -4 & 2 \\ 3 & -1 \end{bmatrix} = \tfrac{1}{2}\begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix} = I\). ✓

Answer\(A^{-1} = \begin{bmatrix} -2 & 1 \\ \tfrac{3}{2} & -\tfrac{1}{2} \end{bmatrix}\)

Example 3: A⁴ and A⁸ for a 2×2 matrix

Medium

For \(A = \begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}\), express \(A^4\) and \(A^8\) in the form \(pA + qI\).

  1. \(\operatorname{tr}A = 2\), \(|A| = 1 - 4 = -3\). So \(A^2 - 2A - 3I = 0\), that is \(A^2 = 2A + 3I\).
  2. \(A^3 = A\cdot A^2 = 2A^2 + 3A = 2(2A + 3I) + 3A = 7A + 6I\).
  3. \(A^4 = A\cdot A^3 = 7A^2 + 6A = 7(2A + 3I) + 6A = 20A + 21I\).
  4. \(A^8 = (A^4)^2 = 400A^2 + 840A + 441I = 400(2A + 3I) + 840A + 441I\).

Answer\(A^4 = 20A + 21I\) and \(A^8 = 1640A + 1641I\)

Example 4: Reducing a polynomial in A

Medium

If \(A = \begin{bmatrix} 1 & 4 \\ 2 & 3 \end{bmatrix}\), find \(A^5 - 4A^4 - 7A^3 + 11A^2 - A - 10I\) in terms of \(A\) and \(I\).

  1. \(\operatorname{tr}A = 4\), \(|A| = 3 - 8 = -5\). So \(A^2 - 4A - 5I = 0\).
  2. Divide \(\lambda^5 - 4\lambda^4 - 7\lambda^3 + 11\lambda^2 - \lambda - 10\) by \(\lambda^2 - 4\lambda - 5\). The quotient is \(\lambda^3 - 2\lambda + 3\) and the remainder is \(\lambda + 5\).
  3. So the expression equals \((A^3 - 2A + 3I)(A^2 - 4A - 5I) + A + 5I\), and the first product is zero by the theorem.

Answer\(A + 5I = \begin{bmatrix} 6 & 4 \\ 2 & 8 \end{bmatrix}\)

Example 5: Verifying for a 3×3 matrix

Exam level

Verify the Cayley–Hamilton theorem for \[A = \begin{bmatrix} 2 & -1 & 1 \\ -1 & 2 & -1 \\ 1 & -1 & 2 \end{bmatrix}\]

  1. \(\operatorname{tr}A = 6\). \(S_2 = (4 - 1) + (4 - 1) + (4 - 1) = 9\). \(|A| = 2(3) + 1(-1) + 1(-1) = 4\).
  2. Characteristic equation: \(\lambda^3 - 6\lambda^2 + 9\lambda - 4 = 0\).
  3. \[A^2 = \begin{bmatrix} 6 & -5 & 5 \\ -5 & 6 & -5 \\ 5 & -5 & 6 \end{bmatrix}, \quad A^3 = \begin{bmatrix} 22 & -21 & 21 \\ -21 & 22 & -21 \\ 21 & -21 & 22 \end{bmatrix}\]
  4. Diagonal entry of \(A^3 - 6A^2 + 9A - 4I\): \(22 - 36 + 18 - 4 = 0\). Entry (1, 2): \(-21 + 30 - 9 = 0\). Entry (1, 3): \(21 - 30 + 9 = 0\). The other entries repeat these by symmetry.

Answer\(A^3 - 6A^2 + 9A - 4I = 0\). Verified.

Example 6: Inverse of a 3×3 matrix

Exam level

Using the theorem, find \(A^{-1}\) for the matrix of Example 5.

  1. Multiply \(A^3 - 6A^2 + 9A - 4I = 0\) by \(A^{-1}\): \(A^2 - 6A + 9I - 4A^{-1} = 0\).
  2. \(A^{-1} = \tfrac{1}{4}(A^2 - 6A + 9I)\). Entry by entry: \(6 - 12 + 9 = 3\), \(-5 + 6 = 1\), \(5 - 6 = -1\), and so on.

Answer\(A^{-1} = \dfrac{1}{4}\begin{bmatrix} 3 & 1 & -1 \\ 1 & 3 & 1 \\ -1 & 1 & 3 \end{bmatrix}\)

Example 7: A⁴ for a 3×3 matrix

Exam level

For the same matrix, express \(A^4\) in terms of \(A^2\), \(A\) and \(I\), and hence find \(A^4\).

  1. From the theorem, \(A^3 = 6A^2 - 9A + 4I\).
  2. \(A^4 = A\cdot A^3 = 6A^3 - 9A^2 + 4A = 6(6A^2 - 9A + 4I) - 9A^2 + 4A = 27A^2 - 50A + 24I\).
  3. Diagonal entry: \(27(6) - 50(2) + 24 = 86\). Entry (1, 2): \(27(-5) - 50(-1) = -85\). Entry (1, 3): \(27(5) - 50(1) = 85\).

Answer\(A^4 = 27A^2 - 50A + 24I = \begin{bmatrix} 86 & -85 & 85 \\ -85 & 86 & -85 \\ 85 & -85 & 86 \end{bmatrix}\)

Vipul Sir's tip

For \(A^8\) don't multiply eight times. Square \(A^4\) and reduce once, as in Example 3. For \(A^{16}\), square \(A^8\). Each squaring step needs only \(A^2 = pA + qI\).

04

Common mistakes

1. Writing a number where \(I\) belongs

\(A^2 - 5A - 2 = 0\) makes no sense: you can't subtract a number from a matrix. Write \(A^2 - 5A - 2I = 0\).

2. Getting the signs of the 3×3 equation wrong

The pattern is \(\lambda^3 - (\operatorname{tr}A)\lambda^2 + S_2\lambda - |A|\): minus, plus, minus. Expanding \(|A - \lambda I|\) directly gives the same thing multiplied by \(-1\), which is fine, but mixing the two forms flips some signs and not others.

3. Using the inverse formula when \(|A| = 0\)

The formula divides by \(|A|\). If \(|A| = 0\) the matrix has no inverse, and the theorem only tells you \(A^3 - (\operatorname{tr}A)A^2 + S_2A = 0\).

05

Practice questions

Try each one on paper before you open the answer.

Q1Verify the theorem for \(\begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix}\).

\(\lambda^2 - 6\lambda + 5 = 0\). \(A^2 = \begin{bmatrix} 7 & 18 \\ 6 & 19 \end{bmatrix}\), and \(A^2 - 6A + 5I = 0\). ✓

Q2Hence find the inverse of \(\begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix}\).

\(A^{-1} = \tfrac{1}{5}(6I - A) = \tfrac{1}{5}\begin{bmatrix} 4 & -3 \\ -1 & 2 \end{bmatrix}\).

Q3For \(A = \begin{bmatrix} 1 & 1 \\ 1 & 0 \end{bmatrix}\), express \(A^5\) as \(pA + qI\).

\(A^2 = A + I\), \(A^3 = 2A + I\), \(A^4 = 3A + 2I\), \(A^5 = 5A + 3I\). (The Fibonacci numbers appear.)

Q4Use the theorem to find \(A^{-1}\) for \(A = \begin{bmatrix} 1 & 2 & 0 \\ 2 & -1 & 0 \\ 0 & 0 & -1 \end{bmatrix}\).

Characteristic equation \(\lambda^3 + \lambda^2 - 5\lambda - 5 = 0\), so \(A^{-1} = \tfrac{1}{5}(A^2 + A - 5I) = \tfrac{1}{5}\begin{bmatrix} 1 & 2 & 0 \\ 2 & -1 & 0 \\ 0 & 0 & -5 \end{bmatrix}\).

Q5For \(A = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix}\), show that \(A^4 = I\) and find \(A^{-1}\).

\(\operatorname{tr}A = 0\), \(|A| = 1\), so \(A^2 + I = 0\), \(A^2 = -I\) and \(A^4 = I\). Also \(A^{-1} = -A\).

Q6If \(A = \begin{bmatrix} 3 & 1 \\ -1 & 2 \end{bmatrix}\), show that \(2A^5 - 3A^4 + A^2 - 4I = 138A - 403I\).

\(A^2 - 5A + 7I = 0\). Dividing \(2\lambda^5 - 3\lambda^4 + \lambda^2 - 4\) by \(\lambda^2 - 5\lambda + 7\) leaves the remainder \(138\lambda - 403\).

Stuck on a question?

Bring it to a free demo class and work through it with Vipul Sir. Book on WhatsApp.

06

Frequently asked questions

What is the Cayley–Hamilton theorem?

Every square matrix satisfies its own characteristic equation. For a 2×2 matrix that means \(A^2 - (\operatorname{tr}A)A + |A|I = 0\).

Can I prove it by putting λ = A in |A − λI| = 0?

No. That "proof" mixes a number with a matrix: \(|A - AI|\) is the determinant of the zero matrix, which is just the number 0, while the theorem is a statement about a matrix. The real proof uses the adjoint of \(A - \lambda I\).

How do you find the inverse using Cayley–Hamilton?

Write the characteristic equation in \(A\), multiply through by \(A^{-1}\) and solve for \(A^{-1}\). For a 2×2 matrix, \(A^{-1} = \dfrac{1}{|A|}\big((\operatorname{tr}A)I - A\big)\).

Does it work for every square matrix?

Yes, any size and any entries, including matrices that are singular or cannot be diagonalised. For powers of diagonalisable matrices, diagonalisation gives a second method.

Related lessons

← All 12 Linear Algebra & DE topics
Vipul Sir
Written by Vipul Sir

Vipul Sir has taught mathematics for over 15 years to HSC, CBSE, ICSE, IGCSE/IB, Diploma, Engineering and BSc students at VVS Classes in Goregaon and Vile Parle, Mumbai. He teaches every class himself, concepts first and exam technique second.

Linear Algebra and Differential Equations

Get Linear Algebra & DE right, with Vipul Sir beside you.

Concept-first classes in small batches in Goregaon and Vile Parle, or online. Your first class is free.

WhatsApp↗