Skip to content

Cramer's Rule

Solves square linear systems with determinants.

Variables

Aᵢ
A with column i replaced by the constants

Explanation

Works only when . Practical for 2×2 and 3×3 systems; elimination is faster for larger ones.

Example

: , , .

How to use it

For a system with :

  1. Compute .
  2. For each variable, replace its column of with and take the determinant. Call it , , and so on.
  3. Then , , and so on.

Worked example

  1. .
  2. .
  3. .
  4. and .

Check: ✓ and ✓

When to use it

Cramer's rule is neat for 2×2 and 3×3 systems, especially when you need only one of the variables. For larger systems, elimination is much faster.

When it doesn't work

If , the system has either no solution or infinitely many. Cramer's rule can't tell you which. Use elimination to find out.

Common mistakes

  • Replacing a row instead of a column.
  • Putting in the wrong column for the variable.
  • Dividing by instead of by .

Where it's used

  • Small systems: quick, formula-based solutions for 2×2 and 3×3 systems in algebra and physics.
  • Circuit analysis: solving for currents in small electrical networks.
  • Economics: comparative statics, finding how one variable responds to a change in another.
  • Theory: proving properties of solutions, since it gives each variable as an explicit formula.

Key takeaways

  • Each variable equals a determinant with one column replaced, divided by the main determinant.
  • It only works when the main determinant isn't zero.
  • For large systems, elimination is faster.

Try it: System of Equations Calculator

Solve systems of 2 or 3 linear (or nonlinear) equations with Gaussian elimination, substitution and Cramer's rule.

Open calculator

Practice problems

Try each one first, then open the answer to check your work.

  1. 1.Solve , .

    Show answer

    , , .

  2. 2.Solve , .

    Show answer

    , , .

  3. 3.Solve , .

    Show answer

    , , .

  4. 4.What happens with , ?

    Show answer

    , so Cramer's rule fails. The equations describe the same line, so there are infinitely many solutions.

  5. 5.Find just for , .

    Show answer

    , , so .

Key terms

Coefficient matrix
The matrix of the numbers in front of the variables.
Constant column
The numbers on the right of the equations.
Linear system
A set of linear equations solved together.
Unique solution
Exactly one answer, which occurs when .
Elimination
Solving by adding or subtracting equations to remove variables.

Frequently asked questions

How do I build $A_i$?

Replace column of the coefficient matrix with the column of constants. For , replace the first column; for , the second.

When should I use Cramer's rule?

For small systems, or when you only need one of the variables. For anything bigger than 3×3, elimination is much faster.

What if the determinant is zero?

The system has either no solution or infinitely many. Cramer's rule can't tell you which; use elimination to find out.

Does it work for 3 variables?

Yes. You compute four 3×3 determinants: one for the coefficient matrix and one for each variable.

Why is Cramer's rule slow for large systems?

An system needs determinants, and each is expensive to compute. Elimination does far fewer operations.

Who was Cramer?

Gabriel Cramer, a Swiss mathematician who published the rule in 1750.

How do I use Cramer's rule for a 3×3 system?

Compute , then replace each column in turn with the constants to get , and . Then , and .

Does the order of the equations matter?

Swapping two equations swaps two rows, which changes the sign of every determinant. The ratios stay the same, so the solution doesn't change.

Can I use it with fractions or decimals?

Yes. It's often easiest to clear fractions first by multiplying each equation by a common denominator, which doesn't change the solution.

Related formulas

More linear algebra formulas