Eigen-pairs, trace, determinant and rank: every later topic computes with them.
Open the interactive lessons →Eigenvalues and Diagonalisation past questions
Contents
- Finding eigenvalues and eigenvectors
- Trace and determinant
- Rank, nullity and invertibility
- Diagonalisation
1. Finding eigenvalues and eigenvectors
Find the stretch factors, then the directions that get stretched.
the two-step method and the fast check for options
The question this lesson answers. A matrix usually turns a vector. Which vectors does it only stretch, and by how much?
A scalar $\lambda$ is an eigenvalue of a square matrix $A$ if there is a non-zero vector $v$ with $Av=\lambda v$. Every such $v$ is an eigenvector for $\lambda$.
Why it works this way. $Av=\lambda v$ means $(A-\lambda I)v=0$ for a non-zero $v$. That is possible only when $A-\lambda I$ squashes some direction to zero, which is exactly when its determinant is zero.
Draw arrows on a rubber sheet and stretch it. Most arrows change direction. A few keep their line and only change length. The analogy stops with complex eigenvalues: a rotation keeps no real line at all.
Rewrite $Av=\lambda v$ as $(A-\lambda I)v=0$. A non-zero solution exists exactly when $A-\lambda I$ is not invertible, that is, when $\det(A-\lambda I)=0$. This is the characteristic equation. For a $2\times2$ matrix it is always $$\lambda^2-(\operatorname{tr}A)\,\lambda+\det A=0.$$ For each root, solve $(A-\lambda I)v=0$. In the $2\times2$ case the two equations are multiples of each other, so use whichever is simpler and choose one free component.
An eigenvector is never unique: any non-zero multiple works, including a multiple by $-1$ or by $i$. So an option may look different from your answer and still be correct. Compare by multiplying, not by matching text.
Triangular and diagonal matrices need no equation at all. Their eigenvalues are the diagonal entries, because the determinant of a triangular matrix is the product of its diagonal.
Walk along the first row. Each entry multiplies the $2\times2$ determinant left after deleting its row and column, with signs $+,-,+$: $$\det\begin{bmatrix}a&b&c\\d&e&f\\g&h&i\end{bmatrix}=a(ei-fh)-b(di-fg)+c(dh-eg).$$ A row or column with zeros is a good one to expand along. For a triangular matrix just multiply the diagonal.
When $\lambda^2+b\lambda+c=0$ does not factor by sight, use $$\lambda=\frac{-b\pm\sqrt{b^2-4c}}{2}.$$ For $\lambda^2-6\lambda+7=0$ this gives $\lambda=\dfrac{6\pm\sqrt{8}}{2}=3\pm\sqrt2$. Check: the two roots add to $6$ and multiply to $7$.
Worked example: Full computation
Problem.
Find the eigen-pairs of $A=\begin{bmatrix}4&1\\2&3\end{bmatrix}$.
Idea.
Characteristic equation, then null vectors.
- Trace 7, determinant 10, so $\lambda^2-7\lambda+10=0$.
- Roots $5$ and $2$.
- For 5: $(A-5I)v=0$ reads $-v_1+v_2=0$, so $v=(1,1)$.
- For 2: $2v_1+v_2=0$, so $v=(1,-2)$.
Answer.
$(5,(1,1))$ and $(2,(1,-2))$.
Common mistake.
Offering the zero vector as an eigenvector.
Worked example: Eigenvalues of a 3×3 matrix
Problem.
Find the eigenvalues of $A=\begin{bmatrix}2&1&1\\1&2&1\\1&1&2\end{bmatrix}$.
Idea.
For a $3\times3$ matrix the characteristic equation is $$\lambda^3-(\operatorname{tr}A)\,\lambda^2+S_2\,\lambda-\det A=0,$$ where $S_2$ adds the three $2\times2$ determinants that keep rows and columns $\{1,2\}$, $\{1,3\}$ and $\{2,3\}$.
- Trace: $2+2+2=6$.
- $S_2$: each of the three small determinants is $2\cdot2-1\cdot1=3$, so $S_2=9$.
- Determinant, along the first row: $2(4-1)-1(2-1)+1(1-2)=6-1-1=4$.
- Equation: $\lambda^3-6\lambda^2+9\lambda-4=0$.
- Find one root by trying the divisors of 4. At $\lambda=1$: $1-6+9-4=0$.
- Divide by $(\lambda-1)$: $\lambda^2-5\lambda+4=(\lambda-1)(\lambda-4)$.
- Check: $1+1+4=6$ is the trace, and $1\cdot1\cdot4=4$ is the determinant.
Answer.
$4,\;1,\;1$.
Common mistake.
Dropping a minus sign in the determinant, or listing the repeated eigenvalue only once. With complex entries the steps are the same; simplify products such as $i\cdot(-i)=1$ as you go.
Worked example: A complex triangular matrix
Problem.
Find eigenvectors of $\begin{bmatrix}i&3\\0&2+i\end{bmatrix}$.
Idea.
Read the eigenvalues from the diagonal.
- Eigenvalues are $i$ and $2+i$.
- For $i$: the first column shows $A(1,0)^T=i(1,0)^T$.
- For $2+i$: first row of $(A-(2+i)I)v=0$ is $-2v_1+3v_2=0$, so $v=(3,2)$.
Answer.
$(1,0)$ and $(3,2)$.
Common mistake.
Assuming complex eigenvalues force complex eigenvectors.
With options, compute $Av$ for each offered vector and see whether both entries are the same multiple of the entries of $v$.
An eigenvalue may be $0$, and that happens exactly when $A$ is singular. An eigenvector may never be $0$.
If an eigenvector $v$ is perpendicular to $Av$, then $v^T(\lambda v)=\lambda\lVert v\rVert^2=0$ (real $v$), so $\lambda=0$ and $A$ is not invertible.
Worked example: One value, many directions
Problem.
Which vectors are eigenvectors of $\begin{bmatrix}2&0\\0&2\end{bmatrix}$?
Idea.
Check what the matrix does to any vector.
- $Av=2v$ for every $v$.
- The zero vector is excluded by definition.
Answer.
Every non-zero vector, with eigenvalue 2.
Common mistake.
Listing only the two axis vectors.
Determinant gives the values; null vectors give the directions.
Method for any exam question
| Step | Do this |
|---|---|
| 1 | Solve $\det(A-\lambda I)=0$. |
| 2 | For each root, solve $(A-\lambda I)v=0$. |
| 3 | Keep only non-zero vectors. |
| 4 | Check one by multiplying: $Av$ must equal $\lambda v$. |
2. Trace and determinant
Sum of eigenvalues is the trace; product is the determinant.
the two facts that tie the spectrum to the matrix
The question this lesson answers. Can you learn about eigenvalues without ever solving for them?
Think of the eigenvalues as a list of stretch factors. The trace is their total and the determinant is their product. Two quick numbers often settle a whole question.
$$\operatorname{tr}A=\sum_{i=1}^n\lambda_i,\qquad\det A=\prod_{i=1}^n\lambda_i$$ Symbols: $\lambda_i$ are all roots of the characteristic polynomial with multiplicity. Valid for every square matrix.
Why it works this way. In the characteristic polynomial, the coefficient next to the highest power collects the sum of the roots, and the constant term is their product. Reading the same coefficients from the matrix gives the trace and the determinant.
What happens to eigenvalues
| Matrix | Eigenvalues | Eigenvectors |
|---|---|---|
| $cA$ | $c\lambda$ | same |
| $A+cI$ | $\lambda+c$ | same |
| $A^k$ | $\lambda^k$ | same |
| $A^{-1}$ | $1/\lambda$ | same |
| $A^T$ | same | usually different |
From the table, $\det(cA)=c^n\det A$ for an $n\times n$ matrix, because each of the $n$ eigenvalues is multiplied by $c$. The power is the size of the matrix, not 1. This is the most common slip.
For a product such as $AA^T$, the trace has a direct formula: $\operatorname{tr}(AA^T)=\sum_{j,k}a_{jk}^2$, the sum of all squared entries. So the sum of the eigenvalues of $AA^T$ can be found without forming the matrix. For a single column $a$, the matrix $aa^T$ has rank 1: its eigenvalues are $a^Ta$ once and 0 for all the rest.
Worked example: Determinant of a multiple
Problem.
$A$ is $2\times2$ with eigenvalues 1 and 4. Find $\det(3A)$.
Idea.
Each eigenvalue is tripled.
- Eigenvalues of $3A$ are 3 and 12.
- Product $36$. Also $3^2\det A=9\cdot4=36$.
Answer.
36.
Common mistake.
Computing $3\cdot4=12$.
Worked example: A rank-one product
Problem.
$a=(2,1,2)^T$. Find the eigenvalues of $aa^T$.
Idea.
Rank one: only one non-zero eigenvalue.
- $aa^Ta=a(a^Ta)=9a$, so 9 is an eigenvalue.
- Any $w$ with $a^Tw=0$ gives $aa^Tw=0$. There are two independent such $w$.
- So the eigenvalues are $9,0,0$, and their sum equals $\operatorname{tr}(aa^T)=4+1+4=9$.
Answer.
$9,0,0$.
Common mistake.
Writing three equal eigenvalues.
Worked example: A missing eigenvalue
Problem.
A $3\times3$ matrix has trace 4, determinant $-6$ and one eigenvalue $3$. Find the others.
Idea.
Use sum and product on what remains.
- Remaining sum $4-3=1$.
- Remaining product $-6/3=-2$.
- $t^2-t-2=0$ gives $2$ and $-1$.
Answer.
$2$ and $-1$.
Common mistake.
Using the full trace for the remaining pair.
$\operatorname{tr}(AB)$ is not $\operatorname{tr}A\cdot\operatorname{tr}B$. But $\det(AB)=\det A\cdot\det B$ is true.
From the lecture notes: more eigenvalue rules, given $Av=\lambda v$
| Case | What follows |
|---|---|
| Eigenvector scaled to $kv$, $k\ne0$ | $\lambda$ does not change |
| Polynomial $p(A)$ | eigenvalue $p(\lambda)$, same $v$ |
| $A^k$ with $k$ even | eigenvalue $\lambda^k$, but you cannot recover the sign of $\lambda$ from it |
| $A^2=I$ | every eigenvalue is $+1$ or $-1$ |
| Zero matrix | $\lambda=0$, every $v\ne0$ is an eigenvector |
| Identity matrix | $\lambda=1$, every $v\ne0$ is an eigenvector |
If $Au=\lambda_1u$ and $A^Tv=\lambda_2v$ with $\lambda_1\ne\lambda_2$, then $v^Tu=0$. Reason: $v^TAu$ equals both $\lambda_1v^Tu$ and $\lambda_2v^Tu$.
- For $2\times2$ matrices write $\lambda^2-(\text{trace})\lambda+\det=0$ straight away.
- For a rank-one matrix $uv^T$, the only eigenvalue that can be non-zero is $v^Tu$.
- Use trace and determinant to remove options before solving for eigenvalues.
Trace adds them, determinant multiplies them.
Method for any exam question
| Step | Do this |
|---|---|
| 1 | Compute the trace and the determinant. |
| 2 | Match them to the sum and product of the eigenvalues. |
| 3 | For $cA$, $A^k$ or $A+cI$, change each eigenvalue first. |
| 4 | Then recompute the sum or product. |
3. Rank, nullity and invertibility
A zero eigenvalue means something gets crushed to zero.
what a zero eigenvalue says about a matrix
The question this lesson answers. What does it cost a matrix to have 0 as an eigenvalue?
If $Av=0$ for some non-zero $v$, the matrix has flattened that direction. Information is lost, so the matrix cannot be undone.
The rank of $A$ is the number of independent columns. The nullity is the dimension of the set of $v$ with $Av=0$. For an $m\times n$ matrix, rank + nullity = $n$.
Why it works this way. The vectors sent to zero form the null space. Every dimension spent there is missing from the output, which is why rank and nullity add to the number of columns.
For an $n\times n$ matrix these always agree
| Invertible side | Singular side |
|---|---|
| $\det A\ne0$ | $\det A=0$ |
| 0 is not an eigenvalue | 0 is an eigenvalue |
| rank $=n$ | rank $<n$ |
| only $v=0$ solves $Av=0$ | some $v\ne0$ solves $Av=0$ |
To find the rank of a small matrix, look for rows that are combinations of others, or row-reduce and count the non-zero rows. A $2\times2$ matrix with determinant 0 and at least one non-zero entry has rank 1.
Singular does not mean "not diagonalisable". These are separate questions. The matrix $\begin{bmatrix}1&0\\0&0\end{bmatrix}$ is singular and already diagonal. The matrix $\begin{bmatrix}1&1\\0&1\end{bmatrix}$ is invertible and cannot be diagonalised.
When the matrix is diagonalisable, the rank equals the number of non-zero eigenvalues, counted with multiplicity. Without that condition it can fail: $\begin{bmatrix}0&1\\0&0\end{bmatrix}$ has two zero eigenvalues but rank 1.
To solve $Mv=0$ when $M$ is $3\times3$ or larger:
- Subtract multiples of one row from the rows below until each row starts further right than the row above.
- The number of non-zero rows left is the rank.
- A column without a leading entry gives a free unknown. Set one free unknown to 1, the other free ones to 0, and solve upwards.
Worked example: Rank and a null vector together
Problem.
For $M=\begin{bmatrix}1&2&1\\2&4&0\\3&6&1\end{bmatrix}$, find the rank and a basis of the null space.
Idea.
Row reduce, then set the free unknown to 1.
- $R_2-2R_1=(0,0,-2)$ and $R_3-3R_1=(0,0,-2)$.
- $R_3-R_2=(0,0,0)$, so two non-zero rows remain.
- The second column has no leading entry, so set $v_2=1$.
- Row 2 gives $v_3=0$. Row 1 gives $v_1=-2$.
Answer.
Rank $2$; the null space is spanned by $(-2,1,0)$.
Common mistake.
Changing the columns as well as the rows, which changes the solutions.
Worked example: Rank and nullity
Problem.
Find rank and nullity of $\begin{bmatrix}3&6\\1&2\end{bmatrix}$.
Idea.
Compare the rows.
- Row 1 is 3 times row 2, so only one row is independent: rank 1.
- Nullity $=2-1=1$. A null vector is $(2,-1)$.
Answer.
Rank 1, nullity 1.
Common mistake.
Saying the rank is 2 because no entry is zero.
Worked example: Singular but diagonalisable
Problem.
Show that $M=\begin{bmatrix}1&3\\2&6\end{bmatrix}$ is singular and diagonalisable.
Idea.
Determinant, then eigenvalues.
- $\det M=6-6=0$.
- Trace 7, so the eigenvalues are 0 and 7.
- Two distinct eigenvalues give two independent eigenvectors.
Answer.
Singular and diagonalisable.
Common mistake.
Rejecting diagonalisation because the matrix has no inverse.
For a statement list, compute the determinant first. It settles invertibility, singularity and whether 0 is an eigenvalue in one step.
Worked example: Two zero eigenvalues, rank one
Problem.
Find the eigenvalues and rank of $\begin{bmatrix}0&1\\0&0\end{bmatrix}$.
Idea.
Do not read the rank from the eigenvalues unless the matrix is diagonalisable.
- It is triangular, so both eigenvalues are 0.
- One row is non-zero, so the rank is 1.
Answer.
Eigenvalues $0,0$; rank $1$.
Common mistake.
Answering rank 0 because there is no non-zero eigenvalue.
Zero eigenvalue, zero determinant, no inverse: the same fact.
Method for any exam question
| Step | Do this |
|---|---|
| 1 | Find the determinant, or row-reduce. |
| 2 | Count independent rows for the rank. |
| 3 | Subtract from the number of columns for the nullity. |
| 4 | Zero determinant means singular. |
4. Diagonalisation
Use the eigenvectors as new axes and the matrix only stretches.
writing a matrix as a change of basis around a diagonal matrix
The question this lesson answers. When can a matrix be replaced by plain stretching along some axes?
In the right coordinate system, a diagonalisable matrix only stretches each axis. The columns of $P$ are those axes.
$A$ is diagonalisable if $A=PDP^{-1}$ with $D$ diagonal and $P$ invertible. The columns of $P$ are eigenvectors and the matching diagonal entries of $D$ are their eigenvalues, in the same order.
Why it works this way. $AP=PD$ says that each column of $P$ is an eigenvector. To write $A=PDP^{-1}$ you must be able to invert $P$, so you need as many independent eigenvectors as the size of $A$.
The condition is exactly: $n$ linearly independent eigenvectors. Three useful sufficient conditions are (i) $n$ distinct eigenvalues, (ii) Hermitian or real symmetric, (iii) normal. In cases (ii) and (iii), $P$ can be chosen unitary, so $P^{-1}=P^*$.
Be careful with the transpose. For a real symmetric matrix we may write $A=Q\Lambda Q^T$ with $Q$ orthogonal. For a complex Hermitian matrix the correct statement is $A=Q\Lambda Q^*$ with the conjugate transpose. A question that writes $Q^T$ for a complex Hermitian matrix still asks for $\Lambda$, which holds the eigenvalues.
Once $A=PDP^{-1}$, powers are easy: $A^k=PD^kP^{-1}$, because the inner $P^{-1}P$ pairs cancel. The same $P$ diagonalises $A+cI$ and $A^{-1}$.
If a $2\times2$ matrix has a repeated eigenvalue, it is diagonalisable only if it is already a multiple of $I$.
Worked example: Diagonalise
Problem.
Diagonalise $A=\begin{bmatrix}2&1\\1&2\end{bmatrix}$ with an orthogonal matrix.
Idea.
Eigen-pairs, then normalise.
- Pairs: $3$ with $(1,1)$, and $1$ with $(1,-1)$.
- Normalise both by $\sqrt2$.
- $Q=\tfrac1{\sqrt2}\begin{bmatrix}1&1\\1&-1\end{bmatrix}$ and $\Lambda=\operatorname{diag}(3,1)$.
Answer.
$A=Q\Lambda Q^T$.
Common mistake.
Putting eigenvalues in a different order from the columns.
Worked example: A complex Hermitian matrix
Problem.
Write $A=\begin{bmatrix}1&i\\-i&1\end{bmatrix}$ as $U\Lambda U^*$.
Idea.
Hermitian, so $U$ is unitary.
- Trace 2, determinant 0: eigenvalues 2 and 0.
- For 2: $-v_1+iv_2=0$ gives $(i,1)$. For 0: $v_1+iv_2=0$ gives $(-i,1)$.
- Normalise: $U=\tfrac1{\sqrt2}\begin{bmatrix}i&-i\\1&1\end{bmatrix}$.
Answer.
$\Lambda=\operatorname{diag}(2,0)$.
Common mistake.
Using $U^T$, which does not rebuild a complex matrix.
Column $j$ of $P$ must belong to entry $j$ of $D$. Swapping one without the other gives a different matrix.
- $n$ distinct eigenvalues: diagonalisable. The converse is false ($I$ has one repeated eigenvalue).
- Over $\mathbb R$, fewer than $n$ real eigenvalues counted with multiplicity: not diagonalisable over $\mathbb R$.
- A repeated eigenvalue decides nothing. Solve $(A-\lambda I)v=0$ and count the independent eigenvectors.
Worked example: From the lecture notes: a square root of a matrix
Problem.
Find $S$ with $S^2=A$ for $A=\begin{bmatrix}5&4\\4&5\end{bmatrix}$.
Idea.
For symmetric $A=QDQ^T$ with non-negative eigenvalues, $S=QD^{1/2}Q^T$.
- Eigenvalues are $9$ and $1$.
- Unit eigenvectors are $(1,1)/\sqrt2$ and $(1,-1)/\sqrt2$. Normalise before building $Q$.
- $S=Q\,\mathrm{diag}(3,1)\,Q^T$.
Answer.
$S=\begin{bmatrix}2&1\\1&2\end{bmatrix}$.
Common mistake.
Using columns of $Q$ that do not have length 1.
Worked example: Triangular but stuck
Problem.
Is $\begin{bmatrix}3&1\\0&3\end{bmatrix}$ diagonalisable?
Idea.
Count independent eigenvectors for the repeated value.
- $A-3I$ has rank 1.
- So only one independent eigenvector exists, and two are needed.
Answer.
No.
Common mistake.
Saying yes because the matrix is already nearly diagonal.
Enough independent eigenvectors, or no diagonal form.
Method for any exam question
| Step | Do this |
|---|---|
| 1 | Find the eigenvalues. |
| 2 | For repeated ones, count independent eigenvectors. |
| 3 | Put eigenvectors in $P$ and values in $D$ in the same order. |
| 4 | Use $A^k=PD^kP^{-1}$ for powers. |