System of Equations Solver
Enter two or three linear equations, one per line, and get every unknown as an exact fraction. The working shows the elimination method step by step with the whole system after each move, checks the answer in every equation, and adds Cramer's rule and a graph when they apply. Systems with no solution, or infinitely many, are recognised and explained.
Two or three unknowns, up to four equations. Use the same letters in every equation, for example 2x + 3y = 7.
Solution
−1
x
3
y
One solution
Type of system
Elimination, step by step
Start with the system.
E1: 2x + 3y = 7 E2: x − y = −4
Eliminate x from E2: new E2 = 2 × E2 − E1. Divide the new equation by 5 to keep the numbers small.
E1: 2x + 3y = 7 E2: −y = −3
Eliminate y from E1: new E1 = E1 + 3 × E2. Divide the new equation by 2 to keep the numbers small.
E1: x = −1 E2: −y = −3
Divide E2 by −1 to get y on its own.
E1: x = −1 E2: y = 3
Check the answer
- E1: 2 × (−1) + 3 × 3 = 7
- E2: (−1) − 3 = −4
Cramer's rule
D is the determinant of the coefficients; each other determinant replaces one column of D with the constants. With D ≠ 0 each unknown is its determinant divided by D.
D = 2 × (−1) − 3 × 1 = −5 Dx = 7 × (−1) − 3 × (−4) = 5 Dy = 2 × (−4) − 7 × 1 = −15 x = Dx / D = 5 / −5 = −1 y = Dy / D = −15 / −5 = 3
Graph
- 2x + 3y = 7
- x − y = −4
How to Use the System of Equations Solver
- 1. Write one equation per line. Use the same letters throughout: 2x + 3y = 7, then x − y = −4. Terms can be in any order and on either side of the equals sign. Fractions (x/2) and decimals are read exactly.
- 2. Read the solution. With a single solution you get each unknown as a fraction in lowest terms, plus its decimal value when the fraction does not terminate.
- 3. Follow the elimination. Each step names the equations it combines and shows the whole system afterwards, so you can compare it with your own working.
- 4. Use the check, Cramer's rule and graph. The solution is substituted into every original equation. For two unknowns, each equation is drawn as a line.
How Elimination Works
To eliminate an unknown, multiply the equations by numbers that make its coefficients opposite or equal, then add or subtract so it cancels. The solver uses whole-number multipliers only, so no fractions appear until the final "divide" step. It works column by column — first clear x from every other equation, then y, then z — until each unknown stands alone. Written as E1, E2, E3 for the equations, a step reads, for example, new E2 = 2 × E2 − E1.
Worked Example: 2x + 3y = 7 and x − y = −4
- Eliminate x from E2. New E2 = 2 × E2 − E1 gives −5y = −15, which divides by 5 to −y = −3.
- Eliminate y from E1. New E1 = E1 + 3 × E2 gives 2x = −2, which divides by 2 to x = −1.
- Isolate y. Divide E2 by −1: y = 3.
- Check. In E1, 2 × (−1) + 3 × 3 = 7; in E2, −1 − 3 = −4. Both hold, so the solution is x = −1, y = 3.
Cramer's Rule
When there are as many equations as unknowns, the determinant of the coefficients, D, decides everything. If D ≠ 0 there is exactly one solution, and each unknown is a ratio of determinants: x = Dx / D, y = Dy / D, and so on, where Dx is D with the x-column replaced by the constants.
D = 2 × (−1) − 3 × 1 = −5 Dx = 7 × (−1) − 3 × (−4) = 5 Dy = 2 × (−4) − 7 × 1 = −15 x = 5 / −5 = −1 y = −15 / −5 = 3
If D = 0, Cramer's rule gives nothing — the system has either no solution or infinitely many, and the elimination steps show which.
The Three Possible Outcomes
| Outcome | What elimination shows | Two unknowns, as a graph |
|---|---|---|
| One solution | Each unknown ends up alone with a value | The lines cross at one point |
| No solution | An equation reduces to a false statement such as 0 = 3 | The lines are parallel |
| Infinitely many | An equation reduces to 0 = 0 and an unknown is left free | The lines are the same line |
With infinitely many solutions the solver writes the general solution with a parameter. For x + y = 2 and 2x + 2y = 4 the second equation is twice the first, so y can be anything: letting y = t gives x = 2 − t. With three unknowns the three equations are planes, which meet in a point, along a line, or not at all.
Common Mistakes
- Multiplying only one side. When you scale an equation, every term on both sides is scaled.
- Subtracting with the wrong sign. Subtracting −3y from 3y gives 6y, not 0. Writing the equations in a column helps.
- Stopping at one unknown. After finding y, substitute back to find x — or keep eliminating, as the solver does.
- Forgetting to check. Substituting into the original equations catches arithmetic slips before they reach the answer.
- Reading "0 = 0" as the answer x = 0. It means the equations are dependent, not that anything equals zero.
Frequently Asked Questions
- What is the elimination method?
- It solves a system by combining equations — multiplying them by suitable numbers and adding or subtracting — so that one unknown cancels. Repeating this leaves one equation per unknown. It is the same process as Gaussian elimination, written as ordinary equations rather than a matrix.
- How do I know if a system has no solution?
- Elimination ends in a false statement such as 0 = 5. For two unknowns that means the two lines have the same slope but different intercepts, so they are parallel. For example, x + y = 2 and x + y = 5 cannot both be true.
- When does a system have infinitely many solutions?
- When at least one equation is a combination of the others, so elimination reaches 0 = 0 and an unknown is left free. Two lines then coincide. The solver gives the general solution with a parameter, such as x = 2 − t, y = t.
- What is Cramer's rule, and when does it fail?
- Cramer's rule gives each unknown as a ratio of determinants, x = Dx / D. It needs as many equations as unknowns and D ≠ 0. When D = 0 the system has no solution or infinitely many, and Cramer's rule cannot tell which.
- How many equations do I need?
- Enough independent equations to match the number of unknowns: two for two unknowns, three for three. Fewer independent equations leave unknowns free; more than needed is fine if they agree, and the solver tells you if they do not.
- Does the order of the equations matter?
- No. The solution set is the same in any order, although the steps may differ. Unknowns are processed in alphabetical order.
- Can this solve nonlinear systems?
- No. Terms such as xy or x² are refused with a message naming the equation. Each unknown may appear only to the first power. For a single quadratic, use the Quadratic Equation Solver.