Systems of Equations Solver (3 Variables)

Solve a 3×3 system of linear equations using Gaussian elimination.
Returns exact x, y, z values, no-solution detection, and infinite solution identification.

Solution

A system of linear equations is a set of equations sharing the same unknowns. The goal is to find the values that satisfy all of them at once. This solver handles the 3×3 case: three equations in x, y and z.

Standard form

a₁x + b₁y + c₁z = d₁ a₂x + b₂y + c₂z = d₂ a₃x + b₃y + c₃z = d₃

Note the letters, because they are not what a 2×2 textbook uses. Here c is the coefficient of z and d is the constant on the right. In a two-variable system c is usually the constant, and mixing the two conventions is the fastest way to get a wrong answer out of a correct method.

Cramer’s Rule for three variables

The solver uses Cramer’s rule, which extends cleanly from two variables to three. Start with the determinant of the coefficient matrix:

D = | a₁ b₁ c₁ ; a₂ b₂ c₂ ; a₃ b₃ c₃ |

Then form Dx, Dy and Dz by replacing the matching column with the constants d₁, d₂, d₃. For Dx, swap out the a column; for Dy, the b column; for Dz, the c column. The answers are:

x = Dx / D   y = Dy / D   z = Dz / D

A 3×3 determinant expands along the top row:

D = a₁(b₂c₃ − b₃c₂) − b₁(a₂c₃ − a₃c₂) + c₁(a₂b₃ − a₃b₂)

Watch the minus sign in front of the middle term. It alternates, and forgetting it is the single most common arithmetic slip in hand computation.

When D = 0

If D = 0 there is no unique solution, but that covers two genuinely different situations and it is worth knowing which one you have:

  • Inconsistent: the planes have no common point, so there is no solution at all. Three planes can miss each other by forming a triangular prism, for instance.
  • Dependent: the equations overlap, so there are infinitely many solutions lying along a shared line or plane.

You tell them apart by comparing the rank of the coefficient matrix against the rank of the augmented matrix (the coefficients with the constants column attached). Equal ranks means dependent; a higher augmented rank means inconsistent. The calculator does this comparison and names which case you are in, rather than leaving you with “one or the other”.

Worked example

Solve 2x + y − z = 8, −3x − y + 2z = −11, −2x + y + 2z = −3.

D = 2((−1)(2) − (1)(2)) − 1((−3)(2) − (−2)(2)) + (−1)((−3)(1) − (−2)(−1)) D = 2(−2 − 2) − 1(−6 + 4) − 1(−3 − 2) = −8 + 2 + 5 = −1

Replacing columns with the constants gives Dx = −2, Dy = −3, Dz = 1, so:

x = −2/−1 = 2, y = −3/−1 = 3, z = 1/−1 = −1

Check the first equation: 2(2) + 3 − (−1) = 4 + 3 + 1 = 8 ✓

Geometric interpretation

With two variables each equation is a line and the solution is where the lines cross. With three variables each equation is a plane in space, and a unique solution is the single point where all three planes meet. Two planes generally intersect in a line; the third plane then either pierces that line at one point (unique solution), contains it (infinitely many), or runs parallel to it (none).

Other methods, and when to prefer them

Cramer’s rule is the natural fit for 3×3 by hand because it is mechanical and each answer is independent of the others. It scales badly though: a 10×10 system by Cramer’s rule needs eleven determinants, and the work grows factorially. Gaussian elimination is what software actually uses, because its cost grows like n³ and it is far more stable numerically.

Real-world applications: mixture problems combining three solutions of different concentrations, circuit analysis using Kirchhoff’s laws where each loop contributes an equation, force balance in statics, and fitting a parabola through three known points.


How we build and check this calculator

This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.

SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.


Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.