System of Linear Equations Calculator (2×2 and 3×3)

Solve two or three linear equations at once, with exact fractions, elimination or Cramer's rule steps and a graph of the lines.

System size
Show steps for
Type equations like 2x − 3y = 4, x = 5 − y or 0.5x + y/2 = 1.
x
2
y
1
Determinant D
−5D ≠ 0: exactly one solution
Unique solutionx = 2, y = 1

Show the work

  1. Write each equation in standard form:
    2x + 3y = 7
    x − y = 1
  2. Divide R1 by 2 to make the x coefficient 1:
    x + 1.5y = 3.5
    x − y = 1
  3. Eliminate x from the other equations (R2 → R2 − R1):
    x + 1.5y = 3.5
    −2.5y = −2.5
  4. Divide R2 by −2.5 to make the y coefficient 1:
    x + 1.5y = 3.5
    y = 1
  5. Eliminate y from the other equations (R1 → R1 − 1.5·R2):
    x = 2
    y = 1
  6. Check by substituting back:
    Equation 1: 2(2) + 3(1) = 7 ✓
    Equation 2: 1(2) − 1(1) = 1 ✓
  7. Solution: x = 2, y = 1
−2−1012345−2024(2, 1)

Each equation is a line (equation 1 in blue, equation 2 in gold). The solution is the point where they cross.

A system of linear equations asks for values of x and y (and z) that make every equation true at the same time. This calculator solves two equations in two unknowns or three equations in three unknowns, keeps every number as an exact fraction, and shows the work in your choice of the elimination method or Cramer’s rule. For two variables it also draws both lines so you can see the solution as their crossing point.

How to use the system of equations calculator

  1. Choose 2 × 2 for variables x and y, or 3 × 3 to add z.
  2. Pick the method for the steps: Elimination (Gauss–Jordan row operations) or Cramer’s rule (determinants).
  3. Type each equation, for example 2x + 3y = 7 and x − y = 1. Missing variables simply have a coefficient of 0.
  4. Read the solution on the tape. The steps rewrite each equation in standard form, solve, and substitute the answer back as a check.

Methods and formulas

Elimination

Elimination combines equations to remove one variable at a time. The calculator uses three legal moves: swap two equations, multiply an equation by a non-zero number, and add a multiple of one equation to another. Applied systematically (Gauss–Jordan elimination), these moves reduce the system to the form x = …, y = …, z = ….

Cramer’s rule

For a 2 × 2 system a₁x + b₁y = c₁ and a₂x + b₂y = c₂:

D = a₁b₂ − a₂b₁  ·  x = (c₁b₂ − c₂b₁) ÷ D  ·  y = (a₁c₂ − a₂c₁) ÷ D

For 3 × 3 systems the same idea holds: replace the column of one variable with the constants, take that 3 × 3 determinant, and divide by D.

Worked example

Solve 2x + 3y = 7 and x − y = 1.

Elimination: multiply the second equation by 3 to get 3x − 3y = 3, then add it to the first: 5x = 10, so x = 2. Substituting into x − y = 1 gives y = 1.

Cramer's rule: D = 2(−1) − 1(3) = −5, Dx = 7(−1) − 1(3) = −10 and Dy = 2(1) − 1(7) = −5. So x = −10 ÷ −5 = 2 and y = −5 ÷ −5 = 1.

Check: 2(2) + 3(1) = 7 ✓ and 2 − 1 = 1 ✓

Adding a third equation x + y + z = 6 and switching to 3 × 3 gives z = 6 − 2 − 1 = 3, so the solution is (2, 1, 3).

How many solutions?

What elimination produces Determinant Meaning (two variables)
One value for every variable D ≠ 0 lines cross at one point
An impossible row such as 0 = 3 D = 0 parallel lines, no solution
A row 0 = 0 D = 0 the same line, infinitely many solutions

With three variables, each equation is a plane. Three planes usually meet at a single point, but they can also share a whole line, coincide, or have no common point at all.

Tips for setting up word problems

  • Name the unknowns first. “Let x be the number of adult tickets and y the number of child tickets.”
  • Write one equation per fact. A total count gives x + y = 250; a total price gives 12x + 7y = 2,350.
  • Check units. Every term in an equation must measure the same thing, such as dollars or tickets.

The ticket example solves to x = 120 adult tickets and y = 130 child tickets. For one equation with fractions, try the solve for x with fractions calculator; to see a single line’s slope and intercept, use the slope calculator.

Frequently asked questions

How do I type the equations?

Write them the way you would on paper, for example 2x + 3y = 7 or y = 4 − x. Decimals, fractions such as (1/3)x, and division such as y/2 are all accepted, and terms may appear on either side of the equals sign.

What does it mean if there is no solution?

The equations contradict each other. For two variables the lines are parallel, with the same slope but different intercepts, so they never cross. Elimination ends with an impossible statement such as 0 = 3.

What does infinitely many solutions mean?

At least one equation is a combination of the others, so it adds no new information. For two variables both equations describe the same line. The calculator gives the general solution with a free parameter t.

When does Cramer's rule work?

Only when the determinant D of the coefficient matrix is not zero. Then each variable equals its own determinant D_x, D_y or D_z divided by D. If D = 0 the system has either no solution or infinitely many, and elimination is needed to tell which.

Are the answers exact?

Yes. Every step uses exact fractions, so an answer such as x = 7/3 is shown as a fraction with its decimal value beside it, never as a rounded approximation.

Last reviewed October 2026 by the CalcFluent editorial team. How we check our calculators.