What the solver does
Enter the equations and choose a method. The solver:
- reads each equation, expands brackets and collects terms;
- builds the augmented matrix [A | b];
- row-reduces it exactly, listing each row operation;
- decides whether there is one solution, infinitely many or none;
- gives the solution, a parametric description of all solutions, or the contradiction that rules them out;
- substitutes a unique solution back into every original equation as a check.
How to use it
Type one equation per line, or separate equations with semicolons. Variables can be any letters, with optional subscripts written as x1 or x_1. Coefficients can be integers, decimals or fractions, and you can use brackets and put terms on either side. Systems of up to 10 equations in up to 8 unknowns are supported.
The method
The augmented matrix
A system of m equations in n unknowns can be written as Ax = b. The augmented matrix places b next to A:
Row operations
Three operations change the matrix without changing the solutions:
- swap two rows;
- multiply a row by a non-zero number;
- add a multiple of one row to another.
Gaussian elimination uses them to create zeros below each pivot, giving row echelon form. The last row then involves one unknown, and back substitution recovers the rest. Gauss–Jordan elimination continues until each pivot is 1 with zeros above and below it, so each row states one unknown’s value directly.
How many solutions?
Let r be the rank of A, r′ the rank of [A | b], and n the number of unknowns (the Rouché–Capelli theorem):
| Condition | Solutions |
|---|---|
| r < r′ | none: some row reduces to 0 = c with c ≠ 0 |
| r = r′ = n | exactly one |
| r = r′ < n | infinitely many, with n − r free variables |
Worked example
Solve 2x + 3y − z = 5, x − y + 2z = 3 and 3x + y + z = 8.
- Choose a convenient pivot. Swap rows 1 and 2, so the first pivot is 1.
- Eliminate x. Subtract 2 × row 1 from row 2, and 3 × row 1 from row 3. This leaves two equations in y and z: 5y − 5z = −1 and 4y − 5z = −1.
- Eliminate y. Subtract 4/5 × row 2 from row 3, leaving −z = −1/5, so z = 1/5.
- Back-substitute. 5y − 5(1/5) = −1 gives y = 0. Then x − 0 + 2(1/5) = 3 gives x = 13/5.
The solution is x = 13/5, y = 0, z = 1/5. Substituting back: 2(13/5) + 3(0) − 1/5 = 25/5 = 5 ✓.
Common mistakes
- Applying an operation to only part of a row. Every row operation must include the constant after the bar.
- Losing a sign when subtracting a multiple of a row. Write out the new row in full before moving on.
- Concluding “no solution” from a row of zeros. A row 0 = 0 means a redundant equation, not a contradiction. Only 0 = non-zero rules out solutions.
- Rounding fractions to decimals part-way through. Small rounding errors can change a dependent system into an inconsistent one.
Practical applications
- Electrical circuits. Kirchhoff’s laws give a linear system for the currents in a network.
- Chemistry. Balancing a chemical equation is solving a linear system for the coefficients.
- Economics. Input–output models and supply–demand equilibria are linear systems.
- Engineering. Forces in the members of a truss satisfy a system of equilibrium equations.
- Data fitting. The least-squares line of best fit solves a 2 × 2 linear system.
Assumptions and limitations
Equations must be linear: each variable to the first power, never multiplied by another variable or used as a divisor. Coefficients are exact rational numbers, and all arithmetic is exact. The solver handles up to 10 equations in 8 unknowns.