From a Matrix to a Cubic
To find the eigenvalues of a matrix, one first turns the eigenvalue equation into a determinant equation. For a three-by-three matrix, this produces a cubic polynomial. Cofactor expansion makes that determinant a sum of products involving entries and two-by-two determinants. A good choice of row or column can keep the arithmetic short; a careless choice of signs can change the polynomial.
Throughout, let \(\mathbf{A}\in\mathbb{R}^{3\times 3}\), and use the characteristic-polynomial convention \(p_{\mathbf{A}}(\lambda)=\det(\mathbf{A}-\lambda\mathbf{I}_3)\). An eigenvalue is a scalar \(\lambda\) for which \(\mathbf{A}-\lambda\mathbf{I}_3\) is singular, so the eigenvalues are the roots of \(p_{\mathbf{A}}\), considered over \(\mathbb{C}\) when necessary. The goal here is to compute this polynomial, not to solve every cubic.
For a two-by-two matrix, the determinant used in each minor is \(\det\begin{bmatrix}a&b\\c&d\end{bmatrix}=ad-bc\). The cofactor signs in a three-by-three matrix follow this pattern:
Thus, for example, the expansion along the first row is \(b_{11}M_{11}-b_{12}M_{12}+b_{13}M_{13}\). The sign belongs to the cofactor, not to the entry itself. This distinction matters especially when a minor is already negative.
Why Cofactor Expansion Works
Proof. By the permutation definition, \(\det\mathbf{B}=\sum_{\sigma\in S_3}\operatorname{sgn}(\sigma)b_{1,\sigma(1)}b_{2,\sigma(2)}b_{3,\sigma(3)}\), where \(S_3\) is the set of permutations of \(\{1,2,3\}\) and \(\operatorname{sgn}(\sigma)\) is \(1\) for an even permutation and \(-1\) for an odd one. Fix a row \(i\). Group the six terms according to the column \(j\) for which \(\sigma(i)=j\). In each group, \(b_{ij}\) is a common factor. The other two factors use the two rows other than \(i\) and the two columns other than \(j\). Their signed sum is the determinant of that two-by-two minor, with an additional sign \((-1)^{i+j}\): moving row \(i\) and column \(j\) into the first positions takes \(i-1\) row swaps and \(j-1\) column swaps, whose combined sign is \((-1)^{i+j-2}=(-1)^{i+j}\). The group is therefore \(b_{ij}(-1)^{i+j}M_{ij}=b_{ij}C_{ij}\). Summing the three groups gives the row expansion. Grouping instead by the row assigned to a fixed column \(j\) gives the same argument and the column expansion. \(\square\)
For a characteristic polynomial, apply the expansion to \(\mathbf{B}=\mathbf{A}-\lambda\mathbf{I}_3\), not to \(\mathbf{A}\) alone. The variable \(\lambda\) appears on the diagonal, so the minors are polynomials in \(\lambda\). Before calculating, inspect the rows and columns of \(\mathbf{A}-\lambda\mathbf{I}_3\): an entry equal to zero contributes nothing, and a row or column with multiple zeros often gives the shortest expansion.
Subtract \(\lambda\) from each diagonal entry of \(\mathbf{A}\); leave the off-diagonal entries unchanged.
Prefer one with zeros or simple entries, but any row or column gives the same determinant.
Delete the relevant row and column for each minor, evaluate each two-by-two determinant, and apply \((-1)^{i+j}\).
Expand the products carefully. As a basic check, \(p_{\mathbf{A}}(0)=\det\mathbf{A}\).
Worked Expansions
Worked Example: Expanding Along a Sparse First Row
Find the characteristic polynomial of \(\mathbf{A}=\begin{bmatrix}2&1&0\\0&3&1\\1&0&4\end{bmatrix}\).
Subtract \(\lambda\) from the diagonal entries:
Expand along row 1, whose third entry is zero. The first minor is \(\begin{bmatrix}3-\lambda&1\\0&4-\lambda\end{bmatrix}\), with determinant \((3-\lambda)(4-\lambda)\). The second minor is \(\begin{bmatrix}0&1\\1&4-\lambda\end{bmatrix}\), with determinant \(0(4-\lambda)-1(1)=-1\); its cofactor sign is negative. Therefore
Check: At \(\lambda=0\), the polynomial gives \(25\). Direct expansion of \(\det\mathbf{A}\) along its first row gives \(2(12)-1(-1)+0=25\), agreeing with the constant term.
Worked Example: Choosing a Sparse Column
Find the characteristic polynomial of \(\mathbf{A}=\begin{bmatrix}0&0&1\\2&1&0\\3&0&4\end{bmatrix}\).
Here the second column of the characteristic matrix has just one nonzero entry, so expand down that column:
The nonzero entry in column 2 is in row 2, so its cofactor sign is \((-1)^{2+2}=+1\). Deleting row 2 and column 2 leaves \(\begin{bmatrix}-\lambda&1\\3&4-\lambda\end{bmatrix}\), whose determinant is \(-\lambda(4-\lambda)-3=\lambda^2-4\lambda-3\). Hence
Check: At \(\lambda=0\), this gives \(-3\). In the original matrix, expansion down column 2 has only one nonzero contribution: \(1\cdot\det\begin{bmatrix}0&1\\3&4\end{bmatrix}=0(4)-3=-3\). The constant term is correct.
Worked Example: A Row with One Zero
Find the characteristic polynomial of \(\mathbf{A}=\begin{bmatrix}1&2&0\\0&1&3\\2&0&1\end{bmatrix}\).
The first row of \(\mathbf{A}-\lambda\mathbf{I}_3\) has a zero in its third position. Expanding across that row gives one diagonal contribution and one contribution with a negative cofactor sign:
Check: The constant term is \(13\). Expanding \(\det\mathbf{A}\) along its first row gives \(1(1)-2(0-6)+0=1+12=13\). Thus the polynomial agrees with the determinant at \(\lambda=0\).
A Check on the Leading Term
Proof. In the permutation formula for the determinant of \(\mathbf{A}-\lambda\mathbf{I}_3\), the identity permutation contributes the product of the three diagonal entries. The term of degree three in that product is \((-\lambda)(-\lambda)(-\lambda)=-\lambda^3\). Every other permutation has at most one fixed index, so its product contains at most one diagonal entry involving \(\lambda\); it cannot contribute a term of degree three. Therefore the coefficient of \(\lambda^3\) in the full determinant is \(-1\). \(\square\)
This leading-term check can catch a sign-convention error. If instead one computes \(\det(\lambda\mathbf{I}_3-\mathbf{A})\), its cubic term is \(+\lambda^3\). That is a different convention: for three-by-three matrices the two characteristic polynomials differ by a factor of \(-1\). The roots are unchanged, but the polynomial coefficients must match the convention being used.
Common Pitfall: Losing the Cofactor Sign
In the first example, the minor for the entry in position \((1,2)\) is \(-1\). A common wrong calculation is to use the minor without applying its negative cofactor sign, writing \((2-\lambda)(3-\lambda)(4-\lambda)-1\). This gives the wrong constant term \(23\). The correct contribution is \(-1\cdot(-1)=+1\), so the correct polynomial has constant term \(25\), matching \(\det\mathbf{A}\).
There are two distinct signs to track: the sign \((-1)^{i+j}\) attached to the cofactor, and the sign produced by evaluating the minor itself. Keeping them separate avoids the error. A reliable calculation writes each minor as \(ad-bc\) before multiplying by the cofactor sign.
Why the Choice of Expansion Matters
Every row and every column gives the same determinant, as the cofactor-expansion theorem proves. The choice affects only the amount of arithmetic. In the second example, expanding along column 2 leaves a single two-by-two determinant; expanding along a busier row would create more terms to manage. For a matrix with no zeros, it can still help to choose a row or column with small entries. The determinant is unchanged, but fewer and simpler products make sign errors less likely.
After computing the polynomial, perform at least two checks when practical: confirm the coefficient of \(\lambda^3\) is \(-1\) under this convention, and substitute \(\lambda=0\) to compare the constant term with \(\det\mathbf{A}\). These checks do not replace the calculation, but they can reveal an omitted sign or an arithmetic error. Once the polynomial is established, its roots are the eigenvalues; the next task may require further work to determine eigenvectors and eigenspaces.
Check Your Understanding
For each question, keep the cofactor signs visible and verify the constant term against the determinant at \(\lambda=0\).
- For \(\mathbf{A}=\begin{bmatrix}1&0&2\\3&2&0\\0&1&1\end{bmatrix}\), which row or column gives a short expansion of \(\det(\mathbf{A}-\lambda\mathbf{I}_3)\)? Compute the polynomial.
- Expand \(\det(\mathbf{B}-\lambda\mathbf{I}_3)\) down column 2 when \(\mathbf{B}=\begin{bmatrix}2&0&0\\1&3&4\\0&5&1\end{bmatrix}\). Show the cofactor sign of each nonzero entry.
- In a three-by-three determinant, what is the cofactor sign at position \((2,3)\), and what is the sign at position \((3,3)\)?
- Explain why the coefficient of \(\lambda^3\) is \(-1\) for the characteristic-polynomial convention used here.
- What determinant value should the constant term of a computed characteristic polynomial equal?