Skip to content

Mathematics · Ch 4 — Determinants and Matrices

Cramer's Rule

4.3.1

Cramer's Rule

4.3.1 Cramer's Rule

Theorem. Consider three linear equations in three variables x,y,zx,y,z:

a1x+b1y+c1z=d1,a2x+b2y+c2z=d2,a3x+b3y+c3z=d3a_1x+b_1y+c_1z=d_1,\qquad a_2x+b_2y+c_2z=d_2,\qquad a_3x+b_3y+c_3z=d_3

where ai,bi,ci,dia_i,b_i,c_i,d_i are constants. Provided

D=∣a1b1c1a2b2c2a3b3c3∣≠0,D=\begin{vmatrix}a_1&b_1&c_1\\a_2&b_2&c_2\\a_3&b_3&c_3\end{vmatrix}\neq 0,

the (unique) solution is

x=DxD,y=DyD,z=DzDx=\frac{D_x}{D},\qquad y=\frac{D_y}{D},\qquad z=\frac{D_z}{D}

where Dx,Dy,DzD_x,D_y,D_z are obtained from DD by replacing the column of coefficients of xx, yy, zz respectively with the constants column d1,d2,d3d_1,d_2,d_3:

Dx=∣d1b1c1d2b2c2d3b3c3∣,Dy=∣a1d1c1a2d2c2a3d3c3∣,Dz=∣a1b1d1a2b2d2a3b3d3∣D_x=\begin{vmatrix}d_1&b_1&c_1\\d_2&b_2&c_2\\d_3&b_3&c_3\end{vmatrix},\qquad D_y=\begin{vmatrix}a_1&d_1&c_1\\a_2&d_2&c_2\\a_3&d_3&c_3\end{vmatrix},\qquad D_z=\begin{vmatrix}a_1&b_1&d_1\\a_2&b_2&d_2\\a_3&b_3&d_3\end{vmatrix}

Remarks. (1) The full proof (obtained by solving the system algebraically and matching the result against the determinant expansions above) is referenced via a QR code in the textbook rather than spelled out; the essential idea is that eliminating two of the three unknowns from the three equations, by the usual elimination method, reproduces exactly the ratios Dx/D,Dy/D,Dz/DD_x/D, D_y/D, D_z/D. (2) If D=0D=0, Cramer's Rule does not apply — the system either has no solution or infinitely many (it is not possible to conclude a unique solution).

Worked Examples

Example 1. Solve x+y+z=6, x−y+z=2, x+2y−z=2x+y+z=6,\ x-y+z=2,\ x+2y-z=2 using Cramer's Rule.

Step 1: D=∣1111−1112−1∣=1(1−2)−1(−1−1)+1(2+1)=−1+2+3=4D=\begin{vmatrix}1&1&1\\1&-1&1\\1&2&-1\end{vmatrix}=1(1-2)-1(-1-1)+1(2+1)=-1+2+3=4.

Step 2: Dx=∣6112−1122−1∣=6(1−2)−1(−2−2)+1(4+2)=−6+4+6=4D_x=\begin{vmatrix}6&1&1\\2&-1&1\\2&2&-1\end{vmatrix}=6(1-2)-1(-2-2)+1(4+2)=-6+4+6=4.

Step 3: Dy=∣16112112−1∣=1(−2−2)−6(−1−1)+1(2−2)=−4+12+0=8D_y=\begin{vmatrix}1&6&1\\1&2&1\\1&2&-1\end{vmatrix}=1(-2-2)-6(-1-1)+1(2-2)=-4+12+0=8.

Step 4: Dz=∣1161−12122∣=1(−2−4)−1(2−2)+6(2+1)=−6+0+18=12D_z=\begin{vmatrix}1&1&6\\1&-1&2\\1&2&2\end{vmatrix}=1(-2-4)-1(2-2)+6(2+1)=-6+0+18=12. …

Misc 4.3.1Worked Example 1 — solving a 3×3 system by Cramer's Rule

Worked out. Three purchase totals (different combinations of books/notebooks/pens with given total costs) are turned into three linear equations and solved by Cramer's Rule to find the price of one of each item. …

Misc 4.3.1Worked Example 2 — a second 3×3 system by Cramer's Rule

Worked out. Three purchase totals (different combinations of books/notebooks/pens with given total costs) are turned into three linear equations and solved by Cramer's Rule to find the price of one of each item. …

Misc 4.3.1Worked Example 3 — a system disguised with 1/x, 1/y, 1/z

Worked out. Three purchase totals (different combinations of books/notebooks/pens with given total costs) are turned into three linear equations and solved by Cramer's Rule to find the price of one of each item. …

Misc 4.3.1Worked Example 4 — word problem (cost of books, notebooks, pens)

Worked out. Three purchase totals (different combinations of books/notebooks/pens with given total costs) are turned into three linear equations and solved by Cramer's Rule to find the price of one of each item. …