3-Variable System of Equations
solver.
Row operations on three equations in x, y and z, with every step shown.
- D, the determinant
- −1
- Rank of A
- 3
- Rank of [A | b]
- 3
The three planes meet at one point. D is −1, not 0, so no other point fits all three equations.
A flat slice through the planes
Drag the point to move the solutionThe three planes cut flat at z = −1. At this height the three lines meet at (2, 3), which is the solution.
The three planes
The three planes meet at the single point (2, 3, −1). Each equation is a flat plane, drawn as a patch around the solution point.
Working
Exact view: whole-number row operations, keeping every fraction.
- 1The system2x + y − z = 8−3x − y + 2z = −11−2x + y + 2z = −3
- 2Write the numbers as a grid, with the right sides last21−18−3−12−11−212−3
- 3Multiply row 1 by12112−124−3−12−11−212−3
- 4Add3times row 1 to row 2112−124012121−212−3
- 5Add2times row 1 to row 3112−1240121210215
- 6Multiply row 2 by2112−12401120215
- 7Add−12times row 2 to row 110−1301120215
- 8Add−2times row 2 to row 310−13011200−11
- 9Multiply row 3 by−110−130112001−1
- 10Add1times row 3 to row 110020112001−1
- 11Add−1times row 3 to row 210020103001−1
- 12Read the answers from the last columnx=2y=3z=−1
- 13Check: put the answer back into each equation2(2)+1(3)−1(−1)= 8−3(2)−1(3)+2(−1)= −11−2(2)+1(3)+2(−1)= −3
What if a right side changes?
What if a right side changes
| Right side | x | y | z | Solutions |
|---|---|---|---|---|
| 4One | −14 | 11 | −21 | One |
| 6One | −6 | 7 | −11 | One |
| 8(yours)One | 2 | 3 | −1 | One |
| 10One | 10 | −1 | 9 | One |
| 12One | 18 | −5 | 19 | One |
Steps of 2 on the right side of equation 1, with the other numbers kept. Each row still has one solution, because D does not depend on the right sides.
How it's worked out
Each equation has the shape below, with its own numbers a, b, c and d. A solution is an ordered triple, one value each for x, y and z that makes all three equations true at once. Each equation is a flat plane in space, so a solution is a point that sits on all three planes.
Write the numbers as a grid with the right sides in a last column. This grid is the augmented matrix. Three row operations never change the answer: swap two rows, multiply a row by a number that is not 0, and add a multiple of one row to another. The tool uses them to clear each column until the left part reads as 1s down the middle and 0s elsewhere.
In the decimal view, each column starts from the row with the largest entry in it. This is called partial pivoting. A small pivot can cause large round-off errors/03%3A_System_of_Equations/3.03%3A_Partial_Pivoting), so a swap first keeps the decimals honest. The exact view works with whole numbers and fractions instead, so nothing is rounded.
Two numbers decide which case you have. The rank is the number of pivots that elimination finds. Compare the rank of the left part, A, with the rank of the whole grid, [A | b].
| Case | D | Rank A | Rank [A | b] |
|---|---|---|---|
| One point | −1 | 3 | 3 |
| A line | 0 | 2 | 2 |
| A plane | 0 | 1 | 1 |
| None | 0 | 2 | 3 |
When the determinant D is not 0, there is one solution, and Cramer's rule gives each unknown as one determinant over D. When D is 0, Cramer's rule cannot tell you whether there are no solutions or many. Elimination can.
Worked examples
A box office counts three kinds of ticket
A theater sells adult tickets at 12 dollars, child tickets at 8 dollars and senior tickets at 10 dollars. One night it sells 200 tickets for 2,040 dollars, and twice as many adults as seniors. Let x, y and z be the adult, child and senior counts.
The third equation says x − 2z = 0, which is the "twice as many" fact with z moved across. The solver gives 88 adults, 68 children and 44 seniors, and D is 10. Whole numbers are a good sign that the totals were typed right.
If the takings had been 20 dollars higher, the what-if table gives x = 92, y = 62 and z = 46. So one wrong digit in the total changes all three counts, not just one.
Lena fits a curve through three points
Lena wants the parabola that passes through (1, 4), (2, 9) and (3, 16). Its equation is y = ax² + bx + c, so each point gives one linear equation in a, b and c. She types a, b and c into the x, y and z columns.
At x = 1 the equation reads a + b + c = 4. At x = 2 it reads 4a + 2b + c = 9, and at x = 3 it reads 9a + 3b + c = 16.
The answer is a = 1, b = 2 and c = 1, so the curve is y = x² + 2x + 1. D is −2.
Omar finds a line of solutions
Omar's system is x + y + z = 6, x − y + z = 2 and 2x + 2z = 8. Add the first two equations and you get the third, so it brings no new fact. Elimination finds only two pivots, and the z column has none.
So z is free. Call it t, and the answer is x = 4 − t, y = 2, z = t. Each value of t gives one point on the line where the three planes meet. At t = 0 the point is (4, 2, 0); put it back into all three equations and each one holds.
The ranks tell the story: rank A and rank [A | b] are both 2, one short of 3, so there is one free unknown.
Reading your result
One point. The three planes cross at a single spot, and the slice shows three lines meeting there. Put the answer back into each equation as a check; the last step of the working does this for you.
A line or a plane. The planes share a whole line (rank 2) or are all the same plane (rank 1). Your answer is a rule in t, or in t and s. You may see a different but equal form in a textbook, because any free unknown can be picked as the parameter.
No solution. Elimination leaves a row that reads 0 = a number other than 0. For x + 2y + 3z = 4 with 2x + 4y + 6z = 9, the second plane is parallel to the first, so rank [A | b] is 3 while rank A is 2. The same can happen with no two planes parallel: they can meet in pairs along three parallel lines, like the sides of a tent.
Small D, big moves. If D is close to 0, the planes are nearly parallel, and a small change on the right side moves the answer a lot. In the default system D is −1, and the what-if table shows the size of each move.
Common mistakes
- Leaving a box empty for a missing unknown. If an equation has no y, its y number is 0. Type 0 so every column lines up.
- Moving a term without its sign. In x = 2z, the z term goes across as −2z, so the row reads 1, 0, −2, 0.
- Reading D = 0 as "no solution". A zero determinant only says there is not exactly one answer. The ranks decide between none and infinitely many.
- Stopping at the first pair. OpenStax solves x − 2y + 3z = 9, −x + 3y − z = −6 and 2x − 5y + 5z = 17 to get (1, −1, 2). A triple that fits two equations but not the third is not a solution, so check all three.
Questions people ask
Sources
- OpenStax, College Algebra 2e, section 7.2, Systems of Linear Equations: Three Variables
- OpenStax, College Algebra 2e, section 7.6, Solving Systems with Gaussian Elimination
- OpenStax, College Algebra 2e, section 7.8, Solving Systems with Cramer's Rule
- Chasnov, Numerical Methods, section 3.3, Partial Pivoting (LibreTexts)