In short

For the system \{ax + by = e,\; cx + dy = f\}, Cramer's rule says

x = \frac{D_x}{D}, \qquad y = \frac{D_y}{D}

where the three determinants are

D = \begin{vmatrix} a & b \\ c & d \end{vmatrix} = ad - bc, \quad D_x = \begin{vmatrix} e & b \\ f & d \end{vmatrix} = ed - bf, \quad D_y = \begin{vmatrix} a & e \\ c & f \end{vmatrix} = af - ec.

D_x is the system determinant with the x-column \binom{a}{c} replaced by the constants \binom{e}{f}. D_y is the same but with the y-column \binom{b}{d} replaced. When D \neq 0, the system has a unique solution, and the rule hands it to you by two divisions. When D = 0, the rule breaks (you get 0/0 or \text{something}/0) — the lines are parallel or coincident, and you must inspect the case by hand.

You already know three or four ways to solve a 2 \times 2 system — graphical, substitution, elimination, cross-multiplication. Cramer's rule is one more, but it earns its place because it is so absurdly visual: the whole solution lives inside three small 2 \times 2 grids that you can light up like switches on a dashboard. Drag the numbers in, read the determinants out, divide, done.

The Indian-classroom context: determinants make their first proper appearance in CBSE Class 11, and Cramer's rule shows up by name in Class 12 (matrices and determinants chapter), and again in JEE Mains. You will rarely choose Cramer over elimination in an exam — it is usually slower for 2 \times 2 — but the picture it gives is what makes determinants click for the first time.

The three grids

For the general 2 \times 2 system

ax + by = e, \qquad cx + dy = f

write the coefficients a, b, c, d and the constants e, f. Three grids are built out of these six numbers.

Three determinant grids: D, D-sub-x with x-column replaced, and D-sub-y with y-column replacedThree labelled 2 by 2 grids drawn side by side. The first grid, D, contains the four coefficients a, b, c, d arranged in two rows. The second grid, D sub x, has the first column replaced with the constants e and f, while keeping b and d in the second column. The third grid, D sub y, keeps a and c in the first column but replaces the second column with the constants e and f. The replaced columns are highlighted in colour. D (system) a b c d = ad − bc both columns are coefficients Dx (x-col swapped) e b f d = ed − bf x-column → constants Dy (y-col swapped) a e c f = af − ec y-column → constants
Three little grids hold the whole rule. The first is the **system determinant** $D$, made from the coefficients only. The second, $D_x$, replaces the **x-column** $\binom{a}{c}$ with the constants $\binom{e}{f}$ — the highlighted column is the one that was swapped in. The third, $D_y$, does the same to the **y-column** instead. Read each grid as $\text{(top-left)}(\text{bottom-right}) - \text{(top-right)}(\text{bottom-left})$, then divide $D_x / D$ for $x$ and $D_y / D$ for $y$.

Why determinants? Geometrically, \begin{vmatrix} a & b \\ c & d \end{vmatrix} is the signed area of the parallelogram spanned by the two column vectors \binom{a}{c} and \binom{b}{d}. When that area is zero, the two vectors point along the same line — the system collapses, and there is no unique answer. When the area is nonzero, the two columns are genuinely independent directions, and the system pins down a single point.

Drag the coefficients — watch the grids light up

Move the six sliders to set the coefficients a, b, c, d and the constants e, f. Each grid recomputes its determinant live, and the solution panel shows x and y — or warns you when D = 0 and Cramer's rule cannot apply.

D 1 1 2 -1 D = -3 ad − bc D_x (x-col → constants) 7 1 5 -1 D_x = -12 ed − bf D_y (y-col → constants) 1 7 2 5 D_y = -9 af − ec Solution: x = D_x / D, y = D_y / D x = -12 / -3 = 4, y = -9 / -3 = 3
System: 1·x + 1·y = 7, 2·x + (-1)·y = 5
Six sliders — four coefficients ($a, b, c, d$) and two right-hand-side constants ($e, f$). Watch the three determinant grids recompute as you drag. The solution panel divides $D_x / D$ and $D_y / D$. When you push $D$ to zero (try $a = 1, b = 1, c = 2, d = 2$), the panel switches to a warning — Cramer's rule cannot solve a singular system.

The two highlighted columns are the give-away. In the D_x grid the left column is shaded — that is the column you replaced. In the D_y grid the right column is shaded — that is the column you replaced. The unshaded column in each case is what was preserved from the original.

Three worked examples

Example 1 — clean integer answer

Solve

x + y = 7, \qquad 2x - y = 5.

Read off a = 1, b = 1, c = 2, d = -1 and e = 7, f = 5.

Step 1. Compute the system determinant.

D = ad - bc = (1)(-1) - (1)(2) = -1 - 2 = -3.

Why: D is built from the coefficient grid \begin{pmatrix} 1 & 1 \\ 2 & -1 \end{pmatrix}. Multiply down-the-diagonal (1)(-1) = -1, then subtract the up-the-anti-diagonal product (1)(2) = 2.

Step 2. Replace the x-column \binom{1}{2} with \binom{7}{5} and compute D_x.

D_x = ed - bf = (7)(-1) - (1)(5) = -7 - 5 = -12.

Step 3. Replace the y-column \binom{1}{-1} with \binom{7}{5} and compute D_y.

D_y = af - ec = (1)(5) - (7)(2) = 5 - 14 = -9.

Step 4. Divide.

x = \frac{D_x}{D} = \frac{-12}{-3} = 4, \qquad y = \frac{D_y}{D} = \frac{-9}{-3} = 3.

Check. x + y = 4 + 3 = 7 ✓. 2x - y = 8 - 3 = 5 ✓. Both equations satisfied; the solution is (4, 3).

Why this worked so cleanly: the coefficient grid had no common factor with the constant column, and D was nonzero, so the rule produced integers. When the answer is an integer, Cramer's rule and elimination take roughly the same number of steps; the rule's value is in being mechanical.

Example 2 — fractional answer

Solve

2x + 3y = 13, \qquad x - y = 1.

Now a = 2, b = 3, c = 1, d = -1 and e = 13, f = 1.

D = ad - bc = (2)(-1) - (3)(1) = -2 - 3 = -5.
D_x = ed - bf = (13)(-1) - (3)(1) = -13 - 3 = -16.
D_y = af - ec = (2)(1) - (13)(1) = 2 - 13 = -11.

So

x = \frac{D_x}{D} = \frac{-16}{-5} = \frac{16}{5} = 3.2, \qquad y = \frac{D_y}{D} = \frac{-11}{-5} = \frac{11}{5} = 2.2.

Check. 2(3.2) + 3(2.2) = 6.4 + 6.6 = 13 ✓. 3.2 - 2.2 = 1 ✓.

Why fractions appear: the determinants D_x and D_y do not have to be multiples of D. Whenever D has a prime factor that does not divide the numerator, the answer is fractional. Cramer's rule does not care — it gives the exact fraction, which is one of its nicer features. Compare this with the graphical method, which would struggle to read 3.2 and 2.2 off a hand-drawn graph.

Example 3 — when $D = 0$ (the rule breaks)

Solve

x + y = 5, \qquad 2x + 2y = 10.

Now a = 1, b = 1, c = 2, d = 2 and e = 5, f = 10.

D = ad - bc = (1)(2) - (1)(2) = 2 - 2 = 0.

The denominator is zero, so the formulas x = D_x/D and y = D_y/D are not defined. Cramer's rule does not directly tell you what is going on — you have to look at the system by eye.

Compute D_x and D_y anyway, just to see the diagnostic.

D_x = ed - bf = (5)(2) - (1)(10) = 10 - 10 = 0.
D_y = af - ec = (1)(10) - (5)(2) = 10 - 10 = 0.

All three determinants are zero. Read this as: the two equations are not independent. The second equation is exactly 2 times the first; both describe the same line. There are infinitely many solutions — every point on x + y = 5 works.

Why the 0/0 form is informative: D = 0 alone tells you the lines are parallel, but it does not tell you whether they are the same line or genuinely separate parallel lines. The pair (D_x, D_y) disambiguates. Both zero ⇒ coincident (infinitely many solutions). At least one nonzero with D = 0 ⇒ truly parallel (no solution). For instance, swap the system to x + y = 5 and 2x + 2y = 11: now D = 0 but D_x = (5)(2) - (1)(11) = -1 \neq 0, signalling the contradiction "2x + 2y would have to equal both 10 and 11" — no point exists.

What does D = 0 mean geometrically?

The system determinant D = ad - bc is the signed area of the parallelogram with sides \binom{a}{c} and \binom{b}{d} — the two columns of the coefficient matrix. If those vectors point in the same direction (or opposite), the parallelogram collapses to a line segment with zero area, and D = 0.

Equivalently — and this is the link back to your earlier work on systems — the two rows \binom{a}{b} and \binom{c}{d} become proportional, which is exactly the condition a/c = b/d that makes the two lines parallel. Same condition, two viewpoints: the column viewpoint says "the two coordinate directions collapsed"; the row viewpoint says "the two equations describe parallel lines." Either way, no unique intersection point exists, and Cramer's rule cannot help.

Why bother, if elimination is faster?

For a 2 \times 2 system, elimination usually wins. Cramer's rule shines for three reasons.

  1. It is mechanical. No choices, no rearranging, no thinking about which variable to eliminate first. Six numbers in, two divisions out. This makes it perfect for symbolic answers — when the coefficients are letters, not numbers.
  2. It generalises. The exact same recipe — replace one column at a time, divide by the system determinant — works for 3 \times 3, 4 \times 4, and any n \times n system whose main determinant is nonzero. The picture of "swap a column, take the determinant, divide" scales cleanly. You see the 3 \times 3 version in the Determinants chapter.
  3. It connects geometry to algebra. The "D \neq 0" condition is both an algebraic statement (the formula has a nonzero denominator) and a geometric statement (the column vectors span a real area). That double identity is the heart of linear algebra, and Cramer's rule is the most compact place to meet it.

The flip side: Cramer's rule scales terribly in computation cost. For an n \times n system, you compute n + 1 determinants, each of which costs roughly n! multiplications by the naive expansion. For n = 10, that is over 36 million multiplications per determinant — vastly slower than Gaussian elimination, which solves the same system in a few thousand multiplications. So in real software, nobody uses Cramer's rule beyond the smallest hand-worked examples. Its value is conceptual, not computational.

Common confusions

Where this sits in the curriculum

You meet 2 \times 2 determinants informally inside cross-multiplication when solving systems of linear equations (NCERT Class 10, "Pair of Linear Equations in Two Variables"). The general theory — 3 \times 3 determinants, properties, Cramer's rule by name — is CBSE Class 12, Chapter 4. JEE Mains regularly asks for the value of a 3 \times 3 determinant or the consistency of a 3 \times 3 system; framing the question with Cramer's rule often makes the structure clearest, even when the actual computation goes through row-reduction.

References

  1. NCERT Class 12 Mathematics, Chapter 4 — Determinants
  2. Cramer's rule — Wikipedia
  3. Determinant — Wikipedia
  4. Gilbert Strang, Introduction to Linear Algebra, Chapter 5 — MIT OCW notes
  5. 3Blue1Brown — Cramer's rule, geometric interpretation

Related: Systems of Linear Equations · Determinants · Determinants in Geometry · Matrices — Introduction