Tutorials › Linear Algebra › Using Cramer’s Rule When Only One Unknown Is Needed

Cramer's Rule, Adjugate and Volume · Tutorial 261 of 1000

Using Cramer's Rule When Only One Unknown Is Needed

Use one column-replacement determinant to find a chosen coordinate without calculating the system’s other coordinates.

Intermediate 9 min read

What You'll Learn

  • Identify when a square system has a unique solution and Cramer’s rule applies.
  • Replace only the coefficient column corresponding to the coordinate you need.
  • Prove the determinant identity behind the one-coordinate formula.
  • Compute a selected coordinate in numerical and parameterized systems.
  • Recognize why replacing a row or using the rule when the determinant is zero gives an invalid answer.

Find One Coordinate Without Solving for Every Unknown

Sometimes a system has a unique solution, but the question asks only for one of its coordinates. Solving for every unknown can be unnecessary work. Cramer’s rule gives a direct formula for the chosen coordinate: keep the coefficient matrix, replace just the column belonging to that unknown by the right-hand side, and take a ratio of determinants. The column position matters because it identifies which coordinate is being selected.

Let \(\mathbf{A}\in\mathbb{R}^{n\times n}\) and \(\mathbf{b}\in\mathbb{R}^n\). The system \(\mathbf{A}\mathbf{x}=\mathbf{b}\) has a unique solution exactly when \(\det\mathbf{A}\ne0\), by the determinant test for invertibility. For \(j\in\{1,\dots,n\}\), write \(\mathbf{A}_j(\mathbf{b})\) for the matrix obtained from \(\mathbf{A}\) by replacing its \(j\)-th column with \(\mathbf{b}\), leaving every other column unchanged.

One-coordinate form of Cramer’s rule: If \(\mathbf{A}\in\mathbb{R}^{n\times n}\) and \(\det\mathbf{A}\ne0\), then the unique solution of \(\mathbf{A}\mathbf{x}=\mathbf{b}\) satisfies $$ x_j=\frac{\det\mathbf{A}_j(\mathbf{b})}{\det\mathbf{A}} \qquad (j=1,\dots,n). $$ To find only \(x_j\), calculate only the denominator and the determinant with column \(j\) replaced.

This formula does not apply to a nonsquare coefficient matrix, and it does not give a solution coordinate when \(\det\mathbf{A}=0\). In the latter case the square system does not have a unique solution, so the hypothesis needed for the formula is absent. The numerator and denominator may both be zero; their quotient is then undefined, not an answer. The determinant test tells us whether to proceed, and Cramer’s rule tells us how to calculate the requested coordinate once that test succeeds.

Why Replacing That Column Works

The key idea is to express the right-hand side using the columns of \(\mathbf{A}\). Write those columns as \(\mathbf{a}_1,\dots,\mathbf{a}_n\). If \(\mathbf{x}=(x_1,\dots,x_n)^{\top}\) solves the system, then the definition of matrix multiplication gives \(\mathbf{b}=\sum_{i=1}^{n}x_i\mathbf{a}_i\). In the determinant of \(\mathbf{A}_j(\mathbf{b})\), substitute this sum into its \(j\)-th column and use linearity in that column. Every term except one has a repeated column and therefore determinant zero.

Theorem (Column-replacement identity): Let \(\mathbf{A}\in\mathbb{R}^{n\times n}\), let \(\mathbf{x}\in\mathbb{R}^n\), and set \(\mathbf{b}=\mathbf{A}\mathbf{x}\). For every \(j\in\{1,\dots,n\}\), $$ \det\mathbf{A}_j(\mathbf{b})=x_j\det\mathbf{A}. $$

Proof. Let \(\mathbf{a}_1,\dots,\mathbf{a}_n\) be the columns of \(\mathbf{A}\). Since \(\mathbf{b}=\mathbf{A}\mathbf{x}\), its column expansion is \(\mathbf{b}=\sum_{i=1}^{n}x_i\mathbf{a}_i\). The determinant is linear in each column while the other columns are held fixed, so $$ \det\mathbf{A}_j(\mathbf{b}) =\sum_{i=1}^{n}x_i\det(\mathbf{a}_1,\dots,\mathbf{a}_{j-1},\mathbf{a}_i,\mathbf{a}_{j+1},\dots,\mathbf{a}_n). $$ For every \(i\ne j\), the determinant in that term has \(\mathbf{a}_i\) in both column \(i\) and column \(j\), so it is zero because a determinant with two equal columns is zero. The only term that can remain is the term \(i=j\). Its determinant is \(\det\mathbf{A}\), and its coefficient is \(x_j\). Therefore \(\det\mathbf{A}_j(\mathbf{b})=x_j\det\mathbf{A}\). \(\square\)

To obtain the one-coordinate formula, apply this identity to the solution of the system. When \(\det\mathbf{A}\ne0\), division by that determinant is permitted. The solution is unique by the determinant test for invertibility, so the resulting value is the coordinate of that unique solution, not merely one possible choice.

Corollary (Cramer’s rule for a specified coordinate): If \(\mathbf{A}\in\mathbb{R}^{n\times n}\), \(\det\mathbf{A}\ne0\), and \(\mathbf{A}\mathbf{x}=\mathbf{b}\), then \(x_j=\det\mathbf{A}_j(\mathbf{b})/\det\mathbf{A}\) for each \(j\).

Proof. The column-replacement identity gives \(\det\mathbf{A}_j(\mathbf{b})=x_j\det\mathbf{A}\). Since \(\det\mathbf{A}\ne0\), divide both sides by \(\det\mathbf{A}\) to obtain \(x_j=\det\mathbf{A}_j(\mathbf{b})/\det\mathbf{A}\). \(\square\)

The proof also explains why this approach can avoid finding the other coordinates: the determinant with column \(j\) replaced isolates \(x_j\), because every other coefficient multiplies a determinant with repeated columns. It does not mean that the calculation is free of work—the two determinants still need to be evaluated—but no other solution coordinate has to be found.

Worked Applications

Worked Example: Find the Second Coordinate

Find only \(x_2\) for the system with coefficient matrix \(\mathbf{A}\) and right-hand side \(\mathbf{b}\) below.

$$ \mathbf{A}= \begin{bmatrix} 1&2&0\\ 0&1&1\\ 2&0&1 \end{bmatrix}, \qquad \mathbf{b}= \begin{bmatrix} 5\\4\\7 \end{bmatrix}. $$

First check the condition for Cramer’s rule. Expanding \(\det\mathbf{A}\) along the first row gives $$ \det\mathbf{A} =1(1\cdot1-1\cdot0)-2(0\cdot1-1\cdot2)+0 =1-2(-2)=5. $$ The determinant is nonzero, so the system has a unique solution. To find \(x_2\), replace column 2, not a row and not either of the other columns, by \(\mathbf{b}\): $$ \mathbf{A}_2(\mathbf{b})= \begin{bmatrix} 1&5&0\\ 0&4&1\\ 2&7&1 \end{bmatrix}. $$ Expanding along the first row, $$ \det\mathbf{A}_2(\mathbf{b}) =1(4\cdot1-1\cdot7)-5(0\cdot1-1\cdot2)+0 =-3-5(-2)=7. $$ Thus \(x_2=7/5\).

Check: The denominator calculation gives \(5\), and \( (7/5)\det\mathbf{A}=(7/5)\cdot5=7\), which agrees with the independently expanded replacement determinant. This checks the selected coordinate by the column-replacement identity without calculating \(x_1\) or \(x_3\).

Worked Example: Find the Third Coordinate

For the system \(\mathbf{A}\mathbf{x}=\mathbf{b}\), calculate only \(x_3\).

$$ \mathbf{A}= \begin{bmatrix} 2&1&0\\ 1&1&1\\ 0&2&1 \end{bmatrix}, \qquad \mathbf{b}= \begin{bmatrix} 3\\4\\5 \end{bmatrix}. $$

Expand the coefficient determinant along the first row: $$ \det\mathbf{A} =2(1\cdot1-1\cdot2)-1(1\cdot1-1\cdot0)+0 =2(-1)-1=-3. $$ This is nonzero, so the system has a unique solution. Replacing column 3 gives $$ \mathbf{A}_3(\mathbf{b})= \begin{bmatrix} 2&1&3\\ 1&1&4\\ 0&2&5 \end{bmatrix}. $$ Its determinant, again expanded along the first row, is $$ \det\mathbf{A}_3(\mathbf{b}) =2(1\cdot5-4\cdot2)-1(1\cdot5-4\cdot0)+3(1\cdot2-1\cdot0) =-6-5+6=-5. $$ Therefore $$ x_3=\frac{-5}{-3}=\frac{5}{3}. $$

Check: Multiplying the proposed coordinate by the denominator gives \((5/3)(-3)=-5\), exactly the replacement determinant. The sign of the denominator is negative, as is the sign of the numerator, so the coordinate is positive.

Worked Example: A Parameter and a Requested Coordinate

For which real values of \(t\) does the system below have a unique solution, and what is \(x_3\) whenever the solution is unique?

$$ \begin{bmatrix} 1&1&0\\ 0&t+1&1\\ 1&0&1 \end{bmatrix} \begin{bmatrix} x_1\\x_2\\x_3 \end{bmatrix} = \begin{bmatrix} 3\\2t+1\\0 \end{bmatrix}. $$

Call the coefficient matrix \(\mathbf{A}\). Expanding along its first row, $$ \det\mathbf{A} =1((t+1)\cdot1-1\cdot0)-1(0\cdot1-1\cdot1)+0 =t+1-(-1)=t+2. $$ By the determinant test, the system has a unique solution exactly when \(t+2\ne0\), or \(t\ne-2\). To find only the third coordinate, replace the third column with the right-hand side: $$ \mathbf{A}_3(\mathbf{b})= \begin{bmatrix} 1&1&3\\ 0&t+1&2t+1\\ 1&0&0 \end{bmatrix}. $$ Expanding along the first row gives $$ \det\mathbf{A}_3(\mathbf{b}) =1((t+1)\cdot0-(2t+1)\cdot0) -1(0\cdot0-(2t+1)\cdot1) +3(0\cdot0-(t+1)\cdot1) =0+(2t+1)-3(t+1) =-t-2. $$ For \(t\ne-2\), the rule therefore gives $$ x_3=\frac{-t-2}{t+2}=-1. $$

Check: For every allowed \(t\), \((-1)(t+2)=-t-2\), which matches the replacement determinant. At \(t=-2\), both determinants are zero, so the quotient is \(0/0\) and Cramer’s rule does not determine a coordinate; that parameter is excluded because the system does not have a unique solution.

Common Pitfall: Replacing a Row Instead

Cramer’s rule for a coordinate replaces the corresponding column. A row records an equation, whereas column \(j\) records the coefficients multiplying \(x_j\). Replacing row \(j\) therefore does not isolate \(x_j\). The numerical system in the first example makes the error visible. Replacing its second row by \(\mathbf{b}^{\top}=(5,4,7)\), for instance, produces $$ \begin{bmatrix} 1&2&0\\ 5&4&7\\ 2&0&1 \end{bmatrix}, \qquad \det=1(4\cdot1-7\cdot0)-2(5\cdot1-7\cdot2)=4-2(-9)=22. $$ Dividing this value by the original determinant \(5\) gives \(22/5\), not \(x_2=7/5\). The row-replacement calculation is valid as a determinant calculation, but it is not the Cramer numerator for \(x_2\).

Another error is to replace every column by \(\mathbf{b}\). That forms a different matrix and does not isolate one coordinate: the proof relies specifically on replacing one column while leaving all the others in place. Before calculating, name the requested index \(j\), confirm \(\det\mathbf{A}\ne0\), and mark column \(j\) in the original coefficient matrix.

A Practical Checklist

1
Check the system.
Confirm that the coefficient matrix is square and calculate \(\det\mathbf{A}\). Continue only if the determinant is nonzero.
2
Locate the unknown.
If the requested coordinate is \(x_j\), identify column \(j\), using the same ordering as \(\mathbf{x}=(x_1,\dots,x_n)^{\top}\).
3
Replace just that column.
Form \(\mathbf{A}_j(\mathbf{b})\) by inserting the entries of \(\mathbf{b}\) in column \(j\), without changing any other column.
4
Take the ratio and check it.
Calculate \(x_j=\det\mathbf{A}_j(\mathbf{b})/\det\mathbf{A}\), then verify that the numerator equals the proposed coordinate multiplied by \(\det\mathbf{A}\).

This method is useful when the requested output is genuinely a single coordinate—for example, when reporting one component of a model’s solution or checking a particular unknown. It avoids calculating other coordinates, but it does not necessarily reduce the determinant work: the denominator and replacement determinant still have to be evaluated. The next question, once the requested coordinate is clear, is whether these determinant calculations are more efficient than another method for the size and structure of the system.

Check Your Understanding

For each problem, state the determinant condition before applying the coordinate formula. Keep the replacement column aligned with the requested unknown.

  1. For \(\mathbf{A}=\begin{bmatrix}1&0&1\\2&1&0\\0&1&1\end{bmatrix}\) and \(\mathbf{b}=\begin{bmatrix}4\\3\\2\end{bmatrix}\), set up the two determinants needed to find only \(x_2\).
  2. Explain why the formula for \(x_j\) cannot be used when \(\det\mathbf{A}=0\), even if a replacement determinant can be calculated.
  3. Prove the column-replacement identity when \(n=2\), writing out its two terms and identifying the one that vanishes.
  4. A student replaces row 3 to find \(x_3\). Explain precisely which part of the Cramer argument that operation fails to use.
  5. If a system has a unique solution and the requested coordinate is \(x_1\), which column is replaced, and what is the denominator in the ratio?

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