Solve a system of 2 or 3 simultaneous linear equations. Enter the coefficient of each variable in each equation, then enter the right-hand side constant. The solver uses Gaussian elimination with back substitution and shows step-by-step working.
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.
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.
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.
| 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 |
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.
If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.
Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.
Calculate.co.nz is the sister site of CalculatorHub.com, the world's largest calculator website by tool count.
All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.
Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.
Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.
Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.
All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.
About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About · Privacy policy · Terms of use
Reviewed and maintained. Last reviewed 2026-07-02 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.
© 2026 Calculate.co.nz. All rights reserved. Building free NZ calculators since 2011.