Skip to content
K Knidox Search…
Math · Algebra

System of Equations Solver

Solve 2×2 and 3×3 linear systems by Gaussian elimination.

x +
y =
x +
y =
Solution
x = 2, y = 1

Solved by Gaussian elimination with partial pivoting.

The two lines cross at the solution
Two lines for the system, crossing at the solution x = 2, y = 111-9x = -3x = 7
Equation 1Equation 2— they intersect at x = 2, y = 1.

A system of equations is solved by the values that satisfy all of them at once. For 2x + y = 5 and x − y = 1, adding the equations cancels y to give 3x = 6, so x = 2; back-substituting gives y = 1. That point (2, 1) is where the two lines cross.

Where the lines meet

A linear system asks for the values that satisfy every equation at once — geometrically, the point where two lines (or three planes) intersect. By hand you might use elimination; for a clean 2×2 system, Cramer’s rule gives each variable as a ratio of determinants. This solver uses Gaussian elimination with partial pivoting for numerical stability.

x = Dₓ ÷ D, y = D_y ÷ D

Cramer’s rule: D is the coefficient determinant; Dₓ, D_y replace a column with the constants

Worked example

Solve the system 2x + y = 5 and x − y = 1 by elimination:

  1. 1
    Add the two equations to eliminate y. (2x + y) + (x − y) = 5 + 1 → 3x = 6, so x = 2.
  2. 2
    Back-substitute x into either equation. From x − y = 1: 2 − y = 1, so y = 1.
  3. 3
    Check with Cramer’s rule. D = 2(−1) − 1(1) = −3, Dₓ = 5(−1) − 1(1) = −6, D_y = 2(1) − 5(1) = −3 → x = −6 ÷ −3 = 2, y = −3 ÷ −3 = 1. ✓

What the determinant tells you (2×2)

For a·x + b·y = e and c·x + d·y = f, the coefficient determinant is D = ad − bc.

Coefficient determinant DSolutionsGeometry
Non-zero (≠ 0)Exactly one (unique)Lines cross at one point
Zero, consistentInfinitely manySame line (overlap)
Zero, inconsistentNoneParallel, never meet

When there is no unique solution

Determinant zero means singular. The equations are either redundant (the same line, infinitely many solutions) or contradictory (parallel lines, no solution). The solver flags this case rather than returning a false answer.

3×3 systems work the same way. Three planes meet at a single point when the coefficient determinant is non-zero; otherwise they share a line, a plane, or nothing at all.

Partial pivoting keeps it stable. Reordering rows to put the largest coefficient on the diagonal avoids dividing by tiny numbers, which protects accuracy with messy decimals.

What format are the inputs?
Each row is one equation: the coefficients of x, y (and z), followed by the constant on the right-hand side.
What does "singular" mean?
The coefficient matrix has determinant zero, so there is no single solution — the lines are parallel (none) or identical (infinitely many).
Can it handle non-integer coefficients?
Yes. Decimals are fine; the method works for any real coefficients.
What is Cramer’s rule?
For a 2×2 system, x = Dₓ ÷ D and y = D_y ÷ D, where D is the coefficient determinant and Dₓ, D_y replace the x or y column with the constants.
Elimination or substitution — which is faster?
For two equations either works; elimination (adding equations to cancel a variable) is usually quickest. The tool uses Gaussian elimination internally for any size.
What is partial pivoting and why does it matter?
Before each elimination step it swaps rows so the largest coefficient sits on the diagonal. This avoids dividing by tiny numbers and keeps the answer accurate with messy decimals.