NIMCET, GATE, CUET & CBSE test series are live — start practicing free
syllabuzAI

Cramer's Rule and Consistency of Linear Equations | NIMCET

Learn how to solve linear systems with Cramer's rule and the matrix method, how to test consistency using determinants, and when homogeneous systems have non-trivial solutions, for NIMCET.

5 min read

SP

SHIVAM PRADHAN

Updated 25 October 2026

On this page

Quick answer: For a system of n linear equations in n unknowns with coefficient determinant D, Cramer's rule gives x=DxDx = \frac{D_x}{D}, y=DyDy = \frac{D_y}{D}, z=DzDz = \frac{D_z}{D}, where DxD_x replaces the x-column by the constants. If D≠0D \ne 0, the system has a unique solution. If D=0D = 0 and some Dx,Dy,DzD_x, D_y, D_z is non-zero, there is no solution; if all are 0, there are usually infinitely many (or none). A homogeneous system has a non-trivial solution only when D=0D = 0.

This uses determinants and the inverse of a matrix.

Cramer's rule (3 variables)

For

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

let D be the determinant of the coefficients. DxD_x, DyD_y and DzD_z are formed by replacing the x-, y- or z-column of D with d1,d2,d3d_1, d_2, d_3.

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

Consistency conditions

ConditionSystem is
D≠0D \ne 0Consistent, unique solution
D=0D = 0, at least one of Dx,Dy,Dz≠0D_x, D_y, D_z \ne 0Inconsistent, no solution
D=0D = 0, Dx=Dy=Dz=0D_x = D_y = D_z = 0Infinitely many solutions or none (check directly)

For two variables, the same rules apply with 2×22 \times 2 determinants. Geometrically, D=0D = 0 means the lines are parallel or coincident.

Matrix method

Write the system as AX=BAX = B.

CaseResult
∣A∣≠0\lvert A\rvert \ne 0Unique solution X=A−1BX = A^{-1}B
∣A∣=0\lvert A\rvert = 0, (adjA)B≠O(\text{adj}A)B \ne ONo solution
∣A∣=0\lvert A\rvert = 0, (adjA)B=O(\text{adj}A)B = OInfinitely many or none

Homogeneous systems

A system AX=OAX = O always has the trivial solution x=y=z=0x = y = z = 0.

ConditionSolutions
∣A∣≠0\lvert A\rvert \ne 0Only the trivial solution
∣A∣=0\lvert A\rvert = 0Infinitely many (non-trivial) solutions

Worked examples

Example 1: Cramer's rule in two variables

Solve 2x+3y=82x + 3y = 8 and x−y=−1x - y = -1.

Step 1: D=∣231−1∣=−5D = \begin{vmatrix} 2 & 3 \\ 1 & -1 \end{vmatrix} = -5.

Step 2: Dx=∣83−1−1∣=−5D_x = \begin{vmatrix} 8 & 3 \\ -1 & -1 \end{vmatrix} = -5 and Dy=∣281−1∣=−10D_y = \begin{vmatrix} 2 & 8 \\ 1 & -1 \end{vmatrix} = -10.

Step 3: x=1x = 1, y=2y = 2.

Check: 2+6=82 + 6 = 8 and 1−2=−11 - 2 = -1 ✓.

Example 2: three variables

Solve x+y+z=6x + y + z = 6, x−y+z=2x - y + z = 2, 2x+y−z=12x + y - z = 1.

Step 1:

D=∣1111−1121−1∣=1(1−1)−1(−1−2)+1(1+2)=6D = \begin{vmatrix} 1 & 1 & 1 \\ 1 & -1 & 1 \\ 2 & 1 & -1 \end{vmatrix} = 1(1 - 1) - 1(-1 - 2) + 1(1 + 2) = 6

Step 2: Dx=∣6112−1111−1∣=6(0)−1(−3)+1(3)=6D_x = \begin{vmatrix} 6 & 1 & 1 \\ 2 & -1 & 1 \\ 1 & 1 & -1 \end{vmatrix} = 6(0) - 1(-3) + 1(3) = 6, so x=1x = 1.

Step 3: Subtracting the first two equations gives 2y=42y = 4, so y=2y = 2, and then z=3z = 3.

Check: 2(1)+2−3=12(1) + 2 - 3 = 1 ✓.

Example 3: no solution

For what k does x+2y=3x + 2y = 3, 2x+ky=52x + ky = 5 have no solution?

D=k−4=0D = k - 4 = 0 gives k=4k = 4. Then Dx=3k−10=2≠0D_x = 3k - 10 = 2 \ne 0, so there is no solution at k=4k = 4.

Example 4: non-trivial solution

For what λ does x+y+z=0x + y + z = 0, x+2y+3z=0x + 2y + 3z = 0, x+3y+λz=0x + 3y + \lambda z = 0 have a non-trivial solution?

∣11112313λ∣=(2λ−9)−(λ−3)+(3−2)=λ−5\begin{vmatrix} 1 & 1 & 1 \\ 1 & 2 & 3 \\ 1 & 3 & \lambda \end{vmatrix} = (2\lambda - 9) - (\lambda - 3) + (3 - 2) = \lambda - 5

So λ=5\lambda = 5.

Summary table

SituationTest
Unique solutionD≠0D \ne 0
No solutionD=0D = 0, some Di≠0D_i \ne 0
Possibly infiniteD=0D = 0, all Di=0D_i = 0
Homogeneous non-trivialD=0D = 0
Matrix methodX=A−1BX = A^{-1}B

Exam tips

  • Most parameter questions only need D=0D = 0 or D≠0D \ne 0.
  • For homogeneous systems, "non-trivial solution" always means D=0D = 0.
  • After finding x by Cramer's rule, solve the remaining variables by elimination to save time.

See all topics in the NIMCET Algebra chapter.

Common mistakes

  • Replacing the wrong column when forming DxD_x, DyD_y, DzD_z.
  • Concluding "infinitely many solutions" from D=0D = 0 alone.
  • Forgetting that homogeneous systems are always consistent.
  • Sign errors in 3 × 3 expansion.

Frequently Asked Questions

What is Cramer's rule?

For a system with coefficient determinant D ≠ 0, each variable equals Dᵢ/D, where Dᵢ is D with that variable's column replaced by the constants.

When does a system of linear equations have a unique solution?

When the determinant of the coefficients is not zero.

When is a system of linear equations inconsistent?

When D = 0 and at least one of Dₓ, D_y, D_z is non-zero.

When does a homogeneous system have a non-trivial solution?

When the determinant of the coefficient matrix is zero.

What is the matrix method for solving linear equations?

Write the system as AX = B. If |A| ≠ 0, the solution is X = A⁻¹B.

Concept Check

MEDIUM

What is the exact value of tan⁡22.5∘\tan 22.5^\circ?

Suggested for you