Diagonalization

What you will be able to do

Given a square matrix, the learner can decide whether it is diagonalizable over a stated field, construct P and D when it is with the columns and diagonal entries correctly paired, verify the factorisation, and use it to compute a power of the matrix.

Orientation

Computing A 100 by repeated multiplication is ninety-nine matrix products. If A has a basis of eigenvectors there is a shortcut: rewrite it as P D P − 1 with D diagonal, and

A 100 = P D 100 P − 1 ,

where D 100 is n numbers raised to the hundredth power. The inner factors cancel in pairs, so nothing else survives.

That is the payoff, and it extends: any polynomial in A , the matrix exponential, the long-run behaviour of a repeated process. What makes it work is that in eigenvector coordinates the map never mixes one coordinate into another.

The question is when such a basis exists. The answer is already available from the previous unit, compare the two multiplicities for each eigenvalue, and the two ways it can fail are not alike.

Definition

What P is, and why the order matters

Why A P = P D is the natural form. Read both sides column by column. The j th column of A P is A v j . The j th column of P D is λ j v j , because multiplying on the right by a diagonal matrix scales each column. So A P = P D is precisely the list of statements A v j = λ j v j . The factorisation is the eigenvector equations written at once.

This is also why P must be invertible: rearranging to A = P D P − 1 requires it, and P is invertible exactly when its columns are independent, which is exactly the condition that the eigenvectors form a basis.

Left and right multiplication differ. P D scales the columns of P ; D P scales its rows. Only the first matches the eigenvector equations, so writing A = P − 1 D P instead of P D P − 1 is a genuine error rather than a notational preference. It diagonalises with respect to the wrong basis.

The pairing is positional. Column j of P and entry ( j , j ) of D must belong to the same eigenvalue. Reordering the eigenvectors is allowed provided the diagonal is reordered identically; changing one without the other produces a P and D that fail on multiplication, and the failure is silent until the product is checked.

P is never unique. Scaling any eigenvector by a nonzero constant gives another valid P , since the eigenvector equation is unaffected. An eigenspace of dimension 2 or more admits infinitely many choices of basis. So "the diagonalization" is a mild abuse: D is determined up to the order of its entries, and P is not determined at all.

Similar matrices. A and B are similar when B = P − 1 A P for some invertible P . Similar matrices are the same map written in two bases, which is why they share eigenvalues, characteristic polynomial, determinant, trace and rank. Diagonalization asks whether the simplest possible representative, a diagonal matrix, is available in the similarity class.

Figure

A linear map in the standard basis and in its eigenbasis

in the eigenbasis the map scales each axis independently

The same map A = ( 4 1 2 3 ) described twice, in two separate coordinate frames, each with its own origin. Image arrows are drawn to a common scale so both panels fit; the lengths are proportional, and the ratios are what matter.

Left, standard coordinates. A sends e 1 to ( 4 , 2 ) and e 2 to ( 1 , 3 ) . Neither image lies along the vector it came from, so each output coordinate depends on both inputs. That mixing is what the off-diagonal entries record, and it is why A 100 cannot be read off A .

Right, eigenvector coordinates. The axes are now v 1 = ( 1 , 1 ) and v 2 = ( 1 , − 2 ) , with their eigenlines faint behind them. A sends v 1 to 5 v 1 and v 2 to 2 v 2 : each axis is scaled, nothing crosses over. In these coordinates the map is D = ( 5 0 0 2 ) , and the zeros are the absence of mixing.

P and P − 1 translate between the two pictures:

x → P − 1 eigenvector coordinates → D scale each axis → P A x .

Read right to left in A = P D P − 1 . This is a different question from the eigenvalue figure, which asks which directions survive; here the directions are known, and the point is that adopting them as axes turns a mixing matrix into a list of scale factors. It is also why A k = P D k P − 1 : the round trip cancels in the middle.

Theorem

The criterion, and why distinct eigenvalues suffice

Theorem. A is diagonalizable over F if and only if the eigenspace dimensions sum to n ; equivalently, the characteristic polynomial splits over F and geometric multiplicity equals algebraic multiplicity for every eigenvalue.

Proof. Suppose A = P D P − 1 . The columns of P are independent and each satisfies A v j = λ j v j , so they are n independent eigenvectors and the eigenspaces jointly contain a basis; their dimensions therefore sum to at least n , and to exactly n since they are independent subspaces of an n -dimensional space.

Conversely, if the dimensions sum to n , collect a basis from each eigenspace. Eigenvectors for distinct eigenvalues are independent, so the collection is independent, and having n elements it is a basis. Taking those as the columns of P gives A P = P D with P invertible. ◼

Lemma (independence across eigenvalues). Eigenvectors belonging to distinct eigenvalues are linearly independent.

Proof sketch. Suppose not, and take a shortest vanishing combination ∑ i c i v i = 0 with all c i ≠ 0 and the λ i distinct. Apply A to get ∑ i c i λ i v i = 0 , and subtract λ 1 times the original to get ∑ i ≥ 2 c i ( λ i − λ 1 ) v i = 0 . Every coefficient is nonzero because the eigenvalues are distinct, and the combination is shorter, contradicting minimality. ◼

Corollary. n distinct eigenvalues force diagonalizability: each has algebraic multiplicity 1, so its geometric multiplicity is 1 as well by the bound from the previous unit, and the total is n .

The converse fails. I has one eigenvalue of algebraic multiplicity n , geometric multiplicity n , and is already diagonal. Repeated eigenvalues are compatible with diagonalizability whenever the eigenspace is large enough, so a repeated root is a reason to compute the eigenspace, never a verdict on its own.

What fails when the criterion fails. Two separate things, which the non-example block separates. The polynomial may not split over F , in which case a larger field repairs it. Or some eigenvalue may have geometric multiplicity below its algebraic multiplicity, in which case nothing repairs it: the rank of A − λ I does not change under field extension, so a defective matrix is defective over every field containing its eigenvalues. The best available representative is then the Jordan form, which is block-diagonal rather than diagonal.

Procedure

Deciding, building, and checking

  1. Find the eigenvalues with their algebraic multiplicities, over the stated field.
  2. If the polynomial does not split, stop: not diagonalizable over this field. Say whether it would be over a larger one.
  3. For each eigenvalue, compute a basis of E λ . The number of basis vectors is the geometric multiplicity.
  4. Sum the geometric multiplicities. Equal to n : diagonalizable. Less than n : defective, and no field repairs it.
  5. Build P with those basis vectors as columns, in any order you choose.
  6. Build D with the matching eigenvalues on the diagonal, in the same order. Each eigenvalue repeated as often as its eigenvectors appear.
  7. Check. Verify A P = P D column by column. This is cheaper than forming P − 1 and catches a pairing error immediately.

Shortcuts for step 1–4.

SituationVerdict without further work
n distinct eigenvaluesdiagonalizable
triangular with distinct diagonal entriesdiagonalizable; eigenvalues are the diagonal
real symmetricdiagonalizable, and by an orthogonal P
already diagonal P = I , D = A

When you need P − 1 . Only for A = P D P − 1 itself or for computing powers. For a 2 × 2 ,

( a b c d ) − 1 = 1 a d − b c ( d − b − c a ) .

Computing a power. A k = P D k P − 1 , with D k obtained by raising each diagonal entry to the k th power. Multiply left to right: P times D k scales the columns of P , then multiply by P − 1 . The result must have integer entries when A does, which is a useful check on the arithmetic.

The check worth running at the end. The trace of D must equal the trace of A , and the product of the diagonal of D must equal det A . Both are free and catch a mis-transcribed eigenvalue.

Worked example

Diagonalizing a matrix and taking its fifth power

A = ( 4 1 2 3 ) .

Steps 1–4: the verdict. From the eigenvalue unit, p ( λ ) = λ 2 − 7 λ + 10 with roots λ = 5 and λ = 2 , each of algebraic multiplicity 1, and

E 5 = span ⁡ { ( 1 , 1 ) } , E 2 = span ⁡ { ( 1 , − 2 ) } .

Two distinct real eigenvalues, so the geometric multiplicities are each 1 and sum to 2 = n . Diagonalizable over R , and the corollary would have told us so from distinctness alone.

Steps 5–6: build P and D . Taking the eigenvectors in the order ( 1 , 1 ) then ( 1 , − 2 ) :

P = ( 1 1 1 − 2 ) , D = ( 5 0 0 2 ) .

Column 1 of P is the eigenvector for 5, and D 11 = 5 . The pairing is what makes the next step work.

Step 7: check A P = P D .

A P = ( 4 1 2 3 ) ( 1 1 1 − 2 ) = ( 5 2 5 − 4 ) ,
P D = ( 1 1 1 − 2 ) ( 5 0 0 2 ) = ( 5 2 5 − 4 )

The columns say exactly A ( 1 , 1 ) T = 5 ( 1 , 1 ) T and A ( 1 , − 2 ) T = 2 ( 1 , − 2 ) T .

The inverse. det P = ( 1 ) ( − 2 ) − ( 1 ) ( 1 ) = − 3 , so

P − 1 = 1 − 3 ( − 2 − 1 − 1 1 ) = ( 2 / 3 1 / 3 1 / 3 − 1 / 3 ) .

Confirming the factorisation: P D P − 1 = ( 4 1 2 3 ) = A , and equivalently P − 1 A P = ( 5 0 0 2 ) = D .

The fifth power. D 5 = diag ⁡ ( 5 5 , 2 5 ) = diag ⁡ ( 3125 , 32 ) , so

A 5 = P D 5 P − 1 = ( 1 1 1 − 2 ) ( 3125 0 0 32 ) ( 2 / 3 1 / 3 1 / 3 − 1 / 3 ) = ( 2094 1031 2062 1063 ) .

Computing A 5 by four successive multiplications gives the same matrix. The entries are integers, as they must be since A has integer entries. A useful check that the fractions in P − 1 cancelled correctly.

Why the cancellation works.

A 2 = ( P D P − 1 ) ( P D P − 1 ) = P D ( P − 1 P ) D P − 1 = P D 2 P − 1 ,

and the same collapse repeats, leaving A k = P D k P − 1 for every k . Nothing about the argument depends on k being small.

Both eigenvalues exceed 1, so every nonzero vector grows under repetition; since 5 > 2 , the E 5 component grows faster and dominates. After enough applications almost every vector points nearly along ( 1 , 1 ) , which is visible in A 5 , whose columns are close to proportional to ( 1 , 1 ) relative to their size.

Example

Four verdicts

Distinct eigenvalues: decided without computing an eigenspace. B = ( 2 0 0 1 3 0 4 5 − 1 ) is lower triangular, so its eigenvalues are 2 , 3 and − 1 , three distinct values in a 3 × 3 . Each det ( B − λ I ) = 0 . By the corollary it is diagonalizable, and no eigenspace need be computed to know that. Computing them is still required to build P .

Already diagonal. diag ⁡ ( 7 , − 2 ) is diagonalizable with P = I and D equal to itself. This is the case a procedure should recognise rather than grind through.

Repeated eigenvalue, still diagonalizable. S = 3 I = ( 3 0 0 3 ) has the single eigenvalue 3 with algebraic multiplicity 2. Here S − 3 I is the zero matrix, so its kernel is all of R 2 and the geometric multiplicity is 2 as well. Every nonzero vector is an eigenvector; any basis of R 2 serves as the columns of P . The sum of geometric multiplicities is 2, so the criterion is met.

This is the case that refutes "repeated root means defective". The repetition is compatible with diagonalizability; the size of the eigenspace decides it.

Repeated eigenvalue, defective. Q = ( 3 1 0 3 ) has the same characteristic polynomial ( λ − 3 ) 2 as S , same eigenvalue, same algebraic multiplicity. But Q − 3 I = ( 0 1 0 0 ) has rank 1, so its kernel is one-dimensional: E 3 = span ⁡ { ( 1 , 0 ) } .

The geometric multiplicities sum to 1, short of 2, so Q is not diagonalizable. Any attempted P would need two columns drawn from a one-dimensional space, making them dependent and P singular, for instance ( 1 1 0 0 ) has determinant 0.

The decisive pair. S and Q have identical characteristic polynomials and opposite verdicts. Nothing visible in the polynomial distinguishes them; the rank of A − λ I does. That is why step 3 of the procedure cannot be skipped whenever an eigenvalue repeats.

Non-example

Two obstructions, and three mistakes

Obstruction 1: the polynomial does not split. R = ( 0 − 1 1 0 ) has p ( λ ) = λ 2 + 1 , with no real roots. Over R there are no eigenvalues at all, so certainly no basis of eigenvectors, and R is not diagonalizable there.

Over C the roots are ± i , distinct, so R is diagonalizable with D = diag ⁡ ( i , − i ) and columns ( 1 , − i ) and ( 1 , i ) . The obstruction was the field, and enlarging it removed the obstruction entirely.

Obstruction 2: not enough eigenvectors. Q = ( 3 1 0 3 ) has p ( λ ) = ( λ − 3 ) 2 , which splits over R already. There is no larger field to move to. The failure is that rank ⁡ ( Q − 3 I ) = 1 , so E 3 is one-dimensional and only one independent eigenvector exists.

Rank is unchanged by field extension, so Q is not diagonalizable over C either, nor over any field containing 3. This obstruction is permanent, and the Jordan form ( 3 1 0 3 ) , already in that form, is the best available.

---

Mistake: concluding from the repeated root. " ( λ − 3 ) 2 , so not diagonalizable." S = 3 I has the same polynomial and is diagonal. The root's multiplicity permits a shortfall without implying one; only dim ⁡ E λ decides.

Mistake: mismatching P and D . Listing eigenvectors as columns in one order and eigenvalues on the diagonal in another. Each column then satisfies the wrong equation, A P ≠ P D , and the error is silent until the product is checked, which is why the check is step 7 rather than optional.

Mistake: writing A = P − 1 D P . The correct form is A = P D P − 1 with the eigenvectors as the columns of P . The reversed version diagonalises with respect to the wrong basis and gives wrong answers for powers, while looking symmetric enough to pass unexamined.

The distinction to carry. Missing roots are a property of the field and are removable. Missing eigenvectors are a property of the matrix and are not. Reporting "not diagonalizable" without saying which one applies leaves out the part that decides whether anything can be done about it.

Optional enrichment (1)

Application

Repeated processes and the dominant eigenvalue

A process that applies the same linear step each period has state x k = A k x 0 , and diagonalization turns that into arithmetic.

Writing the start in eigenvector coordinates. With a basis of eigenvectors, x 0 = c 1 v 1 + ⋯ + c n v n , and applying A scales each term by its own eigenvalue:

x k = c 1 λ 1 k v 1 + ⋯ + c n λ n k v n .

Every question about the long run is now a question about the λ i k .

The dominant eigenvalue decides. If one eigenvalue is strictly largest in magnitude, say | λ 1 | > | λ i | for all i ≠ 1 , then dividing by λ 1 k leaves every other term shrinking to zero. So for large k ,

x k ≈ c 1 λ 1 k v 1 ,

provided c 1 ≠ 0 : the state ends up pointing along v 1 whatever it started as, growing by a factor of about λ 1 per period.

For the worked example's A , the eigenvalues are 5 and 2. The ratio ( 2 / 5 ) k falls below 1% by k = 6 , so after six steps the state is within about a percent of the ( 1 , 1 ) direction, visible already in A 5 , whose columns are nearly proportional.

The three regimes. | λ 1 | > 1 gives unbounded growth; | λ 1 | < 1 gives decay to zero; | λ 1 | = 1 with the rest smaller gives convergence to a fixed multiple of v 1 . The last is the case that matters for a process meant to settle: a stochastic matrix has λ 1 = 1 with eigenvector the stationary distribution, and the second-largest magnitude sets how fast it is approached.

Differential equations. For x ′ ( t ) = A x ( t ) the same substitution gives x ( t ) = c 1 e λ 1 t v 1 + ⋯ + c n e λ n t v n , so each eigenvector direction evolves independently at its own exponential rate. Stability is then a statement about signs: every solution decays exactly when all eigenvalues have negative real part.

Where the reading needs care. It assumes a basis of eigenvectors; a defective matrix produces terms like k λ k instead, which is why the Jordan form exists. It assumes a strictly dominant eigenvalue; a complex pair of equal magnitude gives rotation rather than convergence. And it assumes c 1 ≠ 0 . A start exactly inside another eigenspace stays there forever.

Next step

Practice Diagonalization

Practice this

Results update as you type. Use the up and down arrow keys to move between results, Enter to open one, and Escape to close.

Type to search.

Settings

Appearance

Interface density

Your record

Your progress is stored in this browser and nowhere else: an identifier, the answers you have given, the mastery states and review schedule derived from them, and the lesson you last opened. Clearing it makes you a new learner on this device. It cannot be undone, and it will not affect your appearance or density settings.

Focus timer

Focus--minutes remaining

Phase

Kept in this browser only, and used to label the session in your own history.

Today

Nothing recorded yet. Finish a focus session and it will appear here.

Settings

Focus sessions between long breaks.

Sessions you are aiming for in a day.

Notifications

Your history

Sessions are stored in this browser and nowhere else. They are not evidence and never reach your mastery record.