Every quaternion $q = a + v$, with scalar part $a$ and vector part $v$, satisfies a quadratic equation with real coefficients. Since $v^2 = -\lvert v \rvert^2$ (see vectors),

$$q^2 = a^2 + 2av + v^2 = a^2 - \lvert v \rvert^2 + 2av,$$

and so

$$q^2 - 2a\,q + \lvert q \rvert^2 = 0, \qquad \lvert q \rvert^2 = a^2 + \lvert v \rvert^2.$$

A quaternion is a root of a real polynomial of degree 2, just as a complex number $z$ is a root of $z^2 - 2\operatorname{Re}(z)\,z + \lvert z \rvert^2 = 0$. In the Lectures on Quaternions of 1853 Hamilton went further and showed that certain linear functions of quaternions also satisfy a polynomial equation of their own, which he used to compute their inverses.

For matrices

Five years later, in 1858, Arthur Cayley published his Memoir on the Theory of Matrices, which founded matrix algebra, and there stated the result in general: every square matrix $A$ annihilates its characteristic polynomial, $p(\lambda) = \det(\lambda I - A)$. Cayley checked the $2 \times 2$ case, said he had verified the $3 \times 3$ case, and did not bother to prove the general case. The first complete proof is due to Ferdinand Georg Frobenius, in 1878. The theorem bears the names of Cayley and Hamilton.

For a $2 \times 2$ matrix,

$$A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}, \qquad p(\lambda) = \lambda^2 - (a + d)\,\lambda + (ad - bc),$$

and the theorem says that

$$A^2 - (a + d)\,A + (ad - bc)\,I = 0.$$

The middle coefficient is the trace; the last, the determinant.

An example

For $A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}$ the trace is $5$ and the determinant is $-2$. Indeed,

$$A^2 = \begin{pmatrix} 7 & 10 \\ 15 & 22 \end{pmatrix}, \qquad A^2 - 5A = \begin{pmatrix} 2 & 0 \\ 0 & 2 \end{pmatrix} = 2I,$$

and so $A^2 - 5A - 2I = 0$. This equality gives the inverse for free: $A(A - 5I) = 2I$, hence

$$A^{-1} = \frac{A - 5I}{2} = \frac12\begin{pmatrix} -4 & 2 \\ 3 & -1 \end{pmatrix} = \begin{pmatrix} -2 & 1 \\ 1.5 & -0.5 \end{pmatrix}.$$
Exercise: checking the inverse

Multiply $A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}$ by the inverse found above.

$\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}\begin{pmatrix} -2 & 1 \\ 1.5 & -0.5 \end{pmatrix} = \begin{pmatrix} -2 + 3 & 1 - 1 \\ -6 + 6 & 3 - 2 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}$. The inverse is right, and no system of equations had to be solved.

Exercise: powers without much multiplying

For $A = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix}$, use the theorem to write $A^3$ as a combination of $A$ and $I$, and compute it.

The trace is $4$ and the determinant $3$, so $A^2 = 4A - 3I$. Hence $A^3 = 4A^2 - 3A = 4(4A - 3I) - 3A = 13A - 12I = \begin{pmatrix} 14 & 13 \\ 13 & 14 \end{pmatrix}$. Checking: $A^2 = \begin{pmatrix} 5 & 4 \\ 4 & 5 \end{pmatrix}$ and $A^2 A = \begin{pmatrix} 14 & 13 \\ 13 & 14 \end{pmatrix}$.

Sources: William Rowan Hamilton, Lectures on Quaternions (1853) · Arthur Cayley, “A Memoir on the Theory of Matrices”, Philosophical Transactions (1858) · Ferdinand Georg Frobenius, “Über lineare Substitutionen und bilineare Formen”, Journal für die reine und angewandte Mathematik (1878) · Thomas Hawkins, The Mathematics of Frobenius in Context (2013).


All topics on William Rowan Hamilton · ← Vectors and scalars: Hamilton’s words · The Icosian game and Hamiltonian cycles →

Image credits.