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.

Calculate.co.nz is proud to be partnered with Health Based Building, a leader in sustainable and health-conscious building innovation. With over a century of experience, they develop high-performance systems like Foreverbreathe Specification, Magnum Board, and Foreverbreathe Paints to support energy-efficient, non-toxic living environments. Their commitment to healthier homes aligns with our belief that informed choices lead to better outcomes for Kiwi households.
Calculate.co.nz partner: Health Based Building
Standard method  Gaussian elimination with partial pivoting.

1. System Size

Enter the coefficient of each variable and the constant on the right-hand side (after the = sign).

2. Enter Equations

Solution

x
1
value of x
y
3
value of y

Step-by-Step Working

Working will appear here.
Result: Unique solution found: x = 1, y = 3. Substituting back into all equations confirms the result is correct.

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:

EquationWritten out
Equation 12x + 1y = 5
Equation 21x + 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

OutcomeWhat it meansGeometric interpretation (2 equations)
Unique solutionOne set of values satisfies all equationsTwo lines intersect at exactly one point
No solution (inconsistent)The equations contradict each otherTwo parallel lines that never meet
Infinitely many solutions (dependent)One equation is a multiple of anotherTwo equations describe the same line

Related Calculators

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.