Solve a system of linear equations using Cramer's rule — 3 variable

medium CBSE JEE-MAIN JEE Main 2021 4 min read

Question

Using Cramer’s rule, solve the system of equations:

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

(JEE Main 2021, similar pattern)


Solution — Step by Step

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

Expand along the first row:

D=1(11)2(23)+3(2+3)D = 1(1 - 1) - 2(-2 - 3) + 3(2 + 3) D=1(0)2(5)+3(5)D = 1(0) - 2(-5) + 3(5) D=0+10+15=25D = 0 + 10 + 15 = \mathbf{25}

Since D0D \neq 0, the system has a unique solution.

D1=623311411D_1 = \begin{vmatrix} 6 & 2 & 3 \\ 3 & -1 & 1 \\ 4 & 1 & -1 \end{vmatrix} D1=6(11)2(34)+3(3+4)D_1 = 6(1 - 1) - 2(-3 - 4) + 3(3 + 4) D1=6(0)2(7)+3(7)D_1 = 6(0) - 2(-7) + 3(7) D1=0+14+21=35D_1 = 0 + 14 + 21 = \mathbf{35} D2=163231341D_2 = \begin{vmatrix} 1 & 6 & 3 \\ 2 & 3 & 1 \\ 3 & 4 & -1 \end{vmatrix} D2=1(34)6(23)+3(89)D_2 = 1(-3 - 4) - 6(-2 - 3) + 3(8 - 9) D2=7+303=20D_2 = -7 + 30 - 3 = \mathbf{20} D3=126213314D_3 = \begin{vmatrix} 1 & 2 & 6 \\ 2 & -1 & 3 \\ 3 & 1 & 4 \end{vmatrix} D3=1(43)2(89)+6(2+3)D_3 = 1(-4 - 3) - 2(8 - 9) + 6(2 + 3) D3=7+2+30=25D_3 = -7 + 2 + 30 = \mathbf{25} x=D1D=3525=75x = \frac{D_1}{D} = \frac{35}{25} = \frac{7}{5} y=D2D=2025=45y = \frac{D_2}{D} = \frac{20}{25} = \frac{4}{5} z=D3D=2525=1z = \frac{D_3}{D} = \frac{25}{25} = 1 x=75,y=45,z=1\boxed{x = \frac{7}{5}, \quad y = \frac{4}{5}, \quad z = 1}

Why This Works

Cramer’s rule comes from the theory of determinants. Each variable equals the ratio of two determinants: the numerator determinant is formed by replacing the column of that variable’s coefficients with the column of constants, and the denominator is always DD (the coefficient determinant).

The rule works when D0D \neq 0, which means the coefficient matrix is invertible and the system has a unique solution. If D=0D = 0, the system either has infinitely many solutions or no solution — Cramer’s rule cannot distinguish between these cases.


Alternative Method — Matrix inversion

Write the system as AX=BAX = B, where AA is the coefficient matrix. Then X=A1BX = A^{-1}B.

For a 3×33 \times 3 system, computing A1A^{-1} involves finding the adjoint matrix and dividing by A|A|. Cramer’s rule is essentially doing this calculation column by column, which is often faster for a single system.

For JEE Main, Cramer’s rule for 3×33 \times 3 systems is manageable if you’re fast with 3×33 \times 3 determinants. Practice expanding determinants along the row/column with the most zeros — this speeds up calculation significantly. If D=0D = 0, switch to row reduction instead.


Common Mistake

The most common error: when computing D1D_1, D2D_2, D3D_3, students replace the wrong column. Remember — D1D_1 replaces the first column (x-coefficients) with the constants, D2D_2 replaces the second column (y-coefficients), and D3D_3 replaces the third column (z-coefficients). A column replacement error gives completely wrong values for all three variables.

Want to master this topic?

Read the complete guide with more examples and exam tips.

Go to full topic guide →

Try These Next