Characteristic Polynomials and the Cayley–Hamilton Theorem
We chase down which matrices can actually be diagonalized — starting with characteristic polynomials, hitting complex eigenvalues, and landing on the Cayley–Hamilton theorem.
Some original drawings have corrections. Read the notes on those drawings alongside the worked steps.
Picking up right where we left off. The big question we’ve been chasing: “can every matrix be diagonalized?!”
Right now we’re setting up an equation of degree $n$ from a determinant to find the eigenvalues, and… common sense says there could be times when we don’t get $n$ eigenvalues out of it!!
So which matrices get diagonalized, and which ones don’t?
① When we can’t find the eigenvalues
The first case: the degree-$n$ equation in
has “no solution” (we can’t find the eigenvalues).
![]()
Anyway, since we’re hunting for the solutions of
, let me slap a definition on the determinant in that equation:
, the characteristic polynomial of $A$. So:
![]()
That’s the definition. If we call an eigenvalue $\lambda$, then
, right? And if
![]()
then the eigenvalues are
!!
Hold on, let me try an example.
![]()
That’s what we get. Whoa, there’s no solution…..
Ah… well, “no solution” is a bit of a stretch… There’s no solution in the reals, sure, but if we let ourselves play in the complex numbers, there are solutions, the imaginary roots. So in other words: over the real numbers, this matrix can’t be diagonalized.
And if we extend to the complex numbers,
![]()
we can find the eigenvalues,
, and the eigenvectors that go with them,
![]()
like so. And if we build the matrix $R$,
, and then diagonalize,
![]()
it comes out like this.
Side note!! A polynomial over the complex numbers can always, no exceptions, be factored into first-degree factors. That’s called the Fundamental Theorem of Algebra.
So as you can see, the result can change depending on which field we work over.
Up to now we didn’t really care which field we were doing linear algebra over; we just used the handy real numbers like it went without saying. From here on out, I think we’ll have to keep a close eye on which field we’re playing on.
Anyway, so there’s the case where the eigenvalues don’t exist…..
② The eigenvalues exist, but we can’t find their eigenvectors
Could that even happen?!

Then for each
we have to find the matching
, but
— can each one really, really, REALLY get a (nonzero) value that satisfies this equation?!
Answer: Yes, it can!!
Since
, the dimension of the column space of the matrix
— that is, the dimension of the image,
— is at most $n-1$, no matter how big it gets. ($\le n-1$)
Why~~? Because the image of the
can’t have dimension $n$. If the image had dimension $n$, that matrix would be invertible, and then it couldn’t satisfy
. Okey-dokey?
So by the Dimension Theorem, the kernel of
must, no exceptions, have dimension at least 1?! And what does a kernel of dimension at least 1 mean? It means there’s at least one nonzero vector that the matrix
sends to 0.
So!!
— each one really, really, REALLY gets a (nonzero) value that satisfies this equation!!
And let’s check this one too, just for fun.
When we stack
up neatly into the matrix $R$,

let’s check whether this matrix $R$ really, always comes out invertible.
So let me make an assumption: “Suppose $R$ is not invertible.” $R$ not being invertible means
are linearly dependent!! Which means
![]()
the $c_1$ ~ $c_n$ that satisfy this don’t all have to be 0. Among
, let me pull out the nonzero
, $k$ of them (I’ll number them 1 ~ $k$). Then dropping the zeros and writing only what’s left,
![]()
we get this. Now let me multiply the left side of this equation by the matrix $A$.
![]()
Whoa,
![]()
we can write it like this, since the eigenvalue equation holds for all $k$ vectors. Let me multiply the left of this by $A$ again.
![]()
Keep~~ multiplying.
![]()
That way we can make $k$ equations. Now let me gather the $k$ vectors $X_i$ into a matrix, call it $B$, and write it like this.

That’s what I mean. You get what the rightmost part means, right?!…..?
And if we write the $k$ equations above using this matrix $B$,

we can write it like this, right?? I jotted some extra explanation underneath.

For the Vandermonde matrix, check the earlier #15: The Adjoint Matrix (Linear Algebra I Studied #15)
So what’s the conclusion? We get $B = 0$. But a matrix built like $B$, out of eigenvectors, can’t be 0 (an eigenvector is never the zero vector), so what kind of result is this~~ This is what we call a contradiction. Meaning the ‘assumption’ itself was wrong.
So the conclusion: if $\lambda_1$ ~ $\lambda_n$ are all different, diagonalization ALWAYS works!!
OK OK OK OK OK, we now know that when
are all different, diagonalization always works. Now someone gets nitpicky: “Hey hey hey hey, what if even one pair of them coincides???” you might ask.
③ The characteristic polynomial has repeated roots
(Conclusion: it might be diagonalizable, it might not.)
![]()
In this case we only find one root,
. So it’ll fetch just one eigenvector too, right???
Nope!! It might fetch 2.

It works out like this, so we can say “for $X_1$, ANY vector goes!?”, and
![]()
we can bring in two linearly independent vectors like this.
did the work of two all by itself. That is,
![]()
so $R^{-1}AR = A' = A = I$. (Well duh, it was already diagonal, so diagonalizing it one more time just spits the same thing back;;;)
But!! The question is whether it ALWAYS goes like that.
Somehow I’ve got a feeling it might not.
![]()
Same as before?!
. But this time, the eigenvectors just won’t make two linearly independent vectors…..
![]()
Conclusion:
![]()
If the characteristic polynomial comes out with its $n$ roots all piled up like this, there are two cases lol: diagonalizable, or not~
Let me make the situation above more general. Above, we watched all~~ $n$ eigenvalues land on one value; instead of all $n$ coinciding, let’s look at the case where each one repeats its own number of times.
The characteristic polynomial of some matrix $A$:

You get why the $m_i$’s below add up to $n$, right?! The characteristic polynomial has to be a polynomial of degree $n$ in $t$!! Right?!
Here
is called the multiplicity!! It just means “how many times is this root repeated~~?”
Then for the matrix to be diagonalizable, each root has to bring along at least as many linearly independent vectors as its own multiplicity. (If some eigenvalue brings fewer than its multiplicity, some other eigenvalue would have to bring more eigenvectors than its own multiplicity. But that can’t happen. An eigenvalue can never, ever bring more than its own multiplicity. I’ll skip the proof; it gets way too long.)

We have to gather $n$ of these $X$’s and build an invertible $R$!! ⟨That vectors belonging to different eigenvalues are linearly independent, we already proved above.⟩
That’s it! What you need to take away here:
has to bring along as many linearly independent
’s as its own multiplicity.
That’s the conclusion for now, and I’ll stop the conclusions here. To go deeper we’d need the decomposition theorem, and we’re doing that waaaaay~~ later! Don’t worry heh heh heh. I’ll copy-paste this conclusion and bring it along when we do the decomposition theorem!! Yep yep yep.
The Cayley-Hamilton theorem
OK, finally, something we learned in high school… Not technically in the curriculum, but every teacher told us to memorize it anyway: let me wrap up this post by proving the Cayley-Hamilton theorem with the characteristic polynomial.

Holy cow, that’s wild,
![]()
this equation gets proven this easily!?
But what’s even more amazing is that this holds for $n \times n$ too. Let me go through $n \times n$ case by case. If $A$ is diagonalizable,
![]()
it factors into $n$ linear factors like this, and if we plug in $A$,
![]()
How on earth can we say THIS is 0?!
OK OK OK OK, didn’t we say $A$ is diagonalizable?!

That means this is possible,

and this holds too, so
![]()
this equation — let me play with it like this.
![]()
Then we can write it like this.


Let’s also look at the general case, where $A$ isn’t diagonalizable. Then we can wrap this up.
It’s a sli~~ghtly different direction, but I’ll use the adjoint matrix. We could write this:
![]()
Now,


I wrote it like this!! If the adjoint is hazy, check #15: The Adjoint Matrix (Linear Algebra I Studied #15)
Now let me compare the two sides of that equation, power by power. The notation needs some high-level technique that’s a real pain to type in the equation editor, so I’ll swap in a photo.

You see what I was trying to write?! Now let me add up all the left sides and right sides, zwoop!~~

Then we get this.
We’ve shown that
holds!! This is called the Cayley-Hamilton theorem!!
A little preview of the next post
OK, let me give a little preview of the next post and move on.
Out of the zillions of polynomials in the world, is the characteristic polynomial reaaally the only one that turns into 0 when you plug the matrix $A$ in for the variable?!
Never mind the characteristic polynomial; if we set our minds to it, it kinda feels like we could cook up plenty more?!
Hmm!! So I want to define this: the set of all, all the polynomials that turn into 0 when you plug the matrix $A$ in for the variable, I’ll call it
. Let me add just a tiny bit more and define this much:
![]()
Remember this notation?? I introduced it almost at the very beginning.
Anyway, naturally, the polynomial
is an element of
. But besides the characteristic polynomial, if we look at a few more elements of
, we can find them like this. If we have

a matrix like this, its characteristic polynomial is
![]()
and so
![]()
holds. BUT!!!
![]()
doesn’t this hold too?!
(We’ll learn it later, but apparently that one’s called the minimal polynomial,
.)
So why is this a problem? (From where I’m sitting) it’s a real head-scratcher. The set
apparently has this property:
![]()
Don’t you smell something?!
To understand diagonalization, we ended up exploring something more primitive than diagonalization, ‘blocking’, and we came all this way to do the ‘decomposition theorem’ later on, the one that says “through blocking, we’ll get to diagonalization”.
To really get the decomposition theorem, we need to know the characteristic polynomial better; to understand the characteristic polynomial better, we need to know
better; and to understand
better, apparently we need to understand ‘polynomials’ better. But to understand polynomials well, we need to know fields better, and to know fields better, apparently we need to know the ‘integers’ better…….
So the next post will be a session laying down the ‘background knowledge’ for the decomposition theorem.
Heads-up. The figures here are the original notes, slips and all. A few things to watch for:
- In the $2 \times 2$ Cayley–Hamilton picture, the first matrix should be $A^2 = \begin{pmatrix} a^2 + bc & ab + bd \\ ca + dc & cb + d^2 \end{pmatrix}$; with it, $A^2 - (a + d)A + (ad - bc)I$ is the zero matrix, as the picture says.
- In the coefficient-comparison pictures, the degree $n - 1$ row should end in $a_{n-1}I$, not $a_nI$ (the summed line below uses $a_{n-1}A^{n-1}$ correctly).
Questions or corrections?
Did a step lose you, or does a number look off? Email me or use the contact page. Include the note title and the step or figure you mean.
Feedback goes to me privately by email; it is not posted as a public comment.