Tutorials › Linear Algebra › The Determinant of a Two-by-Two Matrix

Determinants by Cofactor Expansion · Tutorial 211 of 1000

The Determinant of a Two-by-Two Matrix

Use the two-by-two formula accurately, simplify symbolic determinants, and interpret the resulting scalar without confusing it with the matrix.

Beginner 9 min read

What You'll Learn

  • State the determinant formula for a real two-by-two matrix.
  • Compute determinants with negative and symbolic entries.
  • Use parentheses to preserve the signs in products and subtraction.
  • Distinguish a matrix from its determinant, which is a scalar.
  • Prove the two-by-two criterion connecting zero determinant and dependent columns.
  • Determine how swapping rows or columns changes the determinant.

The Determinant Is a Scalar

A matrix and its determinant are different kinds of objects. A two-by-two matrix is an array of four entries; its determinant is one real number computed from those entries. The formula is short, but the order of its products and the subtraction between them matter. This tutorial develops that formula, applies it to numerical and symbolic matrices, and proves two facts that help explain what the number tells us in the two-by-two case.

Throughout, the entries are real. Write a two-by-two matrix as \(\mathbf{A}=\begin{bmatrix}a&b\\c&d\end{bmatrix}\), with first column \(\mathbf{a}_1=(a,c)^{\top}\) and second column \(\mathbf{a}_2=(b,d)^{\top}\). The determinant is denoted by \(\det\mathbf{A}\). It is not another name for \(\mathbf{A}\): \(\mathbf{A}\) is a matrix, while \(\det\mathbf{A}\in\mathbb{R}\) is a scalar.

Definition: For \(\mathbf{A}=\begin{bmatrix}a&b\\c&d\end{bmatrix}\in\mathbb{R}^{2\times2}\), the determinant of \(\mathbf{A}\) is the real number $$ \det\mathbf{A}=ad-bc. $$ The first product uses the upper-left and lower-right entries; the second uses the upper-right and lower-left entries.

The formula applies to every two-by-two matrix, including matrices with zero entries and matrices whose determinant is zero. It does not produce a new two-by-two matrix. Parentheses are especially useful when entries are negative or contain expressions: first form each product, then subtract the entire second product from the first.

Computing with Exact Entries

Worked Example: A Matrix with a Negative Entry

Find the determinant of \(\mathbf{A}=\begin{bmatrix}3&-2\\5&4\end{bmatrix}\).

Here \(a=3\), \(b=-2\), \(c=5\), and \(d=4\). Substitution into the definition gives

$$ \begin{aligned} \det\mathbf{A} &=ad-bc\\ &=(3)(4)-(-2)(5)\\ &=12-(-10)\\ &=22. \end{aligned} $$

Check: the two products from the entries are \(3\cdot4=12\) and \((-2)\cdot5=-10\). Subtracting the second product gives \(12-(-10)=22\), so the negative sign in the formula has been applied to the whole product \(-10\). The answer \(22\) is a scalar, not a matrix.

When the entries contain variables, the same definition applies. The only extra work is to expand and simplify the products. The determinant remains an expression in the variables until particular values are substituted.

Worked Example: A Symbolic Determinant

Compute the determinant of \(\mathbf{B}=\begin{bmatrix}x+1&2\\3&x-1\end{bmatrix}\), where \(x\in\mathbb{R}\).

Apply the formula using the two diagonal products:

$$ \begin{aligned} \det\mathbf{B} &=(x+1)(x-1)-(2)(3)\\ &=(x^2-x+x-1)-6\\ &=x^2-7. \end{aligned} $$

Check: multiplying the entries in the first product gives \((x+1)(x-1)=x^2-1\); the other product is \(2\cdot3=6\). Their difference is \((x^2-1)-6=x^2-7\), as found. Thus the determinant is the scalar expression \(x^2-7\), not the matrix \(\mathbf{B}\).

A parameter can also be used to ask when a determinant vanishes. The calculation must still follow the same product-minus-product order; setting the resulting scalar expression equal to zero then identifies the relevant parameter values.

Worked Example: Finding When the Determinant Is Zero

For which real values of \(t\) does \(\mathbf{C}=\begin{bmatrix}2&t\\3&6\end{bmatrix}\) have determinant zero?

Calculate the determinant, then solve the scalar equation:

$$ \begin{aligned} \det\mathbf{C} &=(2)(6)-(t)(3)\\ &=12-3t. \end{aligned} $$

The determinant is zero exactly when \(12-3t=0\). Therefore \(3t=12\), so \(t=4\).

Check: substituting \(t=4\) gives \(\det\begin{bmatrix}2&4\\3&6\end{bmatrix}=2\cdot6-4\cdot3=12-12=0\). For any \(t\ne4\), \(12-3t\ne0\), so the determinant is not zero.

What a Zero Determinant Says About the Columns

For a two-by-two matrix, the formula gives a direct test for whether its two columns are linearly dependent. Two vectors are linearly dependent when some linear combination of them, with coefficients not both zero, equals \(\mathbf{0}\). The following result is specific here to two columns in \(\mathbb{R}^2\), and we can prove it directly from the formula.

Theorem: Let \(\mathbf{A}=\begin{bmatrix}a&b\\c&d\end{bmatrix}\in\mathbb{R}^{2\times2}\), with columns \(\mathbf{a}_1=(a,c)^{\top}\) and \(\mathbf{a}_2=(b,d)^{\top}\). The columns are linearly dependent if and only if \(\det\mathbf{A}=0\).

Proof. First suppose the columns are dependent. Then there are real numbers \(r,s\), not both zero, such that \(r\mathbf{a}_1+s\mathbf{a}_2=\mathbf{0}\). If \(s\ne0\), rearranging gives \(\mathbf{a}_2=(-r/s)\mathbf{a}_1\), so for some real \(q\), \(b=qa\) and \(d=qc\). Therefore \(ad-bc=a(qc)-(qa)c=0\). If instead \(s=0\), then \(r\ne0\), and \(r\mathbf{a}_1=\mathbf{0}\) forces \(\mathbf{a}_1=\mathbf{0}\); hence \(a=c=0\) and \(ad-bc=0\). Thus dependence implies \(\det\mathbf{A}=0\).

Conversely, suppose \(ad-bc=0\). If \(\mathbf{a}_1=\mathbf{0}\), the columns are dependent because \(1\mathbf{a}_1+0\mathbf{a}_2=\mathbf{0}\) has coefficients not both zero. Now suppose \(\mathbf{a}_1\ne\mathbf{0}\). If \(a\ne0\), the equation \(ad-bc=0\) gives \(d=bc/a\), so \(\mathbf{a}_2=(b/a)\mathbf{a}_1\). If \(a=0\), then \(c\ne0\). The determinant equation becomes \(-bc=0\), which forces \(b=0\). In this case \(\mathbf{a}_2=(d/c)\mathbf{a}_1\). In either case the second column is a multiple of the first, so the columns are dependent. Both implications hold, and \(\det\mathbf{A}=0\) is equivalent to dependence. \(\square\)

This test concerns the columns of the matrix, not the numerical size of its entries. For example, in the preceding parameter problem, at \(t=4\) the second column \((4,6)^{\top}\) is twice the first column \((2,3)^{\top}\), consistent with the zero determinant. The proof also handles a zero column; it does not assume that either column is nonzero.

Swapping Rows or Columns

The two-by-two formula also makes the effect of a row or column swap easy to verify. In this specific size, swapping either pair changes the sign of the determinant. This result can be useful as a check on a calculation, but it does not say that the determinant is unchanged under a swap.

Theorem: For \(\mathbf{A}=\begin{bmatrix}a&b\\c&d\end{bmatrix}\in\mathbb{R}^{2\times2}\), interchanging the two rows or interchanging the two columns produces a matrix whose determinant is \(-\det\mathbf{A}\).

Proof. Swapping the rows gives \(\begin{bmatrix}c&d\\a&b\end{bmatrix}\). Its determinant, using the definition, is \(cb-da\). Since real-number multiplication commutes, \(cb=bc\) and \(da=ad\), so \(cb-da=bc-ad=-(ad-bc)=-\det\mathbf{A}\). Swapping the columns gives \(\begin{bmatrix}b&a\\d&c\end{bmatrix}\). Its determinant is \(bc-ad=-(ad-bc)=-\det\mathbf{A}\). The calculation proves the claimed sign change for each swap. \(\square\)

Worked Example: Checking the Sign After a Swap

Let \(\mathbf{D}=\begin{bmatrix}1&3\\2&5\end{bmatrix}\). Compute its determinant and the determinant after swapping its columns.

For the original matrix,

$$ \det\mathbf{D}=(1)(5)-(3)(2)=5-6=-1. $$

After swapping the columns, the matrix is \(\begin{bmatrix}3&1\\5&2\end{bmatrix}\), and its determinant is

$$ (3)(2)-(1)(5)=6-5=1. $$

Check: \(1=-(-1)\), so the new determinant is the negative of the original determinant, as the theorem predicts.

Common Mistakes and a Reliable Check

Reversing the products changes the sign. For \(\mathbf{A}=\begin{bmatrix}3&-2\\5&4\end{bmatrix}\), a wrong calculation is \(bc-ad=(-2)(5)-(3)(4)=-10-12=-22\). That expression reverses the order of the defining formula. The correction is \(ad-bc=(3)(4)-(-2)(5)=12-(-10)=22\). Reversing the two terms in a subtraction produces the negative of the correct value.

Keep a negative product grouped. In \(ad-bc\), if \(bc=-10\), the calculation is \(12-(-10)\), not \(12-10\). A safe procedure is to write each product in parentheses before carrying out the subtraction.

Do not confuse the determinant with the matrix. For \(\mathbf{D}=\begin{bmatrix}1&3\\2&5\end{bmatrix}\), \(\det\mathbf{D}=-1\). The matrix still has four entries, while \(-1\) is one real number. Writing \(\mathbf{D}=-1\) would equate objects of different kinds. A precise statement is that the determinant of \(\mathbf{D}\) equals \(-1\).

For any two-by-two determinant calculation, identify \(a,b,c,d\) from their positions, write \(ad-bc\), and substitute with parentheses. If the result is zero, the theorem above says the columns are dependent; if the result is nonzero, they are independent. These conclusions apply to the columns of a two-by-two real matrix, and the formula itself remains the definition in either case.

Check Your Understanding

For each question, begin with the defining formula and keep the two products visible before simplifying.

  1. Compute the determinant of \(\begin{bmatrix}4&-3\\2&5\end{bmatrix}\).
  2. Find and simplify the determinant of \(\begin{bmatrix}x&2\\5&x+1\end{bmatrix}\).
  3. For which real \(t\) does \(\begin{bmatrix}3&t\\6&4\end{bmatrix}\) have determinant zero?
  4. State whether \(\det\begin{bmatrix}2&4\\1&2\end{bmatrix}=0\) implies that its columns are dependent, and justify your answer using the theorem.
  5. If the columns of a two-by-two matrix are interchanged, what happens to its determinant? Verify your answer directly for \(\begin{bmatrix}1&2\\3&7\end{bmatrix}\).

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