System of Equations Calculator

Solve 2 or 3 linear equations in 2 or 3 unknowns by elimination. Shows x, y and z, the determinant, and says when there is no solution or infinitely many.

Results

Solution
x = 1, y = −1, z = 2
Substitute these back into each equation to check.
x
1
y
-1
z
2
Determinant D of the coefficients
2
Not zero, so there is exactly one solution. Cramer’s rule: each unknown is a determinant divided by D.

How it’s calculated

Enter each equation in the form ax + by (+ cz) = d, using 0 for a term that is missing. The calculator solves the system by Gaussian elimination with partial pivoting: it adds multiples of one equation to another to remove unknowns one at a time, then reads off the values.

Three outcomes are possible. If the determinant D of the coefficients is not zero there is exactly one solution. If D = 0 there is either no solution (the equations contradict each other, such as parallel lines) or infinitely many (the equations describe the same line or plane), and the calculator tells you which.

Cramer's rule, 2 unknowns: D = a₁b₂ − a₂b₁ x = (d₁b₂ − d₂b₁) ÷ D y = (a₁d₂ − a₂d₁) ÷ D 3 unknowns: x = Dₓ ÷ D, y = D_y ÷ D, z = D_z ÷ D, where Dₓ is D with the x column replaced by the d column

Example: x − 2y + 3z = 9, −x + 3y = −4, 2x − 5y + 5z = 17. The determinant is D = 1(15 − 0) − (−2)(−5 − 0) + 3(5 − 6) = 2. Elimination gives x = 1, y = −1, z = 2. Check the first equation: 1 + 2 + 6 = 9. Cramer's rule gives the same: Dₓ = 2, D_y = −2, D_z = 4, so x = 1, y = −1, z = 2.

Frequently asked questions

What does "no solution" mean?

The equations cannot all be true at once. With two unknowns the lines are parallel (same slope, different position). Check your numbers for a typo, or the problem may truly have no answer.

What does "infinitely many solutions" mean?

At least one equation is redundant, a copy or multiple of the others. With two unknowns both equations draw the same line, so every point on it solves the system.

How do I enter a missing term?

Use 0. For example y = 2x + 1 rearranges to −2x + y = 1, so the x coefficient is −2, the y coefficient is 1 and the right-hand side is 1. Move all unknowns to the left first.

What is Cramer’s rule?

It solves a system by determinants: each unknown equals a determinant (the coefficient matrix with one column swapped for the right-hand sides) divided by D, the determinant of the coefficient matrix. It only works when D is not zero.

Embed this calculator

Add this free calculator to your own website. Copy the code below into your page’s HTML:

Need this calculator branded, changed or built around your own prices?See custom business solutions →

Sources

Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.

Added · Last updated · How we check our calculators

Spotted a mistake or missing option? Report a problem· Suggest a calculator