Open Calculator

System of Equations Calculator

Solve 2 to 4 linear equations with the row reduction shown.

How the system of equations calculator works

The calculator reads each equation with the same parser used by the graphing and calculus tools, moves everything to one side, and extracts the coefficient of each variable. Those coefficients become the rows of an augmented matrix [A | b], which is then reduced to reduced row echelon form with exact fractions. The shape of the reduced matrix decides the outcome: a pivot in every variable column means one solution, a missing pivot means a free variable and infinitely many solutions, and a contradictory row means none. Every row operation is listed, so the page doubles as a step-by-step Gaussian elimination guide.

Worked example: the default three equations

The defaults are 2x + y - z = 8, -3x - y + 2z = -11, and -2x + y + 2z = -3. The augmented matrix has rows (2, 1, -1 | 8), (-3, -1, 2 | -11), (-2, 1, 2 | -3). Scaling row 1 by 1/2 and adding multiples of it to the other rows clears the x column. The y column's pivot is then 1/2 in row 2; scaling it and clearing the column leaves row 3 with a pivot for z. Clearing the z column above it finishes the job, and the final matrix reads x = 2, y = 3, z = -1. Substituting back: 2(2) + 3 - (-1) = 8, -3(2) - 3 + 2(-1) = -11, and -2(2) + 3 + 2(-1) = -3, so all three equations check.

The three possible outcomes

Reduced matrix showsOutcomeExample
A pivot in every variable columnExactly one solution2x + 3y = 7, x - y = 1 gives x = 2, y = 1
Some variable column has no pivotInfinitely many solutionsx + y + z = 3, 2x + 2y + 2z = 6 gives x = 3 - s - t, y = s, z = t
A row 0 = c with c not 0No solutionx + 2y = 4, 2x + 4y = 9

Reading a parametric solution

When a system has free variables, the calculator names them s, t, u, and w in order and writes each unknown in terms of them. The constant part is one particular solution (all parameters set to 0), and the parameter parts are directions along which the solution set extends: a line for one parameter, a plane for two. To get a specific solution, pick any numbers for the parameters. This matches the vector form x = p + s v1 + t v2 used in linear algebra courses.

Other ways to solve small systems

MethodBest forDrawback
SubstitutionTwo equations, one easily isolated variableMessy with three or more unknowns
EliminationAny size by handEasy to lose a sign; this page shows every step
Cramer's ruleSquare systems with a nonzero determinantSays nothing when the determinant is 0
Matrix inverseMany right-hand sides with the same AOnly for square, invertible A

Entering equations

Variables are sorted alphabetically to form the columns of the matrix, so it does not matter which order the equations or terms come in. You may write a coefficient as a fraction (x/3 or (1/3)x) or a decimal, and implicit multiplication such as 2x or 3(x + y) works. A variable that appears in some equations but not others is treated as having coefficient 0 where it is missing. Use the selector to switch between two, three, and four equations; the number of unknowns is discovered from what you type.

Frequently asked questions

How do I type an equation?

Write it the way you would on paper: 2x + 3y = 7, y/2 = 1 - x, or 3(x - y) = 12. Variables are single letters, coefficients may be fractions or decimals, and terms may appear on either side of the equals sign.

What happens if there are more unknowns than equations?

The system usually has infinitely many solutions. The calculator gives them in parametric form, with one free parameter (s, t, ...) for each variable that has no pivot in the row-reduced matrix.

Why does it say no solution?

Row reduction produced a row of the form 0 = c with c nonzero, which no choice of variables can satisfy. Geometrically the lines or planes described by the equations never all meet.

Can it solve nonlinear systems?

No. Every equation must be linear in the unknowns: products of variables, powers, and functions like sin(x) are rejected with a message naming the offending term.

Is the solution exact?

Yes. The augmented matrix is row reduced with exact rational arithmetic, so a solution like x = 7/3 is reported as a fraction, with a decimal approximation alongside.

Related calculators