From a Three-Variable System to Determinants
A system of three linear equations in three unknowns can be written as \(\mathbf{A}\mathbf{x}=\mathbf{b}\), where \(\mathbf{A}\in\mathbb{R}^{3\times3}\) is the coefficient matrix, \(\mathbf{x}=(x_1,x_2,x_3)^\top\), and \(\mathbf{b}\in\mathbb{R}^3\). When \(\det\mathbf{A}\ne0\), Cramer’s Rule gives each unknown as a ratio of determinants. The main work is often not the rule itself but choosing a useful cofactor expansion for each determinant and keeping the signs straight.
For a \(3\times3\) matrix, a cofactor expansion writes its determinant as a sum of three terms. Each term is one matrix entry multiplied by a signed \(2\times2\) minor. The minor is formed by deleting the row and column containing that entry; its sign is positive or negative according to the entry’s position. In practice, an expansion along a row or column with zeros usually requires fewer calculations. Since replacing a different column changes the entries, the best expansion can differ from one Cramer determinant to another.
The signs follow the checkerboard pattern \(\begin{bmatrix}+&-&+\\-&+&-\\+&-&+\end{bmatrix}\). For example, the cofactor at position \((2,1)\) has a negative sign, while the cofactor at position \((1,3)\) has a positive sign. The determinant formula for a \(2\times2\) matrix is \(\begin{vmatrix}a&b\\c&d\end{vmatrix}=ad-bc\).
Proof. By the permutation definition of the determinant, each term corresponds to a choice of one entry in each row and each column, with sign equal to the sign of the corresponding permutation. To expand along row \(i\), group the determinant terms according to the column \(j\) chosen for that row. In each group, the factor from row \(i\) is \(a_{ij}\). The remaining two factors form the determinant of the matrix with row \(i\) and column \(j\) deleted, with the sign adjusted by \((-1)^{i+j}\). Thus the group is \(a_{ij}C_{ij}\), and summing the three groups gives the row expansion. Grouping instead by the row chosen for a fixed column gives the column expansion by the same permutation argument. \(\square\)
Cramer’s Rule and Its Requirement
Let \(\mathbf{a}_1,\mathbf{a}_2,\mathbf{a}_3\) be the columns of \(\mathbf{A}\). For \(k=1,2,3\), let \(\mathbf{A}_k(\mathbf{b})\) be the matrix obtained by replacing column \(k\) of \(\mathbf{A}\) with \(\mathbf{b}\). The denominator is the coefficient determinant \(D=\det\mathbf{A}\), while the numerator for \(x_k\) is \(D_k=\det\mathbf{A}_k(\mathbf{b})\).
Proof. Since \(\det\mathbf{A}\ne0\), the determinant test for invertibility gives an inverse for \(\mathbf{A}\); hence \(\mathbf{A}\mathbf{x}=\mathbf{b}\) has a unique solution. For that solution, \(\mathbf{b}=x_1\mathbf{a}_1+x_2\mathbf{a}_2+x_3\mathbf{a}_3\). Fix \(k\) and use linearity of the determinant in column \(k\) of \(\mathbf{A}_k(\mathbf{b})\). The term involving \(x_k\) is \(x_k\det\mathbf{A}\). Each term involving \(x_j\) with \(j\ne k\) has two equal columns, namely \(\mathbf{a}_j\), so its determinant is zero. Therefore \(\det\mathbf{A}_k(\mathbf{b})=x_k\det\mathbf{A}\). Division by the nonzero number \(\det\mathbf{A}\) gives the stated formula for each \(k\). \(\square\)
The condition \(\det\mathbf{A}\ne0\) is essential: it is what makes the quotients defined and guarantees a unique solution. If the coefficient determinant is zero, these formulas cannot be used to conclude that a unique solution exists. The first step in any Cramer calculation is therefore to compute \(D\) and check that it is nonzero.
Choose an Expansion for Each Determinant
Worked Example: A Sparse Row in the Coefficient Matrix
Solve the system \(x_1+2x_3=1\), \(x_2+3x_3=2\), \(2x_1+x_3=5\) by Cramer’s Rule.
The coefficient matrix and right-hand side are
Row 1 has a zero, and row 2 has two zeros, so expand \(D=\det\mathbf{A}\) along row 2. Its only nonzero entry is \(1\) in position \((2,2)\), whose cofactor sign is positive:
Since \(D\ne0\), Cramer’s Rule applies. For \(D_1\), replace column 1 with \(\mathbf{b}\). Column 2 still has just one nonzero entry, so expand down that column:
For \(D_2\), replace column 2. Expanding along row 2 uses its zero in column 3 and accounts for the negative cofactor sign at position \((2,1)\):
For \(D_3\), row 2 has only one nonzero entry, so use that row:
The coordinates are \(x_1=D_1/D=3\), \(x_2=D_2/D=5\), and \(x_3=D_3/D=-1\). Check them in the original equations: \(3+2(-1)=1\), \(5+3(-1)=2\), and \(2(3)+(-1)=5\). All three equations hold.
This example illustrates the strategic choice: expansion down column 2 was efficient for \(D\) and \(D_1\), while a row expansion was convenient for \(D_2\) and \(D_3\). It is legitimate to choose a different row or column for every determinant; each expansion computes the same determinant for that particular matrix.
Worked Example: Track the Signs in a Dense Replacement
Solve \(x_1+2x_2+x_3=1\), \(x_2+3x_3=2\), \(2x_1+x_3=5\). Here the coefficient matrix has a useful sparse second row, but some replacement matrices are denser.
Write
Expand \(D\) along row 2. The entry \(1\) at \((2,2)\) contributes \(-1\), and the entry \(3\) at \((2,3)\) has a negative cofactor sign:
For \(D_1\), replacing column 1 gives a row with a zero in column 2, so expand along row 3, whose middle entry is also zero:
For \(D_2\), expand along row 2. The middle cofactor is positive; the last cofactor is negative:
For \(D_3\), row 2 again gives a short expansion:
Thus \(x_1=22/11=2\), \(x_2=-11/11=-1\), and \(x_3=11/11=1\). Substitution checks the solution: \(2+2(-1)+1=1\), \(-1+3(1)=2\), and \(2(2)+1=5\).
Expansion Choice and a Common Sign Error
For each determinant, inspect its rows and columns before calculating. A useful choice usually has the most zero entries; if there is a tie, compare the sizes of the nonzero entries and the minors that would remain. A zero entry contributes nothing, but it does not remove the need to use the cofactor sign for the other entries in that row or column. In a \(3\times3\) problem, all minors are \(2\times2\), so writing out each minor makes the arithmetic auditable.
Common mistake: losing the cofactor sign. For the coefficient matrix from the first worked example, expanding along row 1 gives
The entry \(2\) is in position \((1,3)\), whose sign is positive; the minor itself is \(0\cdot0-1\cdot2=-2\). A wrong calculation would change that cofactor sign to negative and write \(1-2(-2)=5\). The correction is to keep the position sign and the minor’s own value distinct: the contribution is \(+2(-2)=-4\), so the determinant is \(1-4=-3\). This agrees with the row-2 expansion used earlier.
A second pitfall is dividing by a zero determinant. If \(\det\mathbf{A}=0\), the Cramer quotients are undefined. For instance, the first two rows of \(\begin{bmatrix}1&2&3\\2&4&6\\0&1&1\end{bmatrix}\) are multiples, so its determinant is zero. The system with right-hand side \((1,3,0)^\top\) would require both \(x_1+2x_2+3x_3=1\) and \(2x_1+4x_2+6x_3=3\); doubling the first equation gives a left side matching the second but a right side of \(2\), not \(3\). Thus this system is inconsistent, and Cramer’s Rule does not apply.
A Reliable Calculation Sequence
Place the coefficients of \(x_1,x_2,x_3\) in columns 1, 2, and 3, and write the right-hand side as a column vector \(\mathbf{b}\).
Choose a row or column with zeros when possible. If \(D=0\), stop: the Cramer quotients cannot be formed.
For \(D_k\), replace only column \(k\) with \(\mathbf{b}\). Choose an expansion suited to that new matrix and preserve the checkerboard cofactor signs.
Use \(x_k=D_k/D\), then substitute the resulting coordinates into all three original equations.
The final substitution is more than a formality. It checks both the determinant arithmetic and the correspondence between each replacement determinant and its variable. If one equation fails, recheck the column replacement, the cofactor signs, and the \(2\times2\) minor calculations before accepting the result.
Check Your Understanding
For each system, begin by checking whether Cramer’s Rule applies. Keep the replacement matrices and expansions visible, then verify any solution in the original equations.
- For \(\mathbf{A}=\begin{bmatrix}1&0&1\\2&1&0\\0&3&1\end{bmatrix}\) and \(\mathbf{b}=\begin{bmatrix}4\\1\\5\end{bmatrix}\), compute \(D\) using a row or column with a zero.
- For \(\mathbf{A}=\begin{bmatrix}2&1&0\\1&1&1\\0&2&1\end{bmatrix}\) and \(\mathbf{b}=\begin{bmatrix}1\\2\\0\end{bmatrix}\), find the solution by Cramer’s Rule and check all three equations.
- In a cofactor expansion, what sign belongs to the entry in position \((2,3)\)? Explain how that sign combines with a negative minor.
- Why does \(\det\mathbf{A}=0\) prevent use of the Cramer quotients? Does it by itself show that a system is inconsistent?
- For \(\mathbf{A}=\begin{bmatrix}1&2&0\\0&1&3\\2&0&1\end{bmatrix}\), identify a row or column that is convenient for expanding \(\det\mathbf{A}\), and state why.