System of Equations Calculator
Type your equations, or fill the augmented matrix, and this solver runs Gaussian elimination in front of you. The largest coefficient leads each column, every row operation is printed with the reason for it, and back-substitution finishes from the bottom row up. The page opens on 2x + y - z = 8, -3x - y + 2z = -11 and -2x + y + 2z = -3, which comes out at x = 2, y = 3, z = -1, and the answer is substituted back into the equations as typed so the residual beside it is one you can check. Every coefficient is held as one whole number over another rather than as a decimal, which is what makes the three possible answers reliable: a unique solution, no solution at all, or infinitely many, with the free variables named and the whole family written out. A term that is not first degree is refused by name rather than quietly dropped.
2x + y - z = 8-3x - y + 2z = -11-2x + y + 2z = -3elimination 3 row operations, 2 row swaps, pivoting on the largest coefficientback-substitution 3 stepsx = 2 y = 3 z = -1residual 0 0 0 unique solution
- Enter as
- Variables
- Equations
- Working
- x
- 2
- y
- 3
- z
- -1
- Case
- Unique
The augmented matrix
One row per equation, one column per variable, and the constant after the equals sign. A cell takes a whole number, a decimal like 0.5 or a fraction like 1/3, and a blank cell counts as 0.
The check
- 2x + y - z = 8, residual 0
- -3x - y + 2z = -11, residual 0
- -2x + y + 2z = -3, residual 0
Each value is substituted back into the equations as you typed them: every residual is exactly zero, because the arithmetic is done in fractions rather than decimals.
The working
Forward elimination first, largest coefficient leading each column, then back-substitution from the bottom row up. Every multiplier is an exact fraction.
- R1 <-> R2 pivot on -3, the largest coefficient left in column x
- R2 -> R2 + (2/3)R1 clears x from row 2
- R3 -> R3 - (2/3)R1 clears x from row 3
- R2 <-> R3 pivot on 5/3, the largest coefficient left in column y
- R3 -> R3 - (1/5)R2 clears y from row 3
Back-substitution
- From row 3: (1/5)z = -1/5, so z = -1.
- From row 2: (5/3)y + (2/3)z = 13/3 with z = -1, so y = 3.
- From row 1: -3x - y + 2z = -11 with y = 3 and z = -1, so x = 2.
The three answers a linear system can have
Load any of them to see which one you are looking at and why.
- x = 2, y = 1
- No solution: the equations contradict each other
- x = 3 - y, with y free
Common questions
- How do I solve a system of equations on this page?
- Select Augmented matrix to enter one coefficient per cell and the constant in the last column, or select Equations and write one equation per line. Blank matrix cells count as zero. For example, x + y = 3 with x - y = 1 gives x = 2, y = 1. Change Working to Every step to see the intermediate matrices.
- What does it mean when a system has no solution?
- That the equations contradict each other, so no set of values can satisfy them all. Enter x + y = 1 with 2x + 2y = 3 and the elimination ends with row 2 reduced to 0 = -1/2, which nothing can satisfy: the page reports No solution and names that row rather than handing back a number. Geometrically the two lines are parallel and never meet. An overdetermined system is the usual way to meet this case, and it is why the page checks the rank of the coefficients against the rank of the whole augmented matrix rather than assuming an answer exists.
- What if there are infinitely many solutions?
- At least one variable is free, and the result gives the whole family in terms of those free variables. Enter x + y = 3 twice and the result is x = 3 - y with y free, also written as (x, y) = (3, 0) + y(-1, 1). The residual check verifies one point and each direction against all the original equations. For the coefficient rows [1 2 3; 4 5 6; 7 8 9] with a zero constant column, the answer is x = z, y = -2z with z free. In a floating-point elimination, a tiny final pivot such as 1.1102230246251565e-16 can look nonzero; exact fraction arithmetic avoids that classification error.
- Does it show the steps, and is this Gaussian elimination or Gauss-Jordan?
- It is Gaussian elimination with partial pivoting: the row holding the largest coefficient in the working column moves to the top of that column, the rows below it are cleared one at a time, and back-substitution then works up from the last row. Every operation is printed in the form R2 -> R2 + (2/3)R1 with the reason beside it, and switching Working to Every step prints the whole augmented matrix after each one. Gauss-Jordan carries on to reduced row echelon form; this page stops at echelon form and substitutes back, which is fewer operations for the same answer, and it is how the free-variable case is parameterised here.
- How many equations and unknowns can it take?
- 2 to 6 equations in 2 to 6 unknowns, and they do not have to match. More equations than unknowns is fine: x + y = 3, x - y = 1 and 2x + y = 5 all hold at x = 2, y = 1, and if one of them did not, the page would report the contradiction instead. Fewer equations than unknowns leaves free variables, so x + y + z = 6 with x - y + z = 2 gives x = 4 - z, y = 2 with z free. Past six of either, the page says which limit you passed and stops, rather than truncating what you typed.
- What kinds of equation does it refuse?
- Anything that is not first degree, and it says which term and why. x^2 + y = 3 is refused as not linear, xy is refused because it multiplies two variables together, 1/x is refused because a variable sits in a denominator, and sin(x) is refused as a function. Parentheses are not expanded for you: multiply them out, or write a fractional coefficient as x/2 or 0.5x. What is allowed is more than it sounds. Variables may sit on both sides and are collected for you, so 2x + 1 = x + 4 becomes x = 3, terms that cancel are cancelled exactly, and a variable may be a letter with a subscript, such as x1.
- Can I solve by substitution instead of elimination?
- For exactly two linear equations in two variables, the Substitution for two equations section independently isolates one variable, substitutes its expression into the other equation and substitutes the result back. An identity gives infinitely many solutions; a contradiction gives none. Larger systems retain Gaussian elimination with back-substitution.
- Can I graph a system of linear equations here?
- A two-variable system displays its equation lines on one approximate graph. A dot marks a unique solution if it is inside the viewport. Parallel lines have no common solution, while overlapping lines can leave a free variable. The axes expand around moderate-sized unique solutions; very large solutions can lie outside the displayed view. Use the exact answers and case classification for the arithmetic.
- Can I enter a 2x2, 3x3 or 4x4 system?
- Yes. Set Variables and Equations separately in matrix mode, or type the required equations. Both counts run from 2 through 6. A homogeneous system has zero in every constant cell. A unique two-variable result gives the ordered pair in the order named by the output, usually (x, y).
- Does addition or subtraction count as elimination?
- Yes. Multiplying one equation by a constant and adding or subtracting it from another eliminates a variable. The row trace prints that multiplier and operation. This is the addition or subtraction method in matrix form.
- Can I solve matrix equations such as AX = B?
- The augmented matrix represents a coefficient matrix A, a column of unknowns X and one constant column B. Enter one row per equation. This tool solves that vector system; it does not solve an unknown matrix against several right-hand-side columns, compute an inverse or perform determinant calculations.
- Are decimal and fractional coefficients exact?
- Yes. A typed decimal is converted to a rational value, so 0.1 becomes 1/10. A fraction such as 1/3 stays exact, and every elimination and substitution operation uses rational arithmetic. For example, 0.1x + 0.2y = 0.3 with 0.2x + 0.1y = 0.3 gives x = 1, y = 1.
- Does the calculator handle inequalities or differential equations?
- It solves ordinary linear equations with real rational coefficients. It does not solve inequalities, differential equations, complex-valued coefficients or nonlinear systems. It also does not turn a written word problem into equations. Enter the equations you have already formed.
- Can I use it on a phone or desktop?
- Use a browser on your phone, tablet or computer. All coefficients and equation text are calculated locally; no upload or account is needed. Fractional input accepts a slash and a minus sign.
- Why are the answers fractions rather than decimals?
- Because the arithmetic is exact, and the answer to a system with whole-number coefficients usually is a fraction. Decimals you type are read exactly on the way in as well, so 0.1 becomes one tenth rather than the nearest binary double: 0.1x + 0.2y = 0.3 with 0.2x + 0.1y = 0.3 gives x = 1, y = 1 here, where the same elimination in floating point returns 0.9999999999999998 for y. The gap widens as the numbers get more awkward. The Hilbert system with rows 1, 1/2, 1/3 and 1/2, 1/3, 1/4 and 1/3, 1/4, 1/5, each equal to 1, comes out at x = 3, y = -24, z = 30 on this page and at 3.0000000000000195, -24.000000000000092 and 30.00000000000008 in double precision.
- What is the solution of the starting three-equation example?
- The matrix starts with 2x + y - z = 8, -3x - y + 2z = -11 and -2x + y + 2z = -3. Its solution is x = 2, y = 3, z = -1. Choose the two-line example below the tool to see the graph and the separate two-equation substitution working.
Gaussian elimination that pivots on the largest available coefficient for numerical stability, with every row operation printed so you can follow it. The solution is substituted back into the equations you typed and the residual is shown, so you can see the arithmetic close. A nonlinear term is refused by name rather than quietly linearised.