Module 1: Matrices and Linear Algebra
Lesson 7
The Cayley Hamilton Theorem and Applications
7.1 Introduction
The Cayley Hamilton theorem is one of the most powerful results in linear algebra.
This theorem basically gives a relation between a square matrix and its
characteristic polynomial. One important application of this theorem is to find
inverse and higher powers of matrices.
7.2 The Cayley Hamilton Theorem
The Cayley Hamilton theorem states that:
Theorem 7.2.1: Every square matrix satisfies its own characteristic equation.
That is if A is a matrix of size n and χA (λ) = a0 + a1λ + . . . + an −1λn − 1 + λn = 0 is
the characteristic equation of A then
χA (A) = a0I + a1A + . . . + an − 1An − 1 + An = 0n × n
where 0n × n is the zero matrix of size n, and for any positive integer i, Ai is the
product A × A . . . × A of i number of A.
1 2
Example7.2.1: Let A = . Characteristic equation is λ – 4λ – 5 = 0. One
2
4 3
9 8 4 8
can check that A2 = , 4A = . So
16 17 16 12
The Cayley Hamilton Theorem and Applications
9 8 4 8 5 0
A2 – 4A – 5I = – – .
16 17 16 12 0 5
9−4−5 8 −8 − 0 0 0
= = .
16 − 16 − 0 17 − 12 − 5 0 0
The Cayley-Hamilton theorem can be used to find inverse as well as higher powers
of a matrix.
7.3 Method to Find Inverse
Here we consider a square matrix A of size n and its characteristic polynomial χA
(λ) = det (A- λ I) =a0 + a1λ + . . . + an − 1λn − 1 + λn. The following is a well known
result for matrices.
Theorem 7.3.1: If χA (λ) = det (A- λ I) =a0 + a1λ + . . . + an − 1λn − 1 + λn is the
characteristic polynomial of a square matrix A then determinant of A is equal to (−
1)n a0.
The following is an immediate consequence of the above theorem.
Corollary 7.3.1: A is invertible if and only if a0 ≠ 0.
In light of the above results to find inverse of A we should have a0 ≠ 0. By the
Cayley- Hamilton theorem we have
a0I + a1A + . . . + an − 1An − 1 + An = 0.
or A(a1I + a2A + . . . + An − 1) = – a0 I.
The Cayley Hamilton Theorem and Applications
1
or A{ − ( a1I + a2A + . . . + An − 1)} = I.
a0
1
Therefore A− 1 = − ( a1I + a2A + . . . + An − 1) which is a formula for inverse of A.
a0
We will illustrate this method in the example below.
2 −1 1
Example 7.3.1: Here we find inverse of the matrix A = 3 −2 1 applying
0 0 1
Cayley- Hamilton theorem. One finds that the characteristic equation of A is
det (A − λI) = − λ3 + λ2 + λ – 1 = 0.
The matrix A is invertible because a0 = − 1 ≠ 0. By the Cayley-Hamilton theorem
–A3 + A2 + A – I = 0.
or A(– A2 + A + I) = I.
1 0 2 2 −1 1 1 0 0
or A− 1 = – A2 + A + I = − 0 1 2 + 3 −2 1 + 0 1 0
0 0 1 0 0 1 0 0 1
2 −1 −1
= 3 −2 −1 .
0 0 1
7.4 Computation of powers of A
Applying Cayley-Hamilton theorem we can also find higher powers of a square
matrix. For this we need a famous theorem of algebra called the division algorithm,
which is stated below.
The Cayley Hamilton Theorem and Applications
Theorem 7.4.1: (Division Algorithm) For any polynomials f(x) and g(x) over a
field F there exist polynomials q(x) and r(x) such that f(x) = q(x) g(x) + r(x) where
r(x) = 0 or deg r(x) < deg g(x).
The polynomial r(x) is called remainder polynomial.
Here we shall discuss about a method that finds value of higher degree polynomial
on a square matrix A and in particular the value of higher power of A. The method
as follows:
Step 1: Let A be a square matrix of size n and f(A) be a polynomial in A of any
finite degree m, usually m > n.
Step 2: Compute the characteristic polynomial χ(A) of A. From division algorithm
we get f(A) = q(A) χ(A) + r(A), where q(A) and r(A) are polynomials in A and deg
r(A) < deg χ(A) or r(A) = 0.
Step 3: From Cayley-Hamilton theorem we get χ(A) = 0. Therefore f(A) = r(A),
that is f(A) is equal to a polynomial in A of degree less than n. Then we compute
r(A) which involves at the most n unknown constants and up to (n − 1)th powers of
A, that is, r(A) can be written as:
r(A) = a0I + a1A + . . . + an − 1An − 1.
To find r(A) one has to compute the co-efficients a0 , a1 , . . . , an − 1 and powers of
A. We use the eigenvalues of A to find these co-efficients. This procedure is
divided into two cases depending on the eigenvalues are distinct or not.
The Cayley Hamilton Theorem and Applications
Step 4: In this case we assume that A has distinct eigenvalues λ1, λ2, . . . , λn. From
Cayley-Hamilton theorem we have f(A) = r(A). Therefore
f(λi) = r(λi) for all i = 1, 2, . . . , n, that is
f(λ1) = r(λ1) = a0 + a1λ1 + a2λ12 + . . . + an − 1λ1n − 1.
f(λ2) = r(λ2) = a0 + a1λ2 + a2λ22 + . . . + an − 1λ2n − 1
f(λn) = r(λn) = a0 + a1λn + a2λn2 + . . . + an − 1λnn − 1
Solving this system one finds the values a0 , a1 , . . . , an-1, since f(λi) and λi, 1 ≤ i ≤
n, are known.
Step 5: In this step we consider the case that A has multiple eigenvalues. If λi is an
eigenvalue of A of multiplicity k then we differentiate the equation f(λi) = r(λi) k –
1 times, and get k equations:
f(λi) = r(λi).
df ( λ ) dr ( λ )
= .
=
dλ λ λ=
dλ λ λi
i
d ( k-1) f ( λ ) d ( k-1) r ( λ )
= .
dλ dλ
=λ λ=
i λ λi
The Cayley Hamilton Theorem and Applications
This is how one gets a system of n equations using all the eigenvalues of A and
from this system the values of a0, a1 , . . . , an can be determined.
2 −1
Example 7.4.1: Here we shall find the value of f(A) = A78, for A =
5
,
2
applying Cayley-Hamilton theorem. Characteristic polynomial of A is
det (A − λI) = λ2 − 7λ + 12. Eigenvalues are 3 and 4. Since characteristic
polynomial of A is of degree 2 the remainder will be of degree at the most one.
Therefore
A78 = a0 I + a1A (7.1)
378 = a0 I + 3a1
478 = a0 I + 4a1
On solving we get a1 = − 378 + 478 and a0 = 4 × 378 – 3 × 478. Putting this value in
(7.1),
2 x 378 − 478 378 − 478
A78 = .
−2 x 3 + 2 x 4 −378 + 2 x 478
78 78
1 0 1
Example 7.4.2: For the matrix A = 0 1 0 , we find the value of f(A) = A10 –
0 0 2
5A6 + 2A3.
The Cayley Hamilton Theorem and Applications
Eigenvalues of the matrix A are 1, 1 and 2. Since the characteristic polynomial is
of degree 3 we get
f(A) = a0I + a1A + a2A2 = r(A).
For eigenvalue 2 we get the equation
210 – 5 × 26 + 2 × 23 = a0 + 2a1 + 4a2 (7.2)
Since 1 is a eigenvalue of multiplicity two we get equations
df ( λ ) dr ( λ )
f(1) = r(1) and = . That is,
=
d λ λ 1=
d λ λ 1
− 2 = a0 + a1 + a2 and − 14 = a1 + 2a2 (7.3)
From (7.2) and (7.3) we have the system
a0 + 2a1 + 4a2 = 720
a0 + a1 + a2 = − 2
a1 + 2a2 = − 14
On solving this system we get a0 = 748, a1 = − 1486 and a2 = 736.
Thus f(A) = A10 – 5A6 + 2A3 = 748 I – 1486 A + 736 A2.
The Cayley Hamilton Theorem and Applications
1 0 3
A2 = 0 1 0 .
0 0 4
1 0 0 1 0 1 1 0 3
Now f(A) = 748 0 1 0 + (− 1486) 0 1 0 + 736 0 1 0 =
0 0 1 0 0 2 0 0 4
−2 0 722
0 −2 0 .
0 0 1720
7.5. Conclusions
In this lecture we have seen that how powerful the Cayley-Hamilton theorem and
the concept of eigenvalues are? In the next lecture also we shall use the theory of
eigenvalues for diagonalization of matrices.
Keywords: Cayley Hamilton theoem, division algorithm, inverse of matrices,
power of marices.
Suggested Readings:
Linear Algebra, Kenneth Hoffman and Ray Kunze, PHI Learning pvt. Ltd., New
Delhi, 2009.
Linear Algebra, A. R. Rao and P. Bhimasankaram, Hindustan Book Agency, New
Delhi, 2000.
Linear Algebra and Its Applications, Fourth Edition, Gilbert Strang, Thomson
Books/Cole, 2006.
The Cayley Hamilton Theorem and Applications
Matrix Methods: An Introduction, Second Edition, Richard Bronson, Academic
press, 1991.