Skip to main content

Cramer’s Rule Calculator – 2x2 & 3x3 Systems

Quick answer

Solve by determinants: for x+2y=5, 3x−y=1, D=−7, Dx=−7, Dy=−14 give x=1, y=2.

  • Every determinant expanded with steps.
  • 3×3 supported too.

Figures are estimates from this calculator’s standard formula — adjust the inputs in the tool below for your exact number.

How Cramer’s Rule Calculator Works

x = Dx/D, y = Dy/D where Dx replaces the x-column with the constants

Cramer’s rule solves square systems by ratios of determinants. For x + 2y = 5 and 3x − y = 1: the base determinant D = 1(−1) − 3(2) = −7. Replacing the x-column with the constants (5, 1) gives Dx = 5(−1) − 1(2) = −7, so x = Dx/D = 1; replacing the y-column gives Dy = 1(1) − 3(5) = −14, so y = 2. The calculator prints every 2×2 determinant expansion and extends to 3×3 systems with cofactor expansions shown. The zero-determinant case is handled explicitly: D = 0 means no unique solution (parallel or coincident constraints), and Cramer cannot proceed — elimination reveals whether solutions are none or infinite. The method shines for single-variable queries: computing just x requires only D and Dx, never the full reduction.

  1. 1

    Enter the coefficient matrix and constants

    Square systems, 2×2 or 3×3

  2. 2

    Compute the base determinant D

    The expansion is shown term by term

  3. 3

    Build Dx, Dy, (Dz)

    Each variable column is replaced in turn

  4. 4

    Divide

    x = Dx/D = 1, y = Dy/D = 2, with D = 0 flagged

Use Cases

Systems Homework

Determinant-based solutions with full working

Single-Variable Extraction

Find y alone via Dy/D without solving x

Economics Models

Two-market equilibrium from linear demand/supply

Tips

  • 1

    Dx swaps the constants into the x-column only

  • 2

    D = 0 ⇒ Cramer inapplicable: no or infinite solutions

  • 3

    Determinants scale: D halves when one equation is halved

Common Mistakes

  • Replacing the wrong column for Dx

  • Dividing D by Dx instead of Dx by D

  • Forgetting to check D ≠ 0 before dividing

  • Transcribing constants into the matrix in the wrong order

FAQs

Solve x+2y=5, 3x−y=1 by Cramer.

D = −7, Dx = −7, Dy = −14, so x = 1 and y = 2.

What is Dx?

The determinant with the constants column substituted for the x-coefficients: |5 2; 1 −1| = −7.

What if D = 0?

No unique solution exists — the system is inconsistent (none) or dependent (infinitely many).

Does Cramer work for 3×3?

Yes: x = Dx/D etc., with each 3×3 determinant expanded by cofactors or the Sarrus rule.

When is Cramer preferable?

When you need just one variable — x requires only D and Dx.