System of Equations Solver
This calculator solves a system of 2 or 3 simultaneous linear equations using Gaussian elimination, the standard method taught in algebra and used across engineering, science and economics whenever several unknowns must satisfy multiple conditions at once. Choose a 2x2 system (two equations, two unknowns: x and y) or a 3x3 system (three equations, three unknowns: x, y and z), then enter the coefficient of each variable in every equation and the constant on the right-hand side of the equals sign; enter 0 if a variable does not appear in an equation. The tool works through Gaussian elimination with partial pivoting, reducing your equations to upper triangular form and applying back substitution, then returns the value of x, y and, for a 3x3 system, z in the results panel. A step-by-step working section below shows every row swap, elimination step and substitution in order, plus a verification line checking your answer against the original equations, so you can follow or mark the method. If your equations describe parallel or identical lines, the solver reports no solution or infinitely many solutions rather than forcing a false answer. Use the "Reset to example" button to reload the default worked example at any time. This tool covers linear equations only; quadratic, exponential and other non-linear systems need different methods, and very large or small coefficients can introduce floating-point rounding.
1. System Size
2. Enter Equations
Step-by-Step Working
How to Use This Solver
Write each equation in standard form: all variable terms on the left, the constant on the right. For example, the equation 3x - 2y = 7 has coefficients 3 (for x) and -2 (for y), and a right-hand side of 7. Enter those three numbers into the corresponding row. If a variable does not appear in an equation, enter 0 for its coefficient.
Worked Example (Default Values)
The default 2x2 system is:
| Equation | Written out |
|---|---|
| Equation 1 | 2x + 1y = 5 |
| Equation 2 | 1x + 3y = 10 |
Setting up the augmented matrix and eliminating x from equation 2: multiply equation 1 by 1/2 and subtract from equation 2. This gives the system in upper triangular form. Back substitution then yields y = 3 and x = 1. Substituting back: 2(1) + 3 = 5 and 1 + 3(3) = 10. Both equations check out.
Method: Gaussian Elimination
Gaussian elimination converts the augmented coefficient matrix [A|b] into row echelon form using three elementary row operations: swapping two rows, multiplying a row by a non-zero scalar, and adding a multiple of one row to another. These operations do not change the solution set. Once upper triangular form is reached, back substitution solves for each variable from the bottom equation upward.
This solver applies partial pivoting at each elimination step: it searches the current column for the largest absolute value and swaps that row to the pivot position before eliminating. Partial pivoting reduces rounding errors and handles near-zero pivots gracefully.
If a pivot is exactly zero after all swaps (a zero column), the system is either inconsistent (no solution) or dependent (infinitely many solutions). The solver detects this and reports accordingly.
Types of Solutions
| Outcome | What it means | Geometric interpretation (2 equations) |
|---|---|---|
| Unique solution | One set of values satisfies all equations | Two lines intersect at exactly one point |
| No solution (inconsistent) | The equations contradict each other | Two parallel lines that never meet |
| Infinitely many solutions (dependent) | One equation is a multiple of another | Two equations describe the same line |
Related Calculators
- Maths and Stats Calculators: full hub for algebra, geometry, and statistics tools.
- Matrix Calculator: add, subtract, multiply, and find determinants of matrices.
- Combination (nCr) Calculator: count combinations without repetition.
- Permutation (nPr) Calculator: count ordered arrangements.
- Average Calculator: mean, median, mode, and range for a data set.
Sources and method: Gaussian elimination with partial pivoting as described in Golub and Van Loan, Matrix Computations (4th ed., Johns Hopkins University Press, 2013). Back substitution for upper triangular systems as per standard linear algebra curriculum.
This solver handles systems of linear equations only (all variables appear to the first power). Non-linear equations (quadratics, exponentials, trigonometric) require different methods. Results are computed using floating-point arithmetic; very large or very small coefficients may introduce rounding errors.