Artificial Intelligence 🤖
Matrices
The Cayley-Hamilton theorem

The Cayley-Hamilton theorem

The characteristic equation of a square matrix AA is given by Eq. (10.90). The CayleyHamilton theorem states that any n×nn \times n matrix AA solves its own characteristic equation, that is

χA(A)=0,\chi_{A}(A)=0,

where the RHS of Eq. (10.118) is the n×nn \times n zero matrix. Consider the matrix,

A=(2123)A=\left(\begin{array}{ll} 2 & 1 \\ 2 & 3 \end{array}\right)

The characteristic polynomial is

det(AλI)=λ2τλ+Δ,=λ25λ+4.\begin{aligned} \operatorname{det}(A-\lambda I) & =\lambda^{2}-\tau \lambda+\Delta, \\ & =\lambda^{2}-5 \lambda+4 . \end{aligned}

We now show that

A25A+4I=0A2=(2123)(2123)=(651011).A25A+4I=(651011)5(2123)+4(1001),=0\begin{aligned} & A^{2}-5 A+4 I=0 \\ A^{2}= & \left(\begin{array}{ll} 2 & 1 \\ 2 & 3 \end{array}\right)\left(\begin{array}{ll} 2 & 1 \\ 2 & 3 \end{array}\right)=\left(\begin{array}{cc} 6 & 5 \\ 10 & 11 \end{array}\right) . \\ A^{2}-5 A+4 I & =\left(\begin{array}{cc} 6 & 5 \\ 10 & 11 \end{array}\right)-5\left(\begin{array}{ll} 2 & 1 \\ 2 & 3 \end{array}\right)+4\left(\begin{array}{ll} 1 & 0 \\ 0 & 1 \end{array}\right), \\ & =0 \end{aligned}

Application of the Cayley-Hamilton theorem to finding inverses

Continuing from the example above, we have shown that

A25A+4I=0A^{2}-5 A+4 I=0

multiplying both sides by A1A^{-1} gives,

A5I+4A1=0;A-5 I+4 A^{-1}=0 ;

this rearranges to,

A1=14(5IA)A^{-1}=\frac{1}{4}(5 I-A)

Plugging in AA in Eq. (10.120),

A1=14((5005)(2123))=(3/41/41/21/2).A^{-1}=\frac{1}{4}\left(\left(\begin{array}{ll} 5 & 0 \\ 0 & 5 \end{array}\right)-\left(\begin{array}{ll} 2 & 1 \\ 2 & 3 \end{array}\right)\right)=\left(\begin{array}{cc} 3 / 4 & -1 / 4 \\ -1 / 2 & 1 / 2 \end{array}\right) .

It is always a good idea to check that A1A=IA^{-1} A=I,

(3/41/41/21/2)(2123)=(1001)\left(\begin{array}{cc} 3 / 4 & -1 / 4 \\ -1 / 2 & 1 / 2 \end{array}\right)\left(\begin{array}{ll} 2 & 1 \\ 2 & 3 \end{array}\right)=\left(\begin{array}{ll} 1 & 0 \\ 0 & 1 \end{array}\right) \checkmark

Example 10.12 Find A1A^{-1} using the Cayley-Hamilton theorem for a matrix AA given by,

A=(312122225)A=\left(\begin{array}{ccc} 3 & -1 & 2 \\ -1 & 2 & 2 \\ 2 & -2 & 5 \end{array}\right)

Solution To use the Cayley-Hamilton theorem, we first need to determine the characteristic equation. With the row transformation (R1R2)(R1)\left(R_{1}-R_{2}\right) \rightarrow\left(R_{1}\right) on AλIA-\lambda I, we have

χA(λ)=4λλ3012λ2225λ=(4λ)2λ225λ(λ3)1225λ=λ310λ230λ+29.\begin{aligned} \chi_{A}(\lambda) & =\left|\begin{array}{ccc} 4-\lambda & \lambda-3 & 0 \\ -1 & 2-\lambda & 2 \\ 2 & -2 & 5-\lambda \end{array}\right| \\ & =(4-\lambda)\left|\begin{array}{cc} 2-\lambda & 2 \\ -2 & 5-\lambda \end{array}\right|-(\lambda-3)\left|\begin{array}{cc} -1 & 2 \\ 2 & 5-\lambda \end{array}\right| \\ & =-\lambda^{3}-10 \lambda^{2}-30 \lambda+29 . \end{aligned}

By Cayley-Hamilton, we have the following expression in terms of the matrix AA,

A310A230A+29I=0-A^{3}-10 A^{2}-30 A+29 I=0

We take A1A^{-1} on both sides which gives,

A210A30I+29A1=0,-A^{2}-10 A-30 I+29 A^{-1}=0,

and this gives the inverse in the form,

A1=A2+10A+30I29.A^{-1}=\frac{A^{2}+10 A+30 I}{29} .

We now need to determine the matrices on the RHS of Eq. (10.124),

A2=(312122225)(312122225)=(149141112181625);A2+10A+30I=(149141112181625)10(149141112181625)+30(100010001)=(14169118245).\begin{aligned} A^{2}= & \left(\begin{array}{ccc} 3 & -1 & 2 \\ -1 & 2 & 2 \\ 2 & -2 & 5 \end{array}\right)\left(\begin{array}{ccc} 3 & -1 & 2 \\ -1 & 2 & 2 \\ 2 & -2 & 5 \end{array}\right)=\left(\begin{array}{ccc} 14 & -9 & 14 \\ -1 & 1 & 12 \\ 18 & -16 & 25 \end{array}\right) ; \\ A^{2}+10 A+30 I & =\left(\begin{array}{ccc} 14 & -9 & 14 \\ -1 & 1 & 12 \\ 18 & -16 & 25 \end{array}\right)-10\left(\begin{array}{ccc} 14 & -9 & 14 \\ -1 & 1 & 12 \\ 18 & -16 & 25 \end{array}\right)+30\left(\begin{array}{ccc} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{array}\right) \\ & =\left(\begin{array}{ccc} 14 & 1 & -6 \\ 9 & 11 & -8 \\ -2 & 4 & 5 \end{array}\right) . \end{aligned}

This gives us the inverse as,

129(14169118245)\frac{1}{29}\left(\begin{array}{ccc} 14 & 1 & -6 \\ 9 & 11 & -8 \\ -2 & 4 & 5 \end{array}\right)