Systems of Three Linear Equations
At the school snack bar, three groups order different combos of soft pretzels, juices, and cookies, and each group pays a different total. Nobody posted the prices. That is three unknown prices and three receipts. With two unknowns, two equations were enough. With three unknowns you need three equations, and a method that keeps the bookkeeping under control: Gaussian elimination.
What is a system of three equations?
Here are the snack bar receipts. Let $x$ be the price of a pretzel, $y$ the price of a juice, and $z$ the price of a cookie. Each receipt gives one equation.
Group A paid $\$9$, group B paid $\$10$, and group C paid $\$13$. We'll solve this system at the end of the page.
You can also work backward: choose the solution first and build the system around it.
Check if the triplet $x = 1$, $y = -1$, $z = 2$ is a solution to the following system. Justify your answer. $3x + y - z = 0$ $x - 2y + z = 5$ $2x + y + z = 3$
Check if the triplet $x = 1$, $y = -1$, $z = 2$ is a solution to the following system. Justify your answer.
$3x + y - z = 0$
$x - 2y + z = 5$
$2x + y + z = 3$
Write a linear system of three equations with three unknowns whose only solution is the triplet $x = 2$, $y = 0$, $z = -1$.
Write a linear system of three equations with three unknowns whose only solution is the triplet $x = 2$, $y = 0$, $z = -1$.
Echelon form and back substitution
Some systems are easy to solve because of their shape.
Solve the following system of linear equations, which is already in echelon form, using back substitution: $x + 2y - z = 4$ $3y + z = 5$ $2z = 4$
Solve the following system of linear equations, which is already in echelon form, using back substitution:
$x + 2y - z = 4$
$3y + z = 5$
$2z = 4$
Gaussian elimination
Most systems don't start in echelon form. Gaussian elimination turns any system into an equivalent echelon one.
Why do these operations keep the solutions? If two quantities are equal, adding equal amounts to both sides keeps them equal. You never create or lose a solution.
When an equation has fractions, clear them first by multiplying the whole equation by the LCD. For example, $\frac{x}{2} + \frac{y}{3} + \frac{z}{6} = 2$ times $6$ gives $3x + 2y + z = 12$.
Apply Gaussian elimination to triangularise and solve the following system of equations: $x - y + z = 2$ $2x + y - z = 1$ $x + 2y + z = 7$
Apply Gaussian elimination to triangularise and solve the following system of equations:
$x - y + z = 2$
$2x + y - z = 1$
$x + 2y + z = 7$
Solve the following system of linear equations containing fractional coefficients. Simplify the equations before applying Gaussian elimination:…
Solve the following system of linear equations containing fractional coefficients. Simplify the equations before applying Gaussian elimination:
$\frac{x}{2} + \frac{y}{3} - z = 1$
$x - \frac{y}{2} + \frac{z}{4} = 2$
$\frac{x}{3} + y - \frac{z}{2} = 3$
Shortcuts: pair sums and a change of variable
Sometimes each equation is missing a different unknown. Then adding all three equations is faster than a full elimination.
Another trick is a change of variable. If the unknowns appear only as $\frac{1}{x}$, $\frac{1}{y}$, $\frac{1}{z}$, let $u = \frac{1}{x}$, $v = \frac{1}{y}$, $w = \frac{1}{z}$. The system becomes linear in $u$, $v$, $w$.
Solve the following system where one unknown is missing in each equation: $x + y = 5$ $y + z = 7$ $x + z = 6$
Solve the following system where one unknown is missing in each equation:
$x + y = 5$
$y + z = 7$
$x + z = 6$
Solve the following non-linear system of equations by making a suitable change of variable (for example, $u = \frac{1}{x}$, $v = \frac{1}{y}$, $w = \frac{1}{z}$):…
Solve the following non-linear system of equations by making a suitable change of variable (for example, $u = \frac{1}{x}$, $v = \frac{1}{y}$, $w = \frac{1}{z}$):
$\frac{1}{x} + \frac{1}{y} = 5$
$\frac{1}{y} + \frac{1}{z} = 7$
$\frac{1}{x} + \frac{1}{z} = 6$
One solution, infinitely many, or none
When you finish eliminating, the last equation tells you what kind of system you have.
If all three equations turn out to be multiples of one equation, for example $x + y + z = 6$, two unknowns are free. Set $y = s$ and $z = t$ to get $(6 - s - t,\ s,\ t)$.
Triangularise the following system using Gaussian elimination and indicate if it is an inconsistent system: $x + y + z = 1$ $2x + y - z = 0$ $3x + 2y = 5$
Triangularise the following system using Gaussian elimination and indicate if it is an inconsistent system:
$x + y + z = 1$
$2x + y - z = 0$
$3x + 2y = 5$
Apply Gaussian elimination to the following system and verify that it is a consistent and indeterminate system by obtaining an equation of the form $0 = 0$:…
Apply Gaussian elimination to the following system and verify that it is a consistent and indeterminate system by obtaining an equation of the form $0 = 0$:
$x - y + 2z = 3$
$-2x + 2y - 4z = -6$
$3x - 3y + 6z = 9$
Solve the following consistent and indeterminate system and express its infinite solutions in terms of a parameter $\lambda$: $x + 2y - z = 4$ $2x - y + 3z = 3$…
Solve the following consistent and indeterminate system and express its infinite solutions in terms of a parameter $\lambda$:
$x + 2y - z = 4$
$2x - y + 3z = 3$
$3x + y + 2z = 7$
Systems with a parameter
Sometimes a letter such as $k$, $m$, or $a$ is hiding in the system, and you must decide how the outcome depends on it. Do the elimination as usual, but keep the letter, and watch for the values that make a coefficient $0$.
| Situation | Outcome |
|---|---|
| $a \ne 1$ | one solution |
| $a = 1$ and $b = 3$ | infinitely many |
| $a = 1$ and $b \ne 3$ | none |
Find the values of the parameter $k$ for which the following system is inconsistent: $x + y - z = 2$ $2x - y + z = 1$ $3x + y - z = k$
Find the values of the parameter $k$ for which the following system is inconsistent:
$x + y - z = 2$
$2x - y + z = 1$
$3x + y - z = k$
Find the values of the parameters $a$ and $b$ so that the following system of equations is consistent and indeterminate: $x - y + 2z = 1$ $2x + ay - z = 3$…
Find the values of the parameters $a$ and $b$ so that the following system of equations is consistent and indeterminate:
$x - y + 2z = 1$
$2x + ay - z = 3$
$3x + y + bz = 4$
Discuss the following system of equations in terms of the values of the parameter $m$. Indicate for which values of $m$ the system is consistent and determinate,…
Discuss the following system of equations in terms of the values of the parameter $m$. Indicate for which values of $m$ the system is consistent and determinate, consistent and indeterminate, or inconsistent.
$x + y + z = 1$
$x + my + z = m$
$x + y + m^{2}z = m^{2}$
Planes in space
A linear equation in three unknowns, like $x + y + z = 6$, graphs as a plane in 3D space. Solving the system means finding the points that lie on all three planes. Three planes can meet in a single point, share a whole line, or have no point in common.
The picture shows the planes seen from the end of a line: three lines through one point means the planes share a line, and a triangle means every two planes meet, but no point is on all three.
| Arrangement of the planes | Solutions |
|---|---|
| Meet at exactly one point | one |
| Share a common line | infinitely many, one parameter |
| All three are the same plane | infinitely many, two parameters |
| No point is on all three (for example, two parallel planes) | none |
The line of solutions has a parametric equation. In our earlier example the solutions $(7 - 3t,\ t,\ 2t - 1)$ can be written as $(7, 0, -1) + t(-3, 1, 2)$: a point on the line plus $t$ times a direction.
For example, $P = (1, 1, 0)$ and $Q = (3, 0, 0)$ both satisfy $x + 2y - z = 3$. Then $R = (3 - 2\lambda,\ \lambda,\ 0)$ and $(3 - 2\lambda) + 2\lambda - 0 = 3$ for every $\lambda$. The same pattern works for any equation, and that is what a general proof has to show.
Geometrically, a linear equation with three unknowns represents a plane in space. Observe the following graphical representation where three planes intersect along a…
Geometrically, a linear equation with three unknowns represents a plane in space. Observe the following graphical representation where three planes intersect along a single line, forming a pencil of planes.
Given the system:
$\pi_{1}: x + 2y - z = 3$
$\pi_{2}: 2x - y + z = 1$
$\pi_{3}: 4x + 3y - z = k$
Calculate the value of $k$ so that the three planes intersect in a single line (consistent and indeterminate system with one degree of freedom) and express the parametric equation of this line of intersection.
Prove algebraically that if a linear system of three equations with three unknowns admits two distinct solutions, for example $S_{1} = (1, 0, 0)$ and…
Prove algebraically that if a linear system of three equations with three unknowns admits two distinct solutions, for example $S_{1} = (1, 0, 0)$ and $S_{2} = (0, 1, 0)$, then it admits infinite solutions. To do this, check that any linear combination of the form $S = \lambda S_{1} + (1-\lambda)S_{2}$ is also a solution to the system.
Turning words into equations
Most real uses of three-unknown systems start as a paragraph. A good routine:
-
Name the three unknowns (with units).
-
Find three independent facts in the problem and write an equation for each.
-
Solve the system.
-
Check in the original words, and make sure the answer makes sense (for example, no negative ages).
| Words | Equation piece |
|---|---|
| "the sum of three numbers is $12$" | $x + y + z = 12$ |
| "$A$ is twice $B$" | $A = 2B$ |
| "$A$ is $30$ more than $B$" | $A = B + 30$ |
| "$A$ and $B$ together" | $A + B$ |
| "the mean of $A$ and $C$ is $B$" | $B = \frac{A + C}{2}$, or $2B = A + C$ |
| "the angles of a triangle add to $180^\circ$" | $A + B + C = 180$ |
The sum of three numbers is $12$. The first plus the second sum to $7$. The second plus the third sum to $9$. Set up a system of three equations with three unknowns and…
The sum of three numbers is $12$. The first plus the second sum to $7$. The second plus the third sum to $9$. Set up a system of three equations with three unknowns and determine the value of these numbers.
The ages of a grandfather, his son, and his grandson sum to $120$ years. The grandfather is exactly twice as old as the son. Furthermore, the son is $30$ years older…
The ages of a grandfather, his son, and his grandson sum to $120$ years. The grandfather is exactly twice as old as the son. Furthermore, the son is $30$ years older than the grandson. Determine the age of each of them by setting up a system of three equations.
In a triangle, the sum of its three interior angles $A$, $B$, and $C$ is $180^{\circ}$. Angle $A$ is equal to the sum of angles $B$ and $C$. Furthermore, angle $B$ is…
In a triangle, the sum of its three interior angles $A$, $B$, and $C$ is $180^{\circ}$. Angle $A$ is equal to the sum of angles $B$ and $C$. Furthermore, angle $B$ is twice angle $C$. Set up a system of three equations and determine the measure of the three angles.
Prices, points, and rates
A lot of problems are about counting items that have a value each: prices, points, parts per hour. The pattern is "number of items times value per item", added up.
Rate problems fit the same pattern. "Machines A and B together make $50$ parts per hour" means $A + B = 50$. If the three machines are paired up this way, the pair-sum trick from earlier solves it quickly.
A cafe sells three types of sandwiches: ham, cheese, and Spanish omelet. A group of friends orders $3$ ham, $2$ cheese, and $1$ Spanish omelet sandwiches, paying $\$14…
A cafe sells three types of sandwiches: ham, cheese, and Spanish omelet. A group of friends orders $3$ ham, $2$ cheese, and $1$ Spanish omelet sandwiches, paying $\$14$. Another group orders $2$ ham, $1$ cheese, and $3$ Spanish omelet sandwiches, paying $\$13$. A third group orders $1$ ham, $3$ cheese, and $2$ Spanish omelet sandwiches, paying $\$15$. Set up and solve a system to calculate the price of each type of sandwich.
In a basketball game, a player has scored a total of $15$ baskets, getting $31$ points. Knowing that the number of two-point baskets is three times the number of…
In a basketball game, a player has scored a total of $15$ baskets, getting $31$ points. Knowing that the number of two-point baskets is three times the number of three-point baskets, and that they have also scored free throws (which are worth one point), set up a system of equations to find out how many baskets of each type they have scored.
Three machines A, B, and C manufacture parts in a factory. Working together, machines A and B manufacture $50$ parts per hour. Machines B and C together manufacture $70$…
Three machines A, B, and C manufacture parts in a factory. Working together, machines A and B manufacture $50$ parts per hour. Machines B and C together manufacture $70$ parts per hour. Finally, machines A and C together manufacture $60$ parts per hour. Calculate how many parts per hour each machine manufactures individually.
Harder setups: digits, mixtures, whole-number answers
Some problems need a bit more translation.
-
Digits. A three-digit number with hundreds digit $c$, tens digit $d$, and units digit $u$ has value $100c + 10d + u$. Reversed, it is $100u + 10d + c$. "The tens digit is the mean of the others" means $2d = c + u$.
-
Mixtures. Convert percents to decimals. If three alloys contain $10\%$, $30\%$, and $20\%$ silver and you use $x$, $y$, $z$ pounds, the silver is $0.10x + 0.30y + 0.20z$ pounds. Write one equation for each metal or for the total weight.
-
Whole-number answers. Sometimes two equations are all you get. The system is dependent, and the context (items can't be fractions or negative) picks out the allowed parameter values.
The sum of the three digits of a number is $15$. If the order of the digits is reversed, the resulting number is $198$ units greater than the original number.…
The sum of the three digits of a number is $15$. If the order of the digits is reversed, the resulting number is $198$ units greater than the original number. Furthermore, the tens digit is the arithmetic mean of the hundreds and units digits. Find the original number. (Note: A three-digit number $c$, $d$, $u$ has a value of $100c + 10d + u$).
A transport company acquires three types of vehicles: vans, light trucks, and heavy trucks. It is known that the total number of vehicles acquired is $30$. The cost of…
A transport company acquires three types of vehicles: vans, light trucks, and heavy trucks. It is known that the total number of vehicles acquired is $30$. The cost of each van is $\$20.000$, that of each light truck is $\$30.000$, and that of each heavy truck is $\$50.000$. If the total investment has been $\$850.000$, set up the system and show that it is a consistent and indeterminate system. Then, find all possible integer solutions knowing that the company has bought at least one vehicle of each type.
Three alloys of silver, copper, and zinc are available. The first contains $10\%$ silver, $70\%$ copper, and $20\%$ zinc. The second contains $30\%$ silver, $40\%$…
Three alloys of silver, copper, and zinc are available. The first contains $10\%$ silver, $70\%$ copper, and $20\%$ zinc. The second contains $30\%$ silver, $40\%$ copper, and $30\%$ zinc. The third contains $20\%$ silver, $50\%$ copper, and $30\%$ zinc. We want to obtain $100$ pounds of a new alloy containing exactly $22\%$ silver and $52\%$ copper. Set up the system of equations to calculate how many pounds of each alloy we must mix and solve it.
Back to the snack bar: the system was $2x + y + z = 9$, $x + 2y + 3z = 10$, $3x + y + 2z = 13$. Eliminate $x$: $2R_2 - R_1$ gives $3y + 5z = 11$, and $2R_3 - 3R_1$ gives $-y + z = -1$. Eliminate $y$: $3R_3 + R_2$ gives $8z = 8$, so $z = 1$. Then $y = z + 1 = 2$, and $2x + 2 + 1 = 9$ gives $x = 3$. A pretzel costs $\$3$, a juice $\$2$, and a cookie $\$1$.