Solve System of Equations Using Cramer's Rule

medium CBSE JEE-MAIN JEE Main 2024 5 min read

Question

Solve the following system of equations using Cramer’s Rule:

x+y+z=6x + y + z = 6 2xy+z=32x - y + z = 3 x+2yz=2x + 2y - z = 2

Solution — Step by Step

The main determinant DD uses the coefficients of xx, yy, zz from the left-hand side. We must check D0D \neq 0 before proceeding — if D=0D = 0, Cramer’s Rule doesn’t apply (the system is either inconsistent or dependent).

D=111211121D = \begin{vmatrix} 1 & 1 & 1 \\ 2 & -1 & 1 \\ 1 & 2 & -1 \end{vmatrix}

Expanding along Row 1:

D=1112112111+12112D = 1\begin{vmatrix}-1 & 1 \\ 2 & -1\end{vmatrix} - 1\begin{vmatrix}2 & 1 \\ 1 & -1\end{vmatrix} + 1\begin{vmatrix}2 & -1 \\ 1 & 2\end{vmatrix} D=1(12)1(21)+1(4+1)=1+3+5=7D = 1(1-2) - 1(-2-1) + 1(4+1) = -1 + 3 + 5 = \mathbf{7}

To find xx, replace the first column with the RHS column (6,3,2)(6, 3, 2). This is the core idea behind Cramer’s Rule: each variable gets its own determinant where its coefficient column is swapped out.

Dx=611311221D_x = \begin{vmatrix} 6 & 1 & 1 \\ 3 & -1 & 1 \\ 2 & 2 & -1 \end{vmatrix} Dx=6(12)1(32)+1(6+2)=6(1)+5+8=6+5+8=7D_x = 6(-1-2) - 1(-3-2) + 1(6+2) = 6(-1) + 5 + 8 = -6 + 5 + 8 = \mathbf{7}

Wait — let me be careful with the cofactor of the first element: (1)(1)(1)(2)=12=1(-1)(-1) - (1)(2) = 1 - 2 = -1, so 6(1)=66(-1) = -6. Yes, Dx=7D_x = 7.

Dy=161231121D_y = \begin{vmatrix} 1 & 6 & 1 \\ 2 & 3 & 1 \\ 1 & 2 & -1 \end{vmatrix} Dy=1(32)6(21)+1(43)=5+18+1=14D_y = 1(-3-2) - 6(-2-1) + 1(4-3) = -5 + 18 + 1 = \mathbf{14} Dz=116213122D_z = \begin{vmatrix} 1 & 1 & 6 \\ 2 & -1 & 3 \\ 1 & 2 & 2 \end{vmatrix} Dz=1(26)1(43)+6(4+1)=81+30=21D_z = 1(-2-6) - 1(4-3) + 6(4+1) = -8 - 1 + 30 = \mathbf{21} x=DxD=77=1,y=DyD=147=2,z=DzD=217=3x = \frac{D_x}{D} = \frac{7}{7} = 1, \quad y = \frac{D_y}{D} = \frac{14}{7} = 2, \quad z = \frac{D_z}{D} = \frac{21}{7} = 3

Answer: x=1, y=2, z=3x = 1,\ y = 2,\ z = 3

Always verify: 1+2+3=61 + 2 + 3 = 6 ✓, 2(1)2+3=32(1) - 2 + 3 = 3 ✓, 1+2(2)3=21 + 2(2) - 3 = 2 ✓.


Why This Works

Cramer’s Rule is a direct application of the fact that the determinant measures “volume scaling.” When we replace a column with the RHS vector, the ratio Dx/DD_x / D isolates exactly how much each variable contributes — it’s essentially solving a linear transformation problem geometrically.

The formula works because the system AX=BAX = B has a unique solution when det(A)0\det(A) \neq 0, and we can express each variable as a ratio of two determinants. The numerator determinant captures the effect of the RHS on that specific variable’s dimension.

This method shines when we need just one variable from a large system — we can compute a single DiD_i instead of row-reducing the whole matrix. In JEE problems, this often saves 2-3 minutes compared to Gaussian elimination.


Alternative Method: Row Reduction

We can also solve this by augmenting the matrix [AB][A | B] and reducing to echelon form.

[111621131212]\begin{bmatrix} 1 & 1 & 1 & | & 6 \\ 2 & -1 & 1 & | & 3 \\ 1 & 2 & -1 & | & 2 \end{bmatrix}

R2R22R1R_2 \to R_2 - 2R_1 and R3R3R1R_3 \to R_3 - R_1:

[111603190124]\begin{bmatrix} 1 & 1 & 1 & | & 6 \\ 0 & -3 & -1 & | & -9 \\ 0 & 1 & -2 & | & -4 \end{bmatrix}

R2R2/(3)R_2 \to R_2 / (-3) gives R2=[0,1,1/3,3]R_2 = [0, 1, 1/3, | 3], then eliminate and back-substitute to get the same x=1,y=2,z=3x=1, y=2, z=3.

For JEE Main, Cramer’s Rule is typically faster when the question directly asks “use determinants” or gives a 3×33 \times 3 system. Row reduction is better when you suspect no solution or infinite solutions, since you can spot the contradiction earlier.


Common Mistake

The most common error is putting the RHS column in the wrong position. For DyD_y, students sometimes replace Column 1 instead of Column 2, or mix up column order after swapping. Write out the rule explicitly: for xx → replace Column 1; for yy → Column 2; for zz → Column 3. This cost marks in JEE Main 2024 Shift 1 where a similar 3-variable Cramer’s problem appeared.

A second slip: forgetting to check D0D \neq 0. If D=0D = 0, don’t compute DxD_x — the method is invalid and the examiner will award no marks for the mechanical steps.

Want to master this topic?

Read the complete guide with more examples and exam tips.

Go to full topic guide →

Try These Next