System of Equations Solver
Linear systems in exact fractions — six methods, every step, and a graph for two unknowns.
Solution
This is the last answer worked out. Fix the input above to update it.
Solution
Vector form
The system
Step-by-step
Check
About the System of Equations Solver
Type two to eight linear equations — one per line, in any arrangement, such as 2x + 3y = 7 and y = 2x − 1 — or fill in the coefficient matrix. The solver works in exact fractions (decimals are converted exactly), so answers like x = 7/5 come out exact rather than as 1.3999999.
It tells you whether the system has one solution, no solution or infinitely many, using the ranks of the coefficient matrix A and the augmented matrix [A | b]. For dependent systems it gives the general solution in parametric and vector form, such as x = 3 − 2t, y = t. Choose how to see the working: substitution, elimination, Cramer’s rule, Gaussian elimination, Gauss–Jordan elimination or the inverse matrix. Every unique solution is checked in the original equations, and a system in two unknowns is drawn as lines that meet at the solution.
How to use it
- Type the equations, one per line (or separated by semicolons). Use letters for the unknowns — x, y, z or any others — or x1, x2 … for many unknowns. Or choose “Coefficient matrix”, pick the number of equations and unknowns, and fill in the grid.
- Press Enter or Solve (the answer also updates as you type). Check the system as it was read, and the standard form of each equation.
- Read the result: the values, “no solution”, or the general solution with its free parameters.
- Pick a method to see each step, read the check, and use the graph for two unknowns. Copy or download the whole solution as text.
Examples
2x + 3y = 7 and x − y = 1
x = 2, y = 1
From the second equation x = 1 + y; substituting gives 2(1 + y) + 3y = 7, so 5y = 5.
x + y + z = 6, 2x − y + z = 3, x + 2y − z = 2
x = 1, y = 2, z = 3
The coefficient determinant is 7, so Cramer’s rule applies: x = 7/7, y = 14/7, z = 21/7.
x/2 + y/3 = 1 and x − y = 1/2
x = 7/5, y = 9/10
x + y = 2 and 2x + 2y = 5
Inconsistent
Doubling the first equation gives 2x + 2y = 4, which contradicts 2x + 2y = 5; the lines are parallel.
x + 2y = 3 and 2x + 4y = 6
x = 3 − 2t, y = t
The second equation is twice the first, so one unknown is free: (x, y) = (3, 0) + t(−2, 1).
Common uses
- Checking homework on pairs of linear equations (Class 10) and three-variable systems, with the method your teacher asks for.
- Solving word problems — mixtures, ages, prices, currents in a circuit — once they are written as equations.
- Seeing why a system has no solution or infinitely many, and writing the general solution.
- Row-reducing an augmented matrix or finding a 2 × 2 or 3 × 3 inverse as part of a linear algebra exercise.
One, none or infinitely many solutions
Gauss–Jordan elimination reduces the augmented matrix [A | b] to reduced row echelon form. If a row becomes 0 = c with c ≠ 0, the equations contradict each other and there is no solution — then rank(A) is less than rank([A | b]). Otherwise rank(A) = rank([A | b]) (the Rouché–Capelli theorem): if this rank equals the number of unknowns there is exactly one solution; if it is smaller, the unknowns without a leading 1 are free parameters and there are infinitely many solutions. Gaussian elimination itself is described in Golub & Van Loan, Matrix Computations (4th ed., 2013), chapter 3.
The methods
- Substitution: solve one equation for one unknown (one with coefficient ±1 when possible), substitute it into the others, repeat, then back-substitute.
- Elimination: multiply two equations by whole numbers so that one unknown has opposite coefficients, then add or subtract to remove it.
- Gaussian elimination: use row operations on the augmented matrix to reach row echelon form, then back-substitute from the last row.
- Gauss–Jordan elimination: continue until each leading entry is 1 and the only non-zero entry in its column, then read off the answer.
- Cramer’s rule: for n equations in n unknowns with D = det A ≠ 0, each unknown is xᵢ = Dᵢ/D, where Dᵢ is the determinant with column i replaced by the constants.
- Inverse matrix: write the system as AX = B; if det A ≠ 0 then X = A⁻¹B. A 2 × 2 inverse is (1/D)·[d −b; −c a]; larger inverses are found by row-reducing [A | I] to [I | A⁻¹].
Typing the equations
- One equation per line, or separate them with semicolons:
2x + 3y = 7; x − y = 1. - Terms may be on either side and in brackets:
2(x + y) = 10,y = 2x − 1. - Coefficients can be fractions or decimals:
x/2 + 0.25y = 3. - Unknowns can be any letters, or numbered:
x1 + 2x2 − x3 = 4(also x_1 or x₁).
Limitations
- Linear equations only: each unknown appears to the first power and is not multiplied by another unknown. Equations such as xy = 2 or x² + y = 3 are rejected with an explanation.
- Two to eight equations and up to eight unknowns. Coefficients must be rational numbers (no √2 or π) of up to 60 digits each.
- Cramer’s rule and the inverse matrix need a square system with a non-zero determinant; for other systems the page says so and Gaussian elimination gives the answer.
Privacy
Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.
Frequently asked questions
Which method should I use?
All six give the same answer. For two equations, substitution or elimination is quickest by hand. For three or more, Gaussian or Gauss–Jordan elimination is the most efficient and also handles systems with no solution or infinitely many. Cramer’s rule and the inverse matrix only work when there are as many equations as unknowns and the determinant is not 0.
How can I tell if a system has no solution?
During elimination a row turns into 0 = c with c not 0 — an impossible equation. For two unknowns this means the lines are parallel. In terms of ranks: rank(A) < rank([A | b]).
What does “infinitely many solutions” look like?
At least one equation is a combination of the others, so after elimination fewer independent equations remain than unknowns. The leftover unknowns are free: for x + 2y = 3 and 2x + 4y = 6 the solutions are x = 3 − 2t, y = t for any number t — every point of one line.
Why does Cramer’s rule fail when the determinant is 0?
Each unknown would be Dᵢ/0. A zero determinant means the equations are not independent, so the system has either no solution or infinitely many; row reduction shows which.
Can I enter the system as a matrix?
Yes. Choose “Coefficient matrix”, set the number of equations and unknowns (2 to 8 each), and type the coefficients and right-hand sides. Switching between the two input modes converts what you have typed.
Are the answers exact?
Yes. All arithmetic uses exact fractions, including determinants and inverses, and decimals you type are converted to exact fractions (0.25 becomes 1/4). Decimal approximations are shown next to fractional answers.