Cramer's Rule for Two Equations

Solving a two-variable linear system with determinants alone: compute D from the coefficients, replace a column with the constants to get that variable determinant, then divide - with the D not equal to zero condition and a checked worked example.

--

Cramer's rule solves a linear system with determinants alone. The steps never change, which makes it easy to apply by hand and easy to program.

Concept The system and its coefficients

A system of two linear equations in two unknowns is written:

The numbers multiplying and form the coefficient matrix; the numbers on the right form the constant column.

Theorem The rule
c₁b₁ c₂b₂ a₁c₁ a₂c₂ Dₓ D_y the shaded column is replaced by the constants
To build , replace the -column with the constants. To build , replace the -column instead. Everything else stays as it was.

The rule requires . If the system has either no solution or infinitely many, and Cramer's rule cannot be used.

Note The five steps
1. Build the coefficient matrix and compute .
2. Replace the -column with the constants to form .
3. Replace the -column with the constants to form .
4. Divide: and .
5. Substitute back into the original equations to check.

Always compute first. If it turns out to be zero, stop — there is no unique solution to find.

Example A full solution

Solve and .

Step 1 —
Since , the rule applies.
Step 2 —
Step 3 —
Step 4 — and
⟹ x = −3, y = −5
Step 5 — check: ✓
and ✓

Watch the signs in : is a subtraction of a positive product, which is why the result drops to .

Note When the rule applies
The equations must be linear.
The number of equations must equal the number of unknowns.
must not be zero.
Substituting the answer back is always worth the few seconds it takes.
Summary
  1. Cramer's rule solves a linear system using determinants only.
  2. D is the determinant of the coefficient matrix; it must not be zero.
  3. Replace a variable's column with the constants to get that variable's determinant.
  4. x = Dₓ / D and y = D_y / D.
  5. For 5x − 6y = 15 and 3x + 4y = −29: D = 38, giving x = −3 and y = −5.