System of Equations Calculator
Solve 2×2 and 3×3 linear systems by Gaussian elimination with every row operation shown, Cramer's rule determinants, and no-solution or infinite cases named.
System of Equations Calculator: with the default inputs, solution is x = 2, y = 3, z = −1.
Each equation reads a·x + b·y + c·z = d.
Ignored for a 2×2 system.
Ignored for a 2×2 system.
- Type of system
- One unique solution — the equations are independent and consistent
- x
- 2
- y
- 3
- z
Blank for a 2×2 system.
- -1
- Determinant D of the coefficients
- -1
- Rank of the coefficient matrix
- 3
- Rank of the augmented matrix
- 3
Assumptions
- Each equation is linear: a·x + b·y + c·z = d with real coefficients.
- Arithmetic is double-precision floating point; values within 10⁻¹⁰ of zero (relative to the largest coefficient) are treated as zero for the rank test.
- Fractions are shown exactly when the result equals a fraction with denominator up to 1,000.
| Determinant | Built from | Value | Dᵢ ÷ D |
|---|---|---|---|
| D | the coefficients | −1 | |
| Dx | x column replaced by the right-hand side | −2 | x = 2 |
| Dy | y column replaced by the right-hand side | −3 | y = 3 |
| Dz | z column replaced by the right-hand side | 1 | z = −1 |
Cramer's rule gives the same answer as elimination whenever D ≠ 0. It is quick by hand for 2×2 and 3×3 systems and far too slow for large ones.
| Equation | Left side | Right side |
|---|---|---|
| 2x + y − z = 8 | 8 | 8 |
| −3x − y + 2z = −11 | −11 | −11 |
| −2x + y + 2z = −3 | −3 | −3 |
Put this calculator on your site as a widget
A working system of equations, free for any site, with no ads and no sign-up. It resizes to fit wherever you paste it and updates itself as this page improves.
Paste this anywhere. It works on any site, carries no ads, never expires, and always shows the current version.
Free System of Equations Calculator from CalculateItNow
Leads with the price, which is what most readers want to know.
The credit line sits outside the widget on purpose, so it is a real link on your page rather than one buried in a frame. Please keep it — it is what pays for CalculateItNow staying free and ad-free. The script only resizes the widget to fit its contents; drop it and the widget still works.
Browse every calculator widget·How to add it to WordPress, Squarespace or Wix
How this is worked out
The formula
Each equation: a·x + b·y + c·z = d (A·v = b in matrix form) Gaussian elimination: Rⱼ ← Rⱼ − (aⱼₖ ÷ aₖₖ)·Rₖ, pivoting on the largest |aⱼₖ| in each column Rank test: rank(A) < rank([A | b]) → no solution; rank(A) = rank([A | b]) < n → infinitely many Cramer's rule: x = Dx ÷ D, y = Dy ÷ D, z = Dz ÷ D, where D = det(A) and Dx replaces A's x column with b
Open How it’s calculated above to see this worked through with your own numbers.
What you enter
- Number of equations and unknowns
- Each equation reads a·x + b·y + c·z = d.2 equations, 2 unknowns (x, y) · 3 equations, 3 unknowns (x, y, z)
- x coefficient
- A number.defaults to 2
- y coefficient
- A number.defaults to 1
- z coefficient
- Ignored for a 2×2 system.defaults to -1
- = (right-hand side)
- A number.defaults to 8
- x coefficient
- A number.defaults to -3
- y coefficient
- A number.defaults to -1
- z coefficient
- Ignored for a 2×2 system.defaults to 2
- = (right-hand side)
- A number.defaults to -11
- x coefficient
- A number.defaults to -2
- y coefficient
- A number.defaults to 1
- z coefficient
- A number.defaults to 2
- = (right-hand side)
- A number.defaults to -3
What you get back
- Solutionmain answer
- Type of system
- x
- y
- z
- Blank for a 2×2 system.
- Determinant D of the coefficients
- Rank of the coefficient matrix
- Rank of the augmented matrix
What this assumes
- Each equation is linear: a·x + b·y + c·z = d with real coefficients.
- Arithmetic is double-precision floating point; values within 10⁻¹⁰ of zero (relative to the largest coefficient) are treated as zero for the rank test.
- Fractions are shown exactly when the result equals a fraction with denominator up to 1,000.
About this calculator
A system of linear equations asks for the values of x and y (or x, y and z) that make every equation true at once. This calculator solves 2×2 and 3×3 systems by Gaussian elimination, writes out every row operation, and then checks the answer with Cramer's rule — two independent methods arriving at the same numbers.
How to use it
Choose the size, then type each equation's coefficients in the form a·x + b·y + c·z = d. A missing variable has coefficient 0, and "−y" has coefficient −1. The default is the classic textbook system 2x + y − z = 8, −3x − y + 2z = −11, −2x + y + 2z = −3, whose solution is x = 2, y = 3, z = −1. For a 2×2 system the z column and the third equation are ignored.
How the elimination works
The equations are written as an augmented matrix, one row per equation. In each column the calculator picks the row with the largest coefficient as the pivot (partial pivoting — the same choice numerical software makes, because dividing by a tiny number magnifies rounding error), then subtracts multiples of it to clear that variable from the rows below. What is left is triangular, and back-substitution reads off the answer from the bottom up. Results that are exact fractions are shown as fractions: 7/3, not 2.333333.
No solution, or infinitely many
Not every system has exactly one answer, and the calculator says which case you have rather than printing an error:
- No solution — elimination produces a row reading 0 = 5. The rank of the coefficient matrix is less than the rank of the augmented matrix. Geometrically, two parallel lines, or planes with no common point.
- Infinitely many solutions — a row collapses to 0 = 0, leaving a free variable. The answer is given in parametric form, such as x = 2 − t, y = t, meaning every value of t works.
- One solution — both ranks equal the number of unknowns, and the determinant D is not zero.
Cramer's rule
When D = det(A) is not zero, each unknown is a ratio of determinants: x = Dx ÷ D, where Dx is the determinant with the x column replaced by the right-hand sides. The table lists all of them, so you can check homework done either way. When D = 0 Cramer's rule says nothing — it cannot tell no-solution from infinitely many, which is exactly why the rank check matters.
Caveats
Coefficients are floating-point numbers, so a system that is nearly singular (two almost-parallel lines) can be sensitive to tiny changes in the inputs. The check table substitutes the answer back into every equation so you can see it holds.
Frequently asked questions
▸How do I solve a system of equations by elimination?
Add or subtract multiples of one equation from another to cancel a variable, repeat until one equation has a single unknown, solve it, then substitute back. Gaussian elimination is the same idea done systematically on a matrix of coefficients.
▸How can I tell if a system has no solution or infinitely many?
Eliminate. A row reading 0 = (nonzero number) means no solution; a row reading 0 = 0 with fewer pivots than unknowns means infinitely many. In rank terms: rank(A) < rank([A | b]) is no solution, and rank(A) = rank([A | b]) < n is infinitely many.
▸When can I use Cramer's rule?
Only when the determinant of the coefficients is not zero, which is exactly when the system has one unique solution. Then each unknown equals its replaced-column determinant divided by D.
▸What is partial pivoting and why does it matter?
Before clearing a column, swap in the row with the largest coefficient in that column. It avoids dividing by tiny numbers, which would amplify rounding error, and it is what every serious linear-algebra library does.
▸Can I solve a 3-variable system with only two equations?
Not uniquely. Two planes meet in a line (or not at all), so there is at best a one-parameter family of solutions. Enter a third equation, or set it to 0x + 0y + 0z = 0 and the calculator gives the parametric answer.
Related calculators
The questions people ask next to a system of equations.
Determinant, trace, transpose and inverse of a 2×2 or 3×3 matrix, with the cofactor expansion written out and singular matrices called out explicitly.
Solve any linear or quadratic equation in one variable with every rearrangement shown — discriminant, exact roots, vertex, factored form and a check.
Solve ax² + bx + c = 0 with the quadratic formula — real or complex roots, discriminant, vertex, axis of symmetry, factored form and a graph of the parabola.
Slope, y-intercept and the equation of the line through two points, plus distance, midpoint, angle and the perpendicular slope — with rise-over-run shown.
Find sin, cos, tan, csc, sec and cot of any angle in degrees or radians, with exact values like √3/2, the reference angle, quadrant, and inverse trig.
Find the percent increase or decrease from an old value to a new one, the symmetric percentage difference, or add or take X% off a number, with every step.