← All Calculators

System of Equations Solver

Solve 2 or 3 simultaneous linear equations with step-by-step elimination (Gauss–Jordan), exact fractions, and a check of the answer. Detects systems with no solution or infinitely many.

(1)
(2)

Use any variable names (x, y, z, a, b…). Fractions and decimals are fine: x/2 + 0.5y = 4.

Try:
Solution
x = 3,   y = 2

Step-by-step solution

  1. Write each equation in standard form
    2x + 3y = 12
    4x − y = 10
  2. Augmented matrix
    2312
    4−110
  3. R1 → R1 ÷ 2
    1326
    4−110
    Make the x coefficient 1.
  4. R2 → R2 − 4R1
    1326
    0−7−14
    Eliminate x from the other rows.
  5. R2 → R2 ÷ (−7)
    1326
    012
    Make the y coefficient 1.
  6. R1 → R1 − 32R2
    103
    012
    Eliminate y from the other rows.
  7. Check
    2x + 3y = 12 ✓
    4x − y = 10 ✓
    Substituting the solution into each original equation.

How elimination works

  • Write the coefficients as an augmented matrix — one row per equation, the constants after the dashed line.
  • Use row operations (swap rows, multiply a row, add a multiple of one row to another) to turn the left side into the identity matrix.
  • The right-hand column is then the solution. A row like 0 0 | 5 means no solution; a row of all zeros means infinitely many.

Systems of equations formulas

SubstitutionSolve one equation for a variable, substitute into the other
EliminationScale the equations so one variable cancels when you add or subtract them
Cramer’s rule (2 × 2)x = c1b2 − c2b1D, y = a1c2 − a2c1D
DeterminantD = a1b2 − a2b1 (D = 0 → no solution or infinitely many)

Where a1x + b1y = c1 and a2x + b2y = c2

Worked examples

  1. Substitution: y = 2x + 1 and 3x + y = 11.

    1. 3x + (2x + 1) = 11
    2. 5x = 10 → x = 2
    3. y = 2(2) + 1

    Answer: x = 2, y = 5

  2. Elimination: 2x + 3y = 12 and 4x − y = 10.

    1. Multiply the second by 3: 12x − 3y = 30
    2. Add to the first: 14x = 42 → x = 3
    3. y = 4(3) − 10

    Answer: x = 3, y = 2

  3. Same system with Cramer’s rule.

    1. D = 2(−1) − 4(3) = −14
    2. x = 12(−1) − 10(3)−14 = −42−14
    3. y = 2(10) − 4(12)−14 = −28−14

    Answer: x = 3, y = 2

  4. 50 tickets sold, adults $12 and children $8, total $500. How many of each?

    1. a + c = 50 and 12a + 8c = 500
    2. 12a + 8(50 − a) = 500 → 4a = 100

    Answer: 25 adult and 25 child tickets

Tips & common mistakes

  • Each linear equation in two variables is a line: one solution = the lines cross, none = parallel, infinitely many = the same line.