Linear transformations and diagonalisation — exam-style exercises with a filter that wipes out greys, powers with two eigenvalues and a parameter that decides everything (and the P that did not match its D)

In the class mock exam on this topic I diagonalised a 3 × 3 matrix correctly and still lost half a point: I had put the eigenvectors in one order and the eigenvalues in another. Every calculation was right; PP and DD just did not go together, so P−1APP^{-1}AP did not give my DD. If I had checked AP=PDAP = PD with a single column, I would have seen it in ten seconds. That slip is the first snippet in «What is wrong here?».

How to use this article

First of all, how this counts in the AG exam. The exam mark is EX=(T+P)/2EX = (T + P)/2: TT is a 20-question test taken from the Campus quizzes and PP is written exercises. If EX≥4.5EX \ge 4.5, the final mark is 0.7⋅EX+C+TP0.7 \cdot EX + C + TP (the quizzes and the lab assignments, up to 1.5 points each); otherwise, the final mark is EXEX. The sums are done for you in the AG grade calculator.

This topic carries the most weight in the written part: in recent years’ exams there is always an exercise on an endomorphism with a parameter, with kernel and image, diagonalisation depending on the parameter and a power AnA^n. So here you have exercises in the format of an exam question (with points and marking criteria), the last one exactly as it appears, and a 20-question quiz like the Campus one for the T part.

  1. Do each exercise on paper, without a calculator, with every system row reduced and every rank justified.
  2. Compare with the expected result and, if it does not match, open the hint before looking at the solution.
  3. Read «What is wrong here?» trying to find the mistake yourself before reading the explanation.
  4. Take the quiz at the end and check everything in MATLAB.
  5. If you get stuck on method, go back to the guided practice, which has the same kinds of problem solved step by step.

If you want to see what the 2 × 2 matrices in these exercises do, the Plane transformations simulator deforms the grid with the matrix you type, marks the directions that do not turn and shows you AnA^n step by step.

Exercise 1 (basic level): the filter that wipes out greys

Exercise 1. [3 points] An «edges» filter turns each colour into two numbers: f(R,G,B)=(R−G,  G−B)f(R, G, B) = (R – G,\; G – B). a) (1 point) Write the associated matrix in the standard bases and compute f(5,2,1)f(5, 2, 1). b) (1 point) Compute a basis and the dimension of Ker⁡(f)\operatorname{Ker}(f) and of Im⁡(f)\operatorname{Im}(f). c) (1 point) Is it injective? Surjective? Compute the preimage of (1,1)(1, 1).

Expected result: AA is 2×32 \times 3; f(5,2,1)=(3,1)f(5, 2, 1) = (3, 1); the kernel is the line of greys, with basis {(1,1,1)}\{(1, 1, 1)\}; the image is the whole of R2\mathbb{R}^2; surjective yes, injective no; the preimage of (1,1)(1, 1) is a line through (2,1,0)(2, 1, 0).

Before computing anything, look at the dimensions: f:R3→R2f : \mathbb{R}^3 \to \mathbb{R}^2. Can it be injective? And for the kernel, think about which colours have R=GR = G and G=BG = B at the same time.

Exercise 2 (intermediate level): two eigenvalues and their powers

Exercise 2. [4 points] Let the endomorphism of R2\mathbb{R}^2 be f(x,y)=(4x−2y,  x+y)f(x, y) = (4x – 2y,\; x + y). a) (1 point) Compute its eigenvalues and a basis of each eigenspace. b) (1 point) Justify that it is diagonalisable and give PP and DD. c) (1 point) Compute the matrix of ff in the basis B′={(1,1),  (2,1)}B' = \{(1, 1),\; (2, 1)\} with A′=C−1ACA' = C^{-1}AC and explain the result. d) (1 point) Compute AnA^n and check the formula with n=1n = 1.

Expected result: eigenvalues 2 and 3, with eigenvectors (1,1)(1, 1) and (2,1)(2, 1); A′A' is diagonal; An=(2⋅3n−2n2n+1−2⋅3n3n−2n2n+1−3n)A^n = \begin{pmatrix} 2 \cdot 3^n – 2^n & 2^{n+1} – 2 \cdot 3^n \\ 3^n – 2^n & 2^{n+1} – 3^n \end{pmatrix}.

Two distinct real eigenvalues in a 2 × 2 matrix are enough to diagonalise, without computing any multiplicity. In c), look at which vectors make up B′B' before multiplying.

Exercise 3 (challenge): this is how it appears in the exam

Exercise 3. [10 points] Let f:R3→R3f : \mathbb{R}^3 \to \mathbb{R}^3 be given by f(x,y,z)=(x+y,  x+y,  ky)f(x, y, z) = (x + y,\; x + y,\; ky), with k∈Rk \in \mathbb{R}. a) (3 points) Depending on the values of kk, compute a basis and the dimension of Ker⁡(f)\operatorname{Ker}(f) and of Im⁡(f)\operatorname{Im}(f), and justify whether ff is bijective. b) (4 points) Study for which values of kk the matrix AA of ff in the standard basis is diagonalisable over R\mathbb{R}. c) (3 points) For the value of kk found in b), compute PP, DD and AnA^n.

Expected result: the eigenvalues are 0 (double) and 2 for every kk; ff is never bijective; the kernel has dimension 1 if k≠0k \neq 0 and 2 if k=0k = 0; AA is diagonalisable only if k=0k = 0, and then An=2n−1AA^n = 2^{n-1}A.

The eigenvalue 0 is directly related to the kernel: U0=Ker⁡(f)U_0 = \operatorname{Ker}(f). As soon as you have a) done, half of b) is too. And for c), if AnA^n comes out with all its numbers equal to 2n−12^{n-1}, look at AA again.

What is wrong here?

Three classmates’ solutions with one mistake each. Read the solution, try to find the flaw and then read the explanation.

Snippet 1: the P that did not match its D

A = | 2 1 1 |   eigenvalues: 1 (double) and 4
    | 1 2 1 |   U1 = <(-1,1,0), (-1,0,1)>    U4 = <(1,1,1)>
    | 1 1 2 |

P = | 1 -1 -1 |        D = | 1 0 0 |
    | 1  1  0 |            | 0 1 0 |
    | 1  0  1 |            | 0 0 4 |

Predict: does this PP satisfy P−1AP=DP^{-1}AP = D?

No. In PP, the first column is (1,1,1)(1, 1, 1), the eigenvector of λ=4\lambda = 4, but in DD the first number is a 1. Checking that column is enough: A(1,1,1)=(4,4,4)A(1, 1, 1) = (4, 4, 4), while the first column of PDPD is 1⋅(1,1,1)1 \cdot (1, 1, 1). The eigenvectors and eigenvalues are correct; what fails is the order. With this PP, the right DD is diag⁡(4,1,1)\operatorname{diag}(4, 1, 1).

P and D must go togetherThe same P on both sides, with the eigenvector (1, 1, 1) of eigenvalue 4 in the first column. On the left, D starts with 1 and the diagonalisation fails. On the right, D starts with 4 and it works.What they wroteCorrect (with that P)1-1-1110101P100010004Dcolumn 1 = (1, 1, 1) → λ = 4but D starts with 1: AP ≠ PD1-1-1110101P400010001Dcolumn 1 = (1, 1, 1) → λ = 4D starts with 4: AP = PD
Column j of P and entry (j, j) of D are a pair.

Building PP and DD separately. First write the list of pairs (eigenvector, eigenvalue) and copy each pair at once: the vector in column jj of PP and its eigenvalue in position (j,j)(j, j) of DD.

The AP=PDAP = PD check is done column by column and needs no P−1P^{-1}: AA times column jj of PP must be the number djjd_{jj} times that same column.

Snippet 2: real, therefore diagonalisable

A = | 2 1 0 |
    | 0 2 0 |      |A - λI| = (2 - λ)^2 (3 - λ)
    | 0 0 3 |

Eigenvalues: 2, 2 and 3. They are all real, so A is diagonalisable
and D = diag(2, 2, 3).

Predict: is it diagonalisable?

No. All eigenvalues being real is only the first condition. The second one is still missing for the double eigenvalue:

A−2I=(010000001),rg⁡(A−2I)=2,d2=3−2=1≠2 A – 2I = \begin{pmatrix} 0 & 1 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 1 \end{pmatrix}, \qquad \operatorname{rg}(A – 2I) = 2, \qquad d_2 = 3 – 2 = 1 \neq 2

The eigenvalue 2 has only one direction of eigenvectors, (1,0,0)(1, 0, 0). The corner (2102)\begin{pmatrix} 2 & 1 \\ 0 & 2 \end{pmatrix} is a shear like the one in the theory. There is no basis of eigenvectors, so it is not diagonalisable and that DD does not exist.

Stopping at the first condition. The Campus quizzes often ask about this with an option like «all eigenvalues are real» marked as sufficient: it is not. The full condition is «real and with mλ=dλm_\lambda = d_\lambda for every one».

Snippet 3: the change of basis turned around

f(x, y) = (x + 2y, 3y)     A = | 1 2 |      B' = {(1, 0), (1, 1)}
                               | 0 3 |
C = | 1 1 |     C^-1 = | 1 -1 |
    | 0 1 |            | 0  1 |

A' = C · A · C^-1 = | 1 1 | | 1 2 | | 1 -1 | = | 1 5 | | 1 -1 | = | 1 4 |
                    | 0 1 | | 0 3 | | 0  1 |   | 0 3 | | 0  1 |   | 0 3 |

Predict: is that the matrix of ff in B′B'?

No: with CC going from B′B' to the standard basis (the vectors of B′B' in columns), the formula is A′=C−1ACA' = C^{-1}AC. The arithmetic in the solution is right, but it is the wrong product. The correct one:

AC=(1203)(1101)=(1303),A′=C−1(AC)=(1−101)(1303)=(1003) AC = \begin{pmatrix} 1 & 2 \\ 0 & 3 \end{pmatrix}\begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix} = \begin{pmatrix} 1 & 3 \\ 0 & 3 \end{pmatrix}, \qquad A' = C^{-1}(AC) = \begin{pmatrix} 1 & -1 \\ 0 & 1 \end{pmatrix}\begin{pmatrix} 1 & 3 \\ 0 & 3 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 3 \end{pmatrix}

Diagonal! That was a clue something was off: B′B' is exactly the eigenvectors of AA (f(1,1)=(3,3)f(1, 1) = (3, 3)), so in that basis ff had to come out diagonal. The check with the definition confirms it: f(1,1)=(3,3)=0⋅(1,0)+3⋅(1,1)f(1, 1) = (3, 3) = 0 \cdot (1, 0) + 3 \cdot (1, 1), coordinates (0,3)(0, 3), which is the second column of the right one.

Memorising «CC, AA, C−1C^{-1}» without knowing what CC is. Ask yourself what each matrix does to a vector of new coordinates, right to left: first go to the old basis (CC), then apply AA, then come back to the new one (C−1C^{-1}).

Solutions

Exercise 1

Before the working, the plan. All three parts come from the matrix A A : f(5,2,1) f(5, 2, 1) is a product, the rank gives the dimensions in b) and the preimage in c) is a system. That’s why it’s worth making sure of it.

There are two ways to write it, and it pays to know both, because each one checks the other:

  • By rows: each output coordinate is a row with its coefficients. R−G R – G gives the row (1,−1,0) (1, -1, 0) and G−B G – B gives (0,1,−1) (0, 1, -1) .
  • By columns: column j j is the image of basis vector j j . f(1,0,0)=(1,0) f(1, 0, 0) = (1, 0) , f(0,1,0)=(−1,1) f(0, 1, 0) = (-1, 1) and f(0,0,1)=(0,−1) f(0, 0, 1) = (0, -1) : exactly the three columns below.

Writing the coefficients of R−G R – G as a column. You get a 3×2 3 \times 2 matrix, and that alone tells you it’s wrong: it has to take in colours of three numbers and give back two.

a) The coefficients in rows (one row per output coordinate):

f(R,G,B)=(1R−1G+0B,  0R+1G−1B)  ⇒  A=(1−1001−1) f(R, G, B) = (1R – 1G + 0B,\; 0R + 1G – 1B) \;\Rightarrow\; A = \begin{pmatrix} 1 & -1 & 0 \\ 0 & 1 & -1 \end{pmatrix}

It is 2×32 \times 3: three columns because it starts in R3\mathbb{R}^3, two rows because it lands in R2\mathbb{R}^2. And f(5,2,1)=(5−2,  2−1)=(3,1)f(5, 2, 1) = (5 – 2,\; 2 – 1) = (3, 1).

b) AA is already in echelon form and has two pivots: rg⁡(A)=2\operatorname{rg}(A) = 2. So dim⁡Im⁡=2\dim\operatorname{Im} = 2 and dim⁡Ker⁡=3−2=1\dim\operatorname{Ker} = 3 – 2 = 1.

Kernel: R−G=0R – G = 0 and G−B=0G – B = 0, that is, R=G=BR = G = B. With B=tB = t free:

Ker⁡(f)={(t,t,t):t∈R},BKer⁡={(1,1,1)} \operatorname{Ker}(f) = \{(t, t, t) : t \in \mathbb{R}\}, \qquad B_{\operatorname{Ker}} = \{(1, 1, 1)\}

These are the greys: the edges filter turns all of them into (0,0)(0, 0), because a grey has no differences between channels.

Image: a subspace of R2\mathbb{R}^2 of dimension 2, so it is the whole of R2\mathbb{R}^2. A basis: the pivot columns, {(1,0),  (−1,1)}\{(1, 0),\; (-1, 1)\}, or the standard one.

For c), the obvious route would be to go to the definition (are there two different colours with the same image?) and look for an example. No need: b) already answers it.

  • Injective means kernel equal to {0⃗} \{\vec 0\} . Here it’s a line: (0,0,0) (0, 0, 0) and (1,1,1) (1, 1, 1) both give (0,0) (0, 0) .
  • Surjective means image equal to the whole target space. Dimension 2 inside R2 \mathbb{R}^2 : yes.

The preimage of (1,1) (1, 1) is every colour the filter turns into (1,1) (1, 1) : the kernel’s system, with (1,1) (1, 1) on the right instead of zeros. That’s why it comes out with the same shape as the kernel (one parameter), just shifted:

StepEquationWhat you getWhy
1B=t B = t B=t B = t B B has no pivot: it’s the free variable, as in the kernel
2G−B=1 G – B = 1 G=1+t G = 1 + t Solved from the bottom up
3R−G=1 R – G = 1 R=2+t R = 2 + t With G G already known

c) It is not injective (Ker⁡≠{0⃗}\operatorname{Ker} \neq \{\vec 0\}); it is surjective (dim⁡Im⁡=2=dim⁡R2\dim\operatorname{Im} = 2 = \dim\mathbb{R}^2). The preimage of (1,1)(1, 1): R−G=1R – G = 1 and G−B=1G – B = 1. With B=tB = t: G=t+1G = t + 1, R=t+2R = t + 2:

f−1(1,1)={(2+t,  1+t,  t)}={(2,1,0)+t(1,1,1)} f^{-1}(1, 1) = \{(2 + t,\; 1 + t,\; t)\} = \{(2, 1, 0) + t(1, 1, 1)\}

A particular solution plus the kernel, as always. Check: f(2,1,0)=(1,1)f(2, 1, 0) = (1, 1).

Why it is done this way: in b), the rank first gives both dimensions without solving anything, and it acts as a check: the kernel must come out with a single parameter. In c), writing the preimage as «particular + kernel» shows you understand where it comes from.

How it is marked (rough split, mine, not the official one):

PartWhat is assessedPoints
a)2×32 \times 3 matrix laid out correctly0.5
a)f(5,2,1)f(5, 2, 1)0.5
b)Rank and both dimensions0.25
b)Kernel basis0.5
b)Image basis0.25
c)Injective and surjective, justified0.5
c)Preimage of (1,1)(1, 1)0.5

Exercise 2

a) With A=(4−211)A = \begin{pmatrix} 4 & -2 \\ 1 & 1 \end{pmatrix}:

∣A−λI∣=(4−λ)(1−λ)+2=λ2−5λ+6=(λ−2)(λ−3) |A – \lambda I| = (4 – \lambda)(1 – \lambda) + 2 = \lambda^2 – 5\lambda + 6 = (\lambda – 2)(\lambda – 3)

Eigenvalues 2 and 3 (check: 2+3=5=tr⁡(A)2 + 3 = 5 = \operatorname{tr}(A), 2⋅3=6=∣A∣2 \cdot 3 = 6 = |A|).

Now the eigenvectors. The plan is always the same: for each eigenvalue, solve (A−λI)v⃗=0⃗ (A – \lambda I)\vec v = \vec 0 . And before solving there’s a free check: since ∣A−λI∣=0 |A – \lambda I| = 0 exactly at the eigenvalues, the two rows of A−λI A – \lambda I must be proportional. With λ=2 \lambda = 2 , (2,−2) (2, -2) is twice (1,−1) (1, -1) ; with λ=3 \lambda = 3 , both rows are (1,−2) (1, -2) . That’s why each one gives a single equation.

The rows don’t come out proportional and you carry on anyway. Then the system only has the solution (0,0) (0, 0) , and zero is not an eigenvector. If it happens to you, the mistake is earlier: in the polynomial or when subtracting λ \lambda on the diagonal.

  • λ=2\lambda = 2: A−2I=(2−21−1)A – 2I = \begin{pmatrix} 2 & -2 \\ 1 & -1 \end{pmatrix}, equation x−y=0x – y = 0. BU2={(1,1)}B_{U_2} = \{(1, 1)\}.
  • λ=3\lambda = 3: A−3I=(1−21−2)A – 3I = \begin{pmatrix} 1 & -2 \\ 1 & -2 \end{pmatrix}, equation x−2y=0x – 2y = 0. BU3={(2,1)}B_{U_3} = \{(2, 1)\}.

b) Two distinct real eigenvalues in dimension 2: both are simple, m=d=1m = d = 1 for each. Diagonalisable:

P=(1211),D=(2003) P = \begin{pmatrix} 1 & 2 \\ 1 & 1 \end{pmatrix}, \qquad D = \begin{pmatrix} 2 & 0 \\ 0 & 3 \end{pmatrix}

c) B′B' is the eigenvectors, in the same order: C=PC = P. So A′=P−1AP=D=(2003)A' = P^{-1}AP = D = \begin{pmatrix} 2 & 0 \\ 0 & 3 \end{pmatrix}. Doing the sums, with ∣C∣=1−2=−1|C| = 1 – 2 = -1 and C−1=(−121−1)C^{-1} = \begin{pmatrix} -1 & 2 \\ 1 & -1 \end{pmatrix}:

AC=(4−211)(1211)=(2623),C−1(AC)=(−121−1)(2623)=(2003) AC = \begin{pmatrix} 4 & -2 \\ 1 & 1 \end{pmatrix}\begin{pmatrix} 1 & 2 \\ 1 & 1 \end{pmatrix} = \begin{pmatrix} 2 & 6 \\ 2 & 3 \end{pmatrix}, \qquad C^{-1}(AC) = \begin{pmatrix} -1 & 2 \\ 1 & -1 \end{pmatrix}\begin{pmatrix} 2 & 6 \\ 2 & 3 \end{pmatrix} = \begin{pmatrix} 2 & 0 \\ 0 & 3 \end{pmatrix}

It comes out diagonal because in the eigenvector basis ff only stretches: (1,1)(1, 1) by 2 and (2,1)(2, 1) by 3.

For d), the obvious route would be to multiply: A2=(14−105−1) A^2 = \begin{pmatrix} 14 & -10 \\ 5 & -1 \end{pmatrix} , A3=(46−3819−11) A^3 = \begin{pmatrix} 46 & -38 \\ 19 & -11 \end{pmatrix} … and look for a pattern. None shows up, and the exam asks for a formula for any n n . Diagonalisation fixes this for two reasons:

  • Powers of a diagonal matrix are done entry by entry: Dn D^n has 2n 2^n and 3n 3^n on the diagonal, with no multiplying at all.
  • When you multiply A=PDP−1 A = PDP^{-1} by itself, the P−1P P^{-1}P in the middle cancels: A2=PDP−1PDP−1=PD2P−1 A^2 = PDP^{-1}PDP^{-1} = PD^2P^{-1} , and the same for any n n .

So the plan is: P−1 P^{-1} , then DnP−1 D^nP^{-1} , then P P in front. You already have P−1 P^{-1} from c), because C=P C = P .

Check you’ve got it: what does the formula for A^n give with n = 3?

(46−3819−11) \begin{pmatrix} 46 & -38 \\ 19 & -11 \end{pmatrix} , the same as multiplying.

Step by step: 33=27 3^3 = 27 and 23=8 2^3 = 8 . Top row, 2⋅27−8=46 2 \cdot 27 – 8 = 46 and 24−2⋅27=16−54=−38 2^4 – 2 \cdot 27 = 16 – 54 = -38 . Bottom row, 27−8=19 27 – 8 = 19 and 16−27=−11 16 – 27 = -11 . It’s a better check than n=1 n = 1 : if you write 22n 2^{2n} instead of 2n+1 2^{n+1} , with n=1 n = 1 both are 4 and you don’t notice; with n=3 n = 3 , 64 and 16.

d) An=PDnP−1A^n = PD^nP^{-1}. First DnP−1D^nP^{-1} (row 1 times 2n2^n, row 2 times 3n3^n):

DnP−1=(−2n2⋅2n3n−3n) D^nP^{-1} = \begin{pmatrix} -2^n & 2 \cdot 2^n \\ 3^n & -3^n \end{pmatrix}
An=(1211)(−2n2n+13n−3n)=(2⋅3n−2n2n+1−2⋅3n3n−2n2n+1−3n) A^n = \begin{pmatrix} 1 & 2 \\ 1 & 1 \end{pmatrix}\begin{pmatrix} -2^n & 2^{n+1} \\ 3^n & -3^n \end{pmatrix} = \begin{pmatrix} 2 \cdot 3^n – 2^n & 2^{n+1} – 2 \cdot 3^n \\ 3^n – 2^n & 2^{n+1} – 3^n \end{pmatrix}

With n=1n = 1: (6−24−63−24−3)=(4−211)=A\begin{pmatrix} 6 – 2 & 4 – 6 \\ 3 – 2 & 4 – 3 \end{pmatrix} = \begin{pmatrix} 4 & -2 \\ 1 & 1 \end{pmatrix} = A. Correct.

Why it is done this way: in c) the point is to recognise that B′B' is the eigenvectors; whoever sees it writes DD with no calculation (and does the sums only to check). In d), multiplying DnP−1D^nP^{-1} first is easier than PDnPD^n, because DnD^n multiplies whole rows.

How it is marked (rough split, mine, not the official one):

PartWhat is assessedPoints
a)Polynomial and eigenvalues0.5
a)Both eigenvectors0.5
b)Justification (distinct ⇒ diagonalisable) and PP, DD matching1
c)A′A' and the explanation of why it is diagonal1
d)AnA^n multiplied correctly0.75
d)Check with n=1n = 10.25

Exercise 3

A=(1101100k0) A = \begin{pmatrix} 1 & 1 & 0 \\ 1 & 1 & 0 \\ 0 & k & 0 \end{pmatrix}

a) The third column is zero, so ∣A∣=0|A| = 0 for every kk: ff is never bijective. The rank, row reducing (r2→r2−r1r_2 \to r_2 – r_1):

(1100000k0) \begin{pmatrix} 1 & 1 & 0 \\ 0 & 0 & 0 \\ 0 & k & 0 \end{pmatrix}
  • If k≠0k \neq 0: two non-zero rows, rg⁡(A)=2\operatorname{rg}(A) = 2. dim⁡Im⁡=2\dim\operatorname{Im} = 2, dim⁡Ker⁡=1\dim\operatorname{Ker} = 1. Kernel: x+y=0x + y = 0 and ky=0ky = 0, so y=0y = 0, x=0x = 0 and zz free: BKer⁡={(0,0,1)}B_{\operatorname{Ker}} = \{(0, 0, 1)\}. Image: columns 1 and 2 of AA, BIm⁡={(1,1,0),  (1,1,k)}B_{\operatorname{Im}} = \{(1, 1, 0),\; (1, 1, k)\} (or, subtracting them, {(1,1,0),  (0,0,1)}\{(1, 1, 0),\; (0, 0, 1)\}).
  • If k=0k = 0: one non-zero row, rg⁡(A)=1\operatorname{rg}(A) = 1. dim⁡Im⁡=1\dim\operatorname{Im} = 1, dim⁡Ker⁡=2\dim\operatorname{Ker} = 2. Kernel: x+y=0x + y = 0, with y,zy, z free: BKer⁡={(−1,1,0),  (0,0,1)}B_{\operatorname{Ker}} = \{(-1, 1, 0),\; (0, 0, 1)\}. Image: BIm⁡={(1,1,0)}B_{\operatorname{Im}} = \{(1, 1, 0)\}.

For b), what you need to decide before the working is how to get the eigenvalues without k k getting into everything.

The obvious route would be Sarrus: six products to check one by one, with k k inside. But the third column of A−λI A – \lambda I is (0,0,−λ) (0, 0, -\lambda) : expanding along it leaves a single term, and when you cross out row 3 for its minor, k k goes with it. That’s why the eigenvalues don’t depend on k k : k k can only change the eigenspaces.

After that, only one eigenvalue matters:

  • λ=2 \lambda = 2 is simple, so 1≤d2≤m2=1 1 \le d_2 \le m_2 = 1 : it’s 1 for sure, with no working.
  • λ=0 \lambda = 0 is double, and d0 d_0 can be 1 or 2. Since A−0I=A A – 0I = A , d0=3−rg⁡(A) d_0 = 3 – \operatorname{rg}(A) , and you already have that rank from a).
Check you’ve got it: why don’t you need the eigenspace of 2 in b)?

Because 2 is a simple eigenvalue, and the eigenspace of a simple eigenvalue always has dimension 1.

Step by step: that dimension lies between 1 (every eigenvalue has at least one eigenvector) and the multiplicity, which is 1. Only a repeated eigenvalue can stop you diagonalising. The eigenspace of 2 is needed in c), to build P P .

b) Expanding ∣A−λI∣|A – \lambda I| along the third column (only −λ-\lambda remains, in position (3,3)(3, 3)):

∣A−λI∣=−λ∣1−λ111−λ∣=−λ[(1−λ)2−1]=−λ⋅λ(λ−2)=−λ2(λ−2) |A – \lambda I| = -\lambda\begin{vmatrix} 1 – \lambda & 1 \\ 1 & 1 – \lambda \end{vmatrix} = -\lambda\left[(1 – \lambda)^2 – 1\right] = -\lambda \cdot \lambda(\lambda – 2) = -\lambda^2(\lambda – 2)

Eigenvalues λ=0\lambda = 0, double, and λ=2\lambda = 2, simple, real and free of kk. The simple one has d2=1d_2 = 1. For λ=0\lambda = 0, A−0I=AA – 0I = A and its eigenspace is the kernel from a):

  • If k≠0k \neq 0: d0=dim⁡Ker⁡=1≠2d_0 = \dim\operatorname{Ker} = 1 \neq 2. Not diagonalisable.
  • If k=0k = 0: d0=2=m0d_0 = 2 = m_0. Diagonalisable.
The kernel decides the diagonalisationFor eigenvalue 0, the eigenspace is the kernel. If k = 0, the rank is 1, the kernel has dimension 2 and the matrix is diagonalisable. If k is not 0, the rank is 2, the kernel has dimension 1 and it is not.λ = 0 double: U₀ = Ker(f) and d₀ = 3 − rg(A)k = 0rg(A) = 1dim Ker = 2 = m₀Ker basis: {(−1,1,0), (0,0,1)}diagonalisablek ≠ 0rg(A) = 2dim Ker = 1 ≠ 2Ker basis: {(0,0,1)}not diagonalisable
With eigenvalue 0, part a) already solves half of part b).

c) With k=0k = 0, A=(110110000)A = \begin{pmatrix} 1 & 1 & 0 \\ 1 & 1 & 0 \\ 0 & 0 & 0 \end{pmatrix}. We already have the basis of U0U_0 from a). For λ=2\lambda = 2:

A−2I=(−1101−1000−2)  ⇒  x=y,  z=0,  BU2={(1,1,0)} A – 2I = \begin{pmatrix} -1 & 1 & 0 \\ 1 & -1 & 0 \\ 0 & 0 & -2 \end{pmatrix} \;\Rightarrow\; x = y,\; z = 0,\; B_{U_2} = \{(1, 1, 0)\}
P=(−101101010),D=(000000002),P−1=(−1212000112120) P = \begin{pmatrix} -1 & 0 & 1 \\ 1 & 0 & 1 \\ 0 & 1 & 0 \end{pmatrix}, \qquad D = \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 2 \end{pmatrix}, \qquad P^{-1} = \begin{pmatrix} -\tfrac12 & \tfrac12 & 0 \\ 0 & 0 & 1 \\ \tfrac12 & \tfrac12 & 0 \end{pmatrix}

For n≥1n \ge 1, Dn=diag⁡(0,0,2n)D^n = \operatorname{diag}(0, 0, 2^n): only the third row of P−1P^{-1} survives, multiplied by 2n2^n:

DnP−1=(0000002n−12n−10),An=P⋅DnP−1=(2n−12n−102n−12n−10000)=2n−1A D^nP^{-1} = \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 2^{n-1} & 2^{n-1} & 0 \end{pmatrix}, \qquad A^n = P \cdot D^nP^{-1} = \begin{pmatrix} 2^{n-1} & 2^{n-1} & 0 \\ 2^{n-1} & 2^{n-1} & 0 \\ 0 & 0 & 0 \end{pmatrix} = 2^{n-1}A

It makes sense: A2=2AA^2 = 2A (check it: (1111)2=(2222)\begin{pmatrix} 1 & 1 \\ 1 & 1 \end{pmatrix}^2 = \begin{pmatrix} 2 & 2 \\ 2 & 2 \end{pmatrix}), so each multiplication by AA just doubles. With n=1n = 1, 20A=A2^0A = A.

Why it is done this way: the idea that saves half the exercise is that U0=Ker⁡(f)U_0 = \operatorname{Ker}(f). If you do not see it, you solve the same system twice. And in c) it is better to give AnA^n for n≥1n \ge 1: with n=0n = 0, D0=ID^0 = I and A0=I≠2−1AA^0 = I \neq 2^{-1}A.

How it is marked (rough split, mine, not the official one):

PartWhat is assessedPoints
a)∣A∣=0\lvert A \rvert = 0: never bijective0.5
a)Rank depending on kk, justified1
a)Bases and dimensions in both cases1.5
b)Characteristic polynomial and eigenvalues1.5
b)d0d_0 depending on kk (via the kernel or the rank)1.5
b)Conclusion: only k=0k = 01
c)PP, DD matching and P−1P^{-1}1.5
c)AnA^n1.5

Check it in MATLAB

This script checks all three exercises. Run it after doing them on paper:

format rat
%% Exercise 1
A1 = [1 -1 0; 0 1 -1];
A1*[5; 2; 1]                 % (3, 1)
rank(A1), null(A1, 'r')      % rank 2; kernel: the greys
rref([A1 [1; 1]])            % preimage of (1, 1)
%% Exercise 2
A2 = [4 -2; 1 1];
eig(A2)                      % 3 and 2 (MATLAB's order)
P2 = [1 2; 1 1];
inv(P2)*A2*P2                % diagonal: c)
A2^4                         % the formula with n = 4
%% Exercise 3
syms k
A3 = [1 1 0; 1 1 0; 0 k 0];
rank(subs(A3, k, 5)), rank(subs(A3, k, 0))
A30 = [1 1 0; 1 1 0; 0 0 0];
A30^6 - 2^5*A30              % zeros: A^n = 2^(n-1) A

Output:

ans =

       3       
       1       

ans =

       2       

ans =

       1       
       1       
       1       

ans =

       1              0             -1              2       
       0              1             -1              1       

ans =

       3       
       2       

ans =

       2              0       
       0              3       

ans =

     146           -130       
      65            -49       

ans =

       2       

ans =

       1       

ans =

       0              0              0       
       0              0              0       
       0              0              0       

In exercise 1, rref([A1 [1; 1]]) leaves BB free: the last column gives the solution with B=0B = 0, (2,1,0)(2, 1, 0). In exercise 2, the formula with n=4n = 4 gives 2⋅81−16=1462 \cdot 81 – 16 = 146, 32−162=−13032 – 162 = -130, 81−16=6581 – 16 = 65 and 32−81=−4932 – 81 = -49: the same as A2^4. And in exercise 3, the two ranks (2 with k=5k = 5, 1 with k=0k = 0) are the two cases of part a).

Exam-style quiz

These 20 questions are like the ones in the Campus quiz on linear transformations and diagonalisation: true or false, single answer, multiple answers, matching and gap-fill, almost all theoretical and a few with a short calculation. They are original and part of the AG mock exam bank. The rules are those of the exam test: no negative marking, except in multiple-answer questions, where each wrong option ticked cancels a right one. Allow about 15 minutes and repeat it as many times as you like.

Question 1True or false

Say whether each map from R2\mathbb{R}^2 to R2\mathbb{R}^2 is linear:

  1. f(x,y)=(3x−y,  2y)f(x, y) = (3x – y,\; 2y)
  2. f(x,y)=(x+1,  y)f(x, y) = (x + 1,\; y)
  3. f(x,y)=(xy,  x)f(x, y) = (xy,\; x)
  4. f(x,y)=(0,  x−y)f(x, y) = (0,\; x – y)
Solution
  • T — f(x,y)=(3x−y,  2y)f(x, y) = (3x – y,\; 2y)
  • F — f(x,y)=(x+1,  y)f(x, y) = (x + 1,\; y)
  • F — f(x,y)=(xy,  x)f(x, y) = (xy,\; x)
  • T — f(x,y)=(0,  x−y)f(x, y) = (0,\; x – y)

A linear map only has, in each coordinate, sums of coordinates multiplied by numbers. (x+1,y)(x + 1, y) sends (0,0)(0, 0) to (1,0)(1, 0), and a linear map always sends zero to zero. xyxy is a product of coordinates: f(2⋅(1,1))=(4,2)≠2f(1,1)=(2,2)f(2 \cdot (1, 1)) = (4, 2) \neq 2f(1, 1) = (2, 2). The last one is linear even though it has a 0: the 0 is «0 times the coordinates».

Question 2Single choice

The matrix in the standard bases of a linear map f:R4→R2f : \mathbb{R}^4 \to \mathbb{R}^2 has size:

  1. 2 × 4
  2. 4 × 2
  3. 4 × 4
  4. 2 × 2
Solution

Answer: 2 × 4

Each column is the image of a basis vector of R4\mathbb{R}^4 (4 columns), written with its 2 coordinates in R2\mathbb{R}^2 (2 rows): 2×42 \times 4.

Question 3Single choice

Let f(x,y,z)=(x−z,  2y+z)f(x, y, z) = (x – z,\; 2y + z). The image of (1,2,3)(1, 2, 3) is:

  1. (−2, 7)
  2. (−2, 5)
  3. (1, 7)
  4. (−2, 7, 0)
Solution

Answer: (−2, 7)

Substitute: f(1,2,3)=(1−3,  2⋅2+3)=(−2,7)f(1, 2, 3) = (1 – 3,\; 2 \cdot 2 + 3) = (-2, 7).

Question 4Match

Match each concept with its definition:

Kernel
Image
Preimage of w
Eigenspace

Definitions:

  • Eigenvectors of the same eigenvalue, together with 0
  • Vectors of the initial space whose image is the zero vector
  • Vectors of the initial space that land on w
  • Vectors of the final space that are the image of some vector
  • Vectors whose length does not change
Solution
  • Kernel → Vectors of the initial space whose image is the zero vector
  • Image → Vectors of the final space that are the image of some vector
  • Preimage of w → Vectors of the initial space that land on w
  • Eigenspace → Eigenvectors of the same eigenvalue, together with 0

The kernel is the preimage of the zero vector and lives in the initial space; the image lives in the final one. The eigenspace of λ\lambda is Ker⁡(A−λI)\operatorname{Ker}(A – \lambda I). «Vectors whose length does not change» is none of these concepts.

Question 5Single choice

A linear map f:R5→R3f : \mathbb{R}^5 \to \mathbb{R}^3 has dim⁡Im⁡(f)=3\dim\operatorname{Im}(f) = 3. What is dim⁡Ker⁡(f)\dim\operatorname{Ker}(f)?

  1. 2
  2. 0
  3. 3
  4. 5
Solution

Answer: 2

By the dimension formula, dim⁡R5=dim⁡Ker⁡+dim⁡Im⁡\dim\mathbb{R}^5 = \dim\operatorname{Ker} + \dim\operatorname{Im}: 5=dim⁡Ker⁡+35 = \dim\operatorname{Ker} + 3, so dim⁡Ker⁡=2\dim\operatorname{Ker} = 2. It uses the dimension of the initial space.

Question 6Multiple · wrong ticks subtract

Let f:V→Wf : V \to W be linear with matrix AA of size m×nm \times n. Tick the correct statements:

  1. ff is injective if and only if Ker⁡(f)={0⃗}\operatorname{Ker}(f) = \{\vec 0\}
  2. ff is surjective if and only if rg⁡(A)=m\operatorname{rg}(A) = m
  3. If m=nm = n, ff is bijective
  4. If n>mn > m, ff cannot be injective
Solution

Answer: ff is injective if and only if Ker⁡(f)={0⃗}\operatorname{Ker}(f) = \{\vec 0\} · ff is surjective if and only if rg⁡(A)=m\operatorname{rg}(A) = m · If n>mn > m, ff cannot be injective

Injective is equivalent to a trivial kernel, that is, rg⁡(A)=n\operatorname{rg}(A) = n (columns). Surjective, to the image filling WW: rg⁡(A)=m\operatorname{rg}(A) = m (rows). A square matrix can have determinant 0. And with more columns than rows, the rank cannot reach nn and the kernel is not trivial.

Question 7Fill in the gaps

Fill in the gaps:

The kernel of a linear map is a subspace of the ____ space and the image is a subspace of the ____ space.

Words:

  • eigen
  • initial
  • dual
  • final
Solution

The kernel of a linear map is a subspace of the initial space and the image is a subspace of the final space.

The kernel is made of vectors of VV (those going to 0⃗\vec 0) and the image of vectors of WW (those coming out of ff).

Question 8Single choice

If A=(120240001)A = \begin{pmatrix} 1 & 2 & 0 \\ 2 & 4 & 0 \\ 0 & 0 & 1 \end{pmatrix} is the matrix of an endomorphism of R3\mathbb{R}^3, then:

  1. It is neither injective nor surjective
  2. It is injective but not surjective
  3. It is bijective
  4. It is surjective but not injective
Solution

Answer: It is neither injective nor surjective

Row 2 is twice row 1, so rg⁡(A)=2<3\operatorname{rg}(A) = 2 < 3. In an endomorphism, all three properties depend on the same thing: either full rank (bijective) or none of them.

Question 9Fill in the gaps

Fill in the gaps:

Two square matrices AA and A′A' that represent the same endomorphism in different bases are called ____, and they satisfy A′=C−1ACA' = C^{-1}AC.

Words:

  • congruent
  • row-equivalent
  • similar
Solution

Two square matrices AA and A′A' that represent the same endomorphism in different bases are called similar, and they satisfy A′=C−1ACA' = C^{-1}AC.

Similar: A′=C−1ACA' = C^{-1}AC. «Congruent» is a different relation, A′=CtACA' = C^tAC, the one for bilinear forms in topic 6.

Question 10True or false

About eigenvalues and eigenvectors of a square matrix AA:

  1. The zero vector is an eigenvector of every eigenvalue.
  2. An eigenvalue can be 0.
  3. If v⃗\vec v is an eigenvector, so is 5v⃗5\vec v.
  4. AA has no inverse if and only if 0 is an eigenvalue of AA.
Solution
  • F — The zero vector is an eigenvector of every eigenvalue.
  • T — An eigenvalue can be 0.
  • T — If v⃗\vec v is an eigenvector, so is 5v⃗5\vec v.
  • T — AA has no inverse if and only if 0 is an eigenvalue of AA.

By definition, an eigenvector is different from 0⃗\vec 0. The eigenvalue can be 0: then Av⃗=0⃗A\vec v = \vec 0 and v⃗\vec v lies in the kernel, so ∣A∣=0|A| = 0. Non-zero multiples of an eigenvector are eigenvectors of the same eigenvalue.

Question 11Single choice

The eigenvalues of A=(520−1)A = \begin{pmatrix} 5 & 2 \\ 0 & -1 \end{pmatrix} are:

  1. 5 and −1
  2. 5 and 2
  3. 4 and 0
  4. 7 and −3
Solution

Answer: 5 and −1

In a triangular matrix, ∣A−λI∣=(5−λ)(−1−λ)|A – \lambda I| = (5 – \lambda)(-1 – \lambda): the eigenvalues are the numbers on the diagonal. Check: 5+(−1)=4=tr⁡(A)5 + (-1) = 4 = \operatorname{tr}(A).

Question 12Single choice

A 3×33 \times 3 matrix has characteristic polynomial (2−λ)2(1−λ)(2 – \lambda)^2(1 – \lambda) and rg⁡(A−2I)=2\operatorname{rg}(A – 2I) = 2. What is the geometric multiplicity of λ=2\lambda = 2?

  1. 1
  2. 2
  3. 0
  4. 3
Solution

Answer: 1

dλ=n−rg⁡(A−λI)=3−2=1d_\lambda = n – \operatorname{rg}(A – \lambda I) = 3 – 2 = 1. Since d2=1≠m2=2d_2 = 1 \neq m_2 = 2, that matrix is not diagonalisable.

Question 13Multiple · wrong ticks subtract

A real matrix AA of size nn is diagonalisable over R\mathbb{R} if (tick the conditions that, on their own, guarantee it):

  1. It has nn distinct real eigenvalues
  2. All its eigenvalues are real and, for each one, the algebraic multiplicity equals the geometric one
  3. It is symmetric
  4. Its determinant is non-zero
  5. All its eigenvalues are real
Solution

Answer: It has nn distinct real eigenvalues · All its eigenvalues are real and, for each one, the algebraic multiplicity equals the geometric one · It is symmetric

The full condition is «real and m=dm = d for all». With nn distinct eigenvalues it certainly holds, and every real symmetric matrix is diagonalisable too. «All real» is only the first half: some Campus quizzes present it as sufficient, but it is not.

Question 14True or false

If D=P−1APD = P^{-1}AP with DD diagonal:

  1. The columns of PP are eigenvectors of AA.
  2. The numbers on the diagonal of DD are the eigenvalues of AA.
  3. The rows of PP are eigenvectors of AA.
  4. The eigenvector in column jj of PP goes with the eigenvalue in position (j,j)(j, j) of DD.
Solution
  • T — The columns of PP are eigenvectors of AA.
  • T — The numbers on the diagonal of DD are the eigenvalues of AA.
  • F — The rows of PP are eigenvectors of AA.
  • T — The eigenvector in column jj of PP goes with the eigenvalue in position (j,j)(j, j) of DD.

From AP=PDAP = PD, each column of PP satisfies Ap⃗j=djjp⃗jA\vec p_j = d_{jj}\vec p_j. That is why they go in columns and in the same order as the diagonal of DD.

Question 15Single choice

If A=PDP−1A = PDP^{-1} with D=(200−1)D = \begin{pmatrix} 2 & 0 \\ 0 & -1 \end{pmatrix}, then A10A^{10} is:

  1. P(1024001)P−1P\begin{pmatrix} 1024 & 0 \\ 0 & 1 \end{pmatrix}P^{-1}
  2. P10D10P−10P^{10}D^{10}P^{-10}
  3. P(2000−10)P−1P\begin{pmatrix} 20 & 0 \\ 0 & -10 \end{pmatrix}P^{-1}
  4. (1024001)\begin{pmatrix} 1024 & 0 \\ 0 & 1 \end{pmatrix}
Solution

Answer: P(1024001)P−1P\begin{pmatrix} 1024 & 0 \\ 0 & 1 \end{pmatrix}P^{-1}

Ak=PDkP−1A^k = PD^kP^{-1} and D10=diag⁡(210,(−1)10)=diag⁡(1024,1)D^{10} = \operatorname{diag}(2^{10}, (-1)^{10}) = \operatorname{diag}(1024, 1).

Question 16True or false

About similar matrices AA and A′=C−1ACA' = C^{-1}AC:

  1. They have the same determinant.
  2. They have the same eigenvalues.
  3. They have the same trace.
  4. They have the same eigenvectors.
Solution
  • T — They have the same determinant.
  • T — They have the same eigenvalues.
  • T — They have the same trace.
  • F — They have the same eigenvectors.

Determinant, trace, rank and eigenvalues do not depend on the basis. Eigenvectors do: A′A' works with coordinates in another basis, so its eigenvectors are those of AA written in that basis, C−1v⃗C^{-1}\vec v.

Question 17Single choice

The kernel of f(x,y,z)=(x+y,  y−z)f(x, y, z) = (x + y,\; y – z) is:

  1. {(−α,α,α):α∈R}\{(-\alpha, \alpha, \alpha) : \alpha \in \mathbb{R}\}
  2. {(α,−α,α)}\{(\alpha, -\alpha, \alpha)\}
  3. {(0,0,0)}\{(0, 0, 0)\}
  4. {(α,α,−α)}\{(\alpha, \alpha, -\alpha)\}
Solution

Answer: {(−α,α,α):α∈R}\{(-\alpha, \alpha, \alpha) : \alpha \in \mathbb{R}\}

Solve x+y=0x + y = 0, y−z=0y – z = 0: x=−yx = -y and z=yz = y. With y=αy = \alpha, (−α,α,α)(-\alpha, \alpha, \alpha). Check: f(−1,1,1)=(0,0)f(-1, 1, 1) = (0, 0).

Question 18Fill in the gaps

Fill in the gaps:

If Av⃗=λv⃗A\vec v = \lambda\vec v with v⃗≠0⃗\vec v \neq \vec 0, we say that λ\lambda is an ____ of AA and that v⃗\vec v is an associated ____.

Words:

  • determinant
  • eigenvector
  • eigenvalue
  • pivot
Solution

If Av⃗=λv⃗A\vec v = \lambda\vec v with v⃗≠0⃗\vec v \neq \vec 0, we say that λ\lambda is an eigenvalue of AA and that v⃗\vec v is an associated eigenvector.

That is the definition: the eigenvector keeps its direction and the eigenvalue is the factor it is multiplied by.

Question 19Single choice

The matrix of the 90° rotation in the plane, (0−110)\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}:

  1. Is not diagonalisable over R\mathbb{R} because it has no real eigenvalues
  2. Is diagonalisable because it is invertible
  3. Is not diagonalisable because it has a double eigenvalue with a single eigenvector
  4. Is diagonalisable with D=ID = I
Solution

Answer: Is not diagonalisable over R\mathbb{R} because it has no real eigenvalues

Its characteristic polynomial is λ2+1\lambda^2 + 1, with no real roots: no direction stays on its line when rotated by 90°. The first condition fails.

Question 20Single choice

The matrix of f(x,y)=(2x,  x+y)f(x, y) = (2x,\; x + y) in the basis B′={(1,1),  (0,1)}B' = \{(1, 1),\; (0, 1)\} is:

  1. (2001)\begin{pmatrix} 2 & 0 \\ 0 & 1 \end{pmatrix}
  2. (2011)\begin{pmatrix} 2 & 0 \\ 1 & 1 \end{pmatrix}
  3. (2101)\begin{pmatrix} 2 & 1 \\ 0 & 1 \end{pmatrix}
  4. (1002)\begin{pmatrix} 1 & 0 \\ 0 & 2 \end{pmatrix}
Solution

Answer: (2001)\begin{pmatrix} 2 & 0 \\ 0 & 1 \end{pmatrix}

The columns of A′A' are the coordinates in B′B' of the images of the vectors of B′B'. f(1,1)=(2,2)f(1, 1) = (2, 2), which is 2⋅(1,1)+0⋅(0,1)2 \cdot (1, 1) + 0 \cdot (0, 1); f(0,1)=(0,1)=0⋅(1,1)+1⋅(0,1)f(0, 1) = (0, 1) = 0 \cdot (1, 1) + 1 \cdot (0, 1). Both are eigenvectors, which is why it comes out diagonal.

What next?

Today’s material comes back very soon. In topic 6, bilinear and quadratic forms, every matrix is symmetric, so it can always be diagonalised, and the signs of the eigenvalues tell you whether a surface is a bowl, a channel or a saddle. You will find it in the theory of bilinear and quadratic forms. Meanwhile, in the Plane transformations simulator you can type the 2 × 2 matrices from these exercises and see their eigenvectors, and in MATLAB, eig, null(·, 'r') and rank check any part.

AG exam coming up?The test and practical packs with new solved questions and exercises, their cheat sheets, a blank test and practical exam and MATLAB functions, for free.See the pack

Cheat sheet: linear transformations and diagonalisation

The essentials in 30 seconds: the matrix holds the images of the basis in columns; dim⁡V=dim⁡Ker⁡+dim⁡Im⁡\dim V = \dim\operatorname{Ker} + \dim\operatorname{Im} with dim⁡Im⁡=rg⁡(A)\dim\operatorname{Im} = \operatorname{rg}(A); the eigenvalues are the roots of ∣A−λI∣=0|A – \lambda I| = 0; diagonalisable   ⟺  \iff real and mλ=dλm_\lambda = d_\lambda for all, with dλ=n−rg⁡(A−λI)d_\lambda = n – \operatorname{rg}(A – \lambda I); D=P−1APD = P^{-1}AP and An=PDnP−1A^n = PD^nP^{-1}.

I want…By handMATLAB
The matrix of fff(e⃗j)f(\vec e_j) in column jj (with standard bases, coefficients in rows)A = [ ... ]
The image of v⃗\vec vAv⃗A\vec vA*v
The preimage of w⃗\vec wSolve Av⃗=w⃗A\vec v = \vec w: particular + kernel, or emptyrref([A w])
The kernelSolve Av⃗=0⃗A\vec v = \vec 0; dim⁡=n−rg⁡\dim = n – \operatorname{rg}null(A, 'r')
The imageOriginal pivot columns; dim⁡=rg⁡\dim = \operatorname{rg}rank(A), rref(A)
Injective / surjectiverg⁡=n\operatorname{rg} = n (columns) / rg⁡=m\operatorname{rg} = m (rows)rank(A)
Change of basisA′=CW−1ACVA' = C_W^{-1}AC_V; endomorphism C−1ACC^{-1}ACinv(C)*A*C
EigenvaluesRoots of ∣A−λI∣\lvert A – \lambda I \rvert; sum = trace, product = deteig(A)
Geometric multiplicitydλ=n−rg⁡(A−λI)d_\lambda = n – \operatorname{rg}(A – \lambda I)n - rank(A - l*eye(n))
Eigenvectors(A−λI)v⃗=0⃗(A – \lambda I)\vec v = \vec 0null(A - l*eye(n), 'r')
DiagonalisePP = eigenvectors, DD = eigenvalues, matchinginv(sym(P))*A*P
PowersAn=PDnP−1A^n = PD^nP^{-1}A^n, P*D^n*inv(P)

Exercise templates:

  • Kernel and image: matrix → rank → dimensions → kernel with parameters → image with the original columns → injective/surjective.
  • Diagonalise: ∣A−λI∣|A – \lambda I| factorised → real? → dλd_\lambda of the repeated ones → eigenvectors → PP and DD matching → check AP=PDAP = PD.
  • With a parameter: do the eigenvalues depend on kk? If not, rank of A−λIA – \lambda I depending on kk for the repeated one; if so, look separately at the kk where two eigenvalues coincide.
  • AnA^n: DnP−1D^nP^{-1} (rows times λin\lambda_i^n) → PP times that → check with n=1n = 1.
SymptomLikely cause
AP≠PDAP \neq PDPP and DD in different orders, or a wrong eigenvector
A geometric multiplicity of 0You looked at rg⁡(A)\operatorname{rg}(A) instead of rg⁡(A−λI)\operatorname{rg}(A – \lambda I)
The image of e⃗1\vec e_1 is not the first columnTransposed matrix
An image basis with vectors not in the imageColumns of the echelon form instead of the original ones
∣P∣=0\lvert P \rvert = 0Two proportional eigenvectors, or one missing
AnA^n with n=1n = 1 does not give AAPP and P−1P^{-1} swapped, or a multiplication slip

Before handing in, ask yourself:

  1. Have I checked the matrix with the image of a basis vector?
  2. Have I justified every rank and dimension, and used dim⁡V=dim⁡Ker⁡+dim⁡Im⁡\dim V = \dim\operatorname{Ker} + \dim\operatorname{Im} as a check?
  3. Have I looked at both diagonalisation conditions for every repeated eigenvalue?
  4. Have I checked AP=PDAP = PD with one column and AnA^n with n=1n = 1?
Keep goingAll Linear algebra articles

Did this article help you? Here is how you can support SergioLearns →

Ready for the exam?AG theory mock exam — the 20-question test with the Campus rules, no negative marking (and the catch in the several-correct ones)