Methods for solving a system
| Method | Best for | Idea |
|---|---|---|
| Substitution | When one variable is easy to isolate | Solve one equation for a variable and substitute into the other |
| Elimination | 2×2 and 3×3 linear systems | Add or subtract equations to cancel a variable |
| Cramer's rule | Small systems with a non-zero determinant | Each variable is a ratio of determinants |
| Gauss–Jordan | Larger systems | Row-reduce the augmented matrix |
Example: 2×2 by substitution
Solve 2x + 3y = 12 and x − y = 1
- From the second equation, x = y + 1.
- Substitute: 2(y + 1) + 3y = 12, so 5y = 10 and y = 2.
- Then x = 2 + 1 = 3.
- Check: 2(3) + 3(2) = 12 and 3 − 2 = 1.
Answer: x = 3, y = 2
The same system with Cramer's rule
The determinant of the coefficient matrix is D = 2(−1) − 3(1) = −5. Replacing the x-column with the constants gives Dₓ = 12(−1) − 3(1) = −15, and replacing the y-column gives Dᵧ = 2(1) − 12(1) = −10. So x = −15/−5 = 3 and y = −10/−5 = 2, matching the substitution result.
Example: three equations, three unknowns
Solve x + y + z = 6, 2x − y + z = 3, x + 2y − z = 2
- Add equations 1 and 3 to eliminate z: 2x + 3y = 8.
- Add equations 2 and 3: 3x + y = 5, so y = 5 − 3x.
- Substitute: 2x + 3(5 − 3x) = 8, giving −7x = −7, so x = 1 and y = 2.
- From equation 1, z = 6 − 1 − 2 = 3.
Answer: x = 1, y = 2, z = 3
Three possible outcomes
- One solution: the lines meet at a single point.
- No solution: the lines are parallel, and elimination ends with a false statement like 0 = 4.
- Infinitely many solutions: the equations describe the same line, and elimination ends with 0 = 0.
Non-linear systems
Solve x² + y² = 25 and x + y = 7
- Substitute y = 7 − x: x² + (7 − x)² = 25.
- Expand: 2x² − 14x + 49 = 25, so x² − 7x + 12 = 0.
- Factor: (x − 3)(x − 4) = 0.
- The pairs are (3, 4) and (4, 3).
Answer: (3, 4) and (4, 3)
Frequently asked questions
How many equations do I need?
As a rule, one equation for each unknown. Fewer usually gives infinitely many solutions, and extra equations can make the system inconsistent.
Which separator should I use?
Commas, semicolons or new lines all work.
Other calculators
Linear Equation SolverSolve one-variable linear equations with brackets, fractions and variables on both sidesMatrix CalculatorDeterminant, inverse, transpose, rank, RREF, powers, addition and multiplication of matrices up to 6×6, with stepsEquation SolverSolve linear, quadratic, cubic, rational, radical, exponential, log and trig equations for x with full step-by-step working and a graphGraphing CalculatorPlot several functions at once, zoom and pan, trace points, and find roots and intersections with this free online graphing calculatorInequality SolverSolve linear, compound, quadratic, polynomial, rational and absolute value inequalities with a sign chart and interval notation