Tutorials › Linear Algebra › Characteristic Polynomials Of Two-By-Two Matrices

Eigenvalues and Eigenvectors · Tutorial 486 of 1000

Characteristic Polynomials Of Two-By-Two Matrices

Learn to calculate a two-by-two characteristic polynomial and read its trace and determinant from its coefficients.

Intermediate 9 min read

What You'll Learn

  • Compute \(\det(\mathbf{A}-\lambda\mathbf{I}_2)\) directly from the entries of a two-by-two matrix.
  • Express the characteristic polynomial using the trace and determinant.
  • Check a polynomial calculation by expanding the determinant independently.
  • Determine when two two-by-two matrices have the same characteristic polynomial.
  • Avoid sign errors when applying the stated characteristic-polynomial convention.

From Matrix Entries to a Polynomial

For a two-by-two matrix, the characteristic polynomial can be calculated directly from a determinant. The calculation is short, but its signs matter: the diagonal entries become expressions involving \(-\lambda\), while the off-diagonal entries do not change. Writing out this small determinant also reveals exactly how the matrix’s trace and determinant appear in the polynomial.

Throughout, let \(\mathbf{A}\in\mathbb{R}^{2\times2}\), and use the convention \(p_{\mathbf{A}}(\lambda)=\det(\mathbf{A}-\lambda\mathbf{I}_2)\). Here \(\lambda\) is an indeterminate, so \(p_{\mathbf{A}}\) is a polynomial with real coefficients. For \(\mathbf{A}=\begin{bmatrix}a&b\\c&d\end{bmatrix}\), the trace is \(\operatorname{tr}\mathbf{A}=a+d\), and the determinant is \(\det\mathbf{A}=ad-bc\).

Definition: The characteristic polynomial of \(\mathbf{A}\in\mathbb{R}^{2\times2}\), under the convention used here, is \(p_{\mathbf{A}}(\lambda)=\det(\mathbf{A}-\lambda\mathbf{I}_2)\). Since \(\mathbf{A}-\lambda\mathbf{I}_2=\begin{bmatrix}a-\lambda&b\\c&d-\lambda\end{bmatrix}\), this determinant is a polynomial in \(\lambda\).

The identity matrix in this definition is \(\mathbf{I}_2=\begin{bmatrix}1&0\\0&1\end{bmatrix}\). Subtracting \(\lambda\mathbf{I}_2\) subtracts \(\lambda\) from each diagonal entry; it does not change either off-diagonal entry. The determinant rule for a two-by-two matrix, \(\det\begin{bmatrix}x&y\\z&w\end{bmatrix}=xw-yz\), then gives the formula below.

Theorem: If \(\mathbf{A}=\begin{bmatrix}a&b\\c&d\end{bmatrix}\in\mathbb{R}^{2\times2}\), then \(p_{\mathbf{A}}(\lambda)=\lambda^2-(\operatorname{tr}\mathbf{A})\lambda+\det\mathbf{A}\).

Proof. By definition and the two-by-two determinant rule,

$$ \begin{aligned} p_{\mathbf{A}}(\lambda) &=\det\begin{bmatrix}a-\lambda&b\\c&d-\lambda\end{bmatrix}\\ &=(a-\lambda)(d-\lambda)-bc\\ &=ad-a\lambda-d\lambda+\lambda^2-bc\\ &=\lambda^2-(a+d)\lambda+(ad-bc). \end{aligned} $$

Substituting \(\operatorname{tr}\mathbf{A}=a+d\) and \(\det\mathbf{A}=ad-bc\) gives the stated expression. Each equality is an expansion or a substitution of the definitions, so the formula holds for every real two-by-two matrix. \(\square\)

The formula says that the polynomial is monic: its leading coefficient is \(1\). Its coefficient of \(\lambda\) is the negative of the trace, and its constant term is the determinant. These are exact coefficient statements, not approximations. In particular, the trace and determinant can be read from the polynomial once it has been written in descending powers of \(\lambda\).

Three Calculations and Their Checks

Worked Example: A Matrix with Four Nonzero Entries

Find the characteristic polynomial of \(\mathbf{A}=\begin{bmatrix}2&3\\-1&4\end{bmatrix}\) by calculating the determinant, then check it using the trace-and-determinant formula.

First subtract \(\lambda\) from both diagonal entries and apply the determinant rule:

$$ \begin{aligned} p_{\mathbf{A}}(\lambda) &=\det\begin{bmatrix}2-\lambda&3\\-1&4-\lambda\end{bmatrix}\\ &=(2-\lambda)(4-\lambda)-3(-1)\\ &=8-2\lambda-4\lambda+\lambda^2+3\\ &=\lambda^2-6\lambda+11. \end{aligned} $$

For the independent check, \(\operatorname{tr}\mathbf{A}=2+4=6\), and \(\det\mathbf{A}=2\cdot4-3(-1)=8+3=11\). The formula gives \(p_{\mathbf{A}}(\lambda)=\lambda^2-6\lambda+11\), agreeing with the direct determinant expansion.

Check: Substituting the matrix entries into the determinant before expanding gives \((2-\lambda)(4-\lambda)+3\). Expanding this expression produces \(\lambda^2-6\lambda+11\) again, so the off-diagonal contribution has the correct sign.

Worked Example: A Negative Determinant

Find \(p_{\mathbf{B}}(\lambda)\) for \(\mathbf{B}=\begin{bmatrix}1&-2\\3&2\end{bmatrix}\). Pay particular attention to the sign of the off-diagonal product.

Using the defining determinant,

$$ \begin{aligned} p_{\mathbf{B}}(\lambda) &=\det\begin{bmatrix}1-\lambda&-2\\3&2-\lambda\end{bmatrix}\\ &=(1-\lambda)(2-\lambda)-(-2)(3)\\ &=2-\lambda-2\lambda+\lambda^2+6\\ &=\lambda^2-3\lambda+8. \end{aligned} $$

The trace is \(\operatorname{tr}\mathbf{B}=1+2=3\). The determinant is \(\det\mathbf{B}=1\cdot2-(-2)(3)=2+6=8\). Thus the trace-and-determinant expression is \(\lambda^2-3\lambda+8\), which matches the direct calculation.

Check: Keeping the determinant product visible gives \((1-\lambda)(2-\lambda)-(-6)=(1-\lambda)(2-\lambda)+6\). The plus \(6\) produces constant term \(2+6=8\), confirming the result.

Worked Example: A Zero Trace

Compute the characteristic polynomial of \(\mathbf{C}=\begin{bmatrix}5&2\\8&-5\end{bmatrix}\). This example checks what the formula gives when the diagonal entries sum to zero.

Directly from the definition,

$$ \begin{aligned} p_{\mathbf{C}}(\lambda) &=\det\begin{bmatrix}5-\lambda&2\\8&-5-\lambda\end{bmatrix}\\ &=(5-\lambda)(-5-\lambda)-16\\ &=(-25-5\lambda+5\lambda+\lambda^2)-16\\ &=\lambda^2-41. \end{aligned} $$

Here \(\operatorname{tr}\mathbf{C}=5+(-5)=0\), and \(\det\mathbf{C}=5(-5)-2\cdot8=-25-16=-41\). The formula therefore gives \(\lambda^2-0\lambda-41=\lambda^2-41\), as obtained by expansion.

Check: The determinant expression before simplification is \((5-\lambda)(-5-\lambda)-16\). The terms linear in \(\lambda\) cancel, and the constant terms sum to \(-25-16=-41\). Both checks reproduce the displayed polynomial.

What the Coefficients Determine

The formula also gives a precise comparison rule. For two-by-two matrices, equality of characteristic polynomials is equivalent to equality of both trace and determinant. The equivalence concerns the polynomials themselves; it does not claim that the matrices have the same entries.

Theorem: Let \(\mathbf{A},\mathbf{B}\in\mathbb{R}^{2\times2}\). Then \(p_{\mathbf{A}}=p_{\mathbf{B}}\) if and only if \(\operatorname{tr}\mathbf{A}=\operatorname{tr}\mathbf{B}\) and \(\det\mathbf{A}=\det\mathbf{B}\).

Proof. Write \(t_{\mathbf{A}}=\operatorname{tr}\mathbf{A}\), \(d_{\mathbf{A}}=\det\mathbf{A}\), and define \(t_{\mathbf{B}}\) and \(d_{\mathbf{B}}\) in the same way. If \(t_{\mathbf{A}}=t_{\mathbf{B}}\) and \(d_{\mathbf{A}}=d_{\mathbf{B}}\), the formula already proved gives \(p_{\mathbf{A}}(\lambda)=\lambda^2-t_{\mathbf{A}}\lambda+d_{\mathbf{A}}=\lambda^2-t_{\mathbf{B}}\lambda+d_{\mathbf{B}}=p_{\mathbf{B}}(\lambda)\). Conversely, suppose \(p_{\mathbf{A}}=p_{\mathbf{B}}\). Then \(\lambda^2-t_{\mathbf{A}}\lambda+d_{\mathbf{A}}=\lambda^2-t_{\mathbf{B}}\lambda+d_{\mathbf{B}}\) as polynomials. Equal polynomials have equal coefficients of each power of \(\lambda\). Comparing the coefficients of \(\lambda\) gives \(-t_{\mathbf{A}}=-t_{\mathbf{B}}\), so \(t_{\mathbf{A}}=t_{\mathbf{B}}\); comparing constant terms gives \(d_{\mathbf{A}}=d_{\mathbf{B}}\). This proves both directions. \(\square\)

Worked Example: Comparing Two Characteristic Polynomials

Compare \(\mathbf{D}=\begin{bmatrix}3&1\\2&4\end{bmatrix}\) and \(\mathbf{E}=\begin{bmatrix}2&2\\1&5\end{bmatrix}\). Compute each polynomial directly and check whether their traces and determinants agree.

For \(\mathbf{D}\),

$$ \begin{aligned} p_{\mathbf{D}}(\lambda) &=\det\begin{bmatrix}3-\lambda&1\\2&4-\lambda\end{bmatrix}\\ &=(3-\lambda)(4-\lambda)-2\\ &=12-7\lambda+\lambda^2-2\\ &=\lambda^2-7\lambda+10. \end{aligned} $$

For \(\mathbf{E}\),

$$ \begin{aligned} p_{\mathbf{E}}(\lambda) &=\det\begin{bmatrix}2-\lambda&2\\1&5-\lambda\end{bmatrix}\\ &=(2-\lambda)(5-\lambda)-2\\ &=10-7\lambda+\lambda^2-2\\ &=\lambda^2-7\lambda+8. \end{aligned} $$

The trace calculations are \(\operatorname{tr}\mathbf{D}=3+4=7\) and \(\operatorname{tr}\mathbf{E}=2+5=7\). The determinants are \(\det\mathbf{D}=3\cdot4-1\cdot2=10\) and \(\det\mathbf{E}=2\cdot5-2\cdot1=8\). Thus the traces agree but the determinants differ, and the constant terms of the directly computed polynomials differ accordingly.

Check: Substituting the trace and determinant values gives \(p_{\mathbf{D}}(\lambda)=\lambda^2-7\lambda+10\) and \(p_{\mathbf{E}}(\lambda)=\lambda^2-7\lambda+8\), exactly matching both determinant expansions.

Common Sign Errors

Common mistake: A frequent incorrect calculation is to use \(\lambda^2+(\operatorname{tr}\mathbf{A})\lambda+\det\mathbf{A}\), putting a plus sign before the trace term. For example, for \(\mathbf{A}=\begin{bmatrix}2&3\\-1&4\end{bmatrix}\), this wrong rule would give \(\lambda^2+6\lambda+11\). But the definition gives \((2-\lambda)(4-\lambda)-3(-1)=\lambda^2-6\lambda+11\). The correction is to expand the two diagonal factors: the linear terms are \(-2\lambda\) and \(-4\lambda\), so their sum is \(-6\lambda\). In general, this is why the coefficient is \(-\operatorname{tr}\mathbf{A}\), not \(+\operatorname{tr}\mathbf{A}\).

A second source of errors is forgetting that the determinant subtracts the product of the off-diagonal entries. For \(\mathbf{B}\) above, the off-diagonal product is \((-2)(3)=-6\), and the determinant contribution is \(-(-6)=+6\). Replacing it by \(-6\) would give the wrong constant term. Keeping the expression \(ad-bc\) intact until the signs of \(b\) and \(c\) have been substituted helps prevent this error.

Use the formula only after confirming the matrix is two-by-two. It follows from the two-by-two determinant rule; a matrix of a different size requires a determinant calculation appropriate to that size. For a two-by-two matrix, a reliable routine is to identify \(a,b,c,d\), compute \(a+d\) and \(ad-bc\), and assemble \(\lambda^2-(a+d)\lambda+(ad-bc)\). If there is any doubt, expand \(\det(\mathbf{A}-\lambda\mathbf{I}_2)\) independently and compare coefficients.

Why This Form Is Useful

Writing the characteristic polynomial in terms of trace and determinant separates two kinds of information. The trace supplies the coefficient of the linear term, while the determinant supplies the constant term. The worked comparison shows that matching traces alone does not ensure matching characteristic polynomials: the determinants must match as well. Conversely, for two-by-two matrices, matching both quantities is sufficient, as the proved equivalence shows.

Earlier material on characteristic polynomials establishes their connection with eigenvalues. This calculation provides an efficient way to form the polynomial in dimension two before using that connection. The task here is to compute and check the polynomial, not to solve it: first make the determinant expansion correct, then identify its coefficients without changing the sign convention.

Check Your Understanding

For each calculation, use the definition \(p_{\mathbf{A}}(\lambda)=\det(\mathbf{A}-\lambda\mathbf{I}_2)\), and check the result using trace and determinant.

  1. Find the characteristic polynomial of \(\begin{bmatrix}0&1\\-4&3\end{bmatrix}\).
  2. For \(\begin{bmatrix}-2&3\\1&5\end{bmatrix}\), calculate the trace and determinant before writing the polynomial.
  3. A two-by-two matrix has trace \(-4\) and determinant \(7\). Write its characteristic polynomial.
  4. Two two-by-two matrices have equal characteristic polynomials. What must be true of their traces and determinants? Justify the answer using coefficient comparison.
  5. Identify and correct the sign error in the proposed formula \(p_{\mathbf{A}}(\lambda)=\lambda^2+(\operatorname{tr}\mathbf{A})\lambda+\det\mathbf{A}\).

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon