Simultaneous Equations Solver (2×2) Formula

Understand the math behind the simultaneous equations solver (2×2). Each variable explained with a worked example.

Formulas Used

Det

det = a1 * b2 - a2 * b1

X Val

x_val = (a1 * b2 - a2 * b1) != 0 ? (c1 * b2 - c2 * b1) / (a1 * b2 - a2 * b1) : 0

Y Val

y_val = (a1 * b2 - a2 * b1) != 0 ? (a1 * c2 - a2 * c1) / (a1 * b2 - a2 * b1) : 0

Variables

VariableDescriptionDefault
a1a₁ (Eq1 x-coeff)2
b1b₁ (Eq1 y-coeff)3
c1c₁ (Eq1 constant)8
a2a₂ (Eq2 x-coeff)4
b2b₂ (Eq2 y-coeff)-1
c2c₂ (Eq2 constant)2

How It Works

How to Solve Simultaneous Equations

Cramer's Rule for 2×2 Systems

Given:

  • a₁x + b₁y = c₁
  • a₂x + b₂y = c₂
  • Determinant D = a₁b₂ - a₂b₁

    x = (c₁b₂ - c₂b₁) / D

    y = (a₁c₂ - a₂c₁) / D

    If D = 0, the system has no unique solution (the lines are parallel or identical).

    Worked Example

    Solve: 2x + 3y = 8 and 4x - y = 2.

    a1 = 2b1 = 3c1 = 8a2 = 4b2 = -1c2 = 2
    1. 01D = (2)(-1) - (4)(3) = -2 - 12 = -14
    2. 02x = (8×(-1) - 2×3) / (-14) = (-8 - 6) / (-14) = -14 / -14 = 1
    3. 03y = (2×2 - 4×8) / (-14) = (4 - 32) / (-14) = -28 / -14 = 2
    4. 04Solution: x = 1, y = 2

    Frequently Asked Questions

    What are simultaneous equations?

    Simultaneous equations are a set of equations with multiple unknowns that must be solved at the same time. The solution satisfies all equations simultaneously.

    When does a 2×2 system have no solution?

    When the determinant equals zero. This means the two lines are parallel (no intersection) or identical (infinite solutions).

    What is Cramer's rule?

    Cramer's rule uses determinants to solve systems of linear equations. For a 2×2 system, each variable is found by taking the ratio of two determinants.