Gaussian Elimination Calculator

Gaussian elimination is the standard, reliable method for solving systems of linear equations, the technique that sits at the heart of linear algebra and turns a tangle of simultaneous equations into a clean, step-by-step solution, and this calculator carries it out for systems of two or three unknowns. Choose the size, enter the coefficients and the right-hand-side values for each equation, and it returns the values of the unknowns, or tells you clearly when the system has no unique solution, updating as you type. The method works by treating the equations as an augmented matrix and using row operations, swapping rows and adding multiples of one row to another, to introduce zeros below the diagonal, gradually reshaping the system into an upper triangular form. Once it is triangular, the bottom equation involves only the last unknown, so it can be read off directly, and then each value is substituted back up into the equations above, a process called back-substitution, until every unknown is found. The calculator also handles the awkward cases honestly: if the equations are contradictory there is no solution, and if one is just a combination of the others there are infinitely many, and it flags these rather than returning a misleading answer. This is the same procedure done by hand in classrooms and, in a more refined form, inside the software that solves enormous systems in engineering, economics and science. That makes the tool genuinely useful for students learning to solve simultaneous equations, row reduction and back-substitution and checking homework, and for anyone who needs a quick, dependable solution to a small linear system. The method and a worked example are explained clearly below.

Calculate.co.nz is proud to be partnered with realtor.co.nz, a trusted resource for navigating the New Zealand property market. Their Helpful Articles section offers clear, well-structured insights across buying, selling, and building, making complex real estate topics more accessible. With a focus on up-to-date guidance and practical knowledge, they empower Kiwis to move forward with clarity and confidence in a constantly evolving property landscape.
Calculate.co.nz partner: realtor.co.nz
Advertise on this page
x = 2, y = 3, z = -1
solution

How it works

The equations form an augmented matrix. The calculator uses partial pivoting (choosing the largest pivot) and row operations to make the system upper triangular, then back-substitutes from the last equation upward. If a pivot is effectively zero, the system has no unique solution.

Worked example

For 2x + y - z = 8, minus 3x minus y plus 2z = minus 11, and minus 2x plus y plus 2z = minus 3: elimination and back-substitution give x = 2, y = 3 and z = minus 1. Substituting back into each equation confirms the solution.

Related calculators