From the free course College Algebra on Lykke
7.2 Systems of Linear Equations: Three Variables
Key concepts: Solving systems of three linear equations in three variables · Gaussian elimination · Identifying inconsistent systems · Identifying dependent systems with infinitely many solutions · Geometric interpretation of three-variable systems as intersecting planes · Expressing solution sets with a free parameter · Matrix methods using the inverse of a coefficient matrix · Setting up systems from financial investment word problems
By the end of this section the student can: Solve systems of three equations in three variables; Identify inconsistent systems of equations containing three variables; Express the solution of a system of dependent equations containing three variables
7.2 Systems of Linear Equations: Three Variables
Three linear equations in three variables can describe three planes in space, and solving the system means finding every point that lies on all three planes at once. Depending on how the planes intersect, the system has exactly one solution, no solution, or infinitely many solutions.
Gaussian Elimination for a $3 \times 3$ System
Gaussian elimination is a systematic version of elimination. The goal is to combine equations until the system has a staircase pattern: first eliminate $x$ from the second and third equations, then eliminate $y$ from the third equation, and finally substitute backward.
The allowed elimination operations are:
- Multiply an equation by a nonzero constant.
- Add a multiple of one equation to another equation.
- Interchange two equations.
These operations change the appearance of the system but not its solution set.
A useful organizational form is the augmented matrix, which records the coefficients and constants:
$$ \left[ \begin{array}{ccc|c} a_1 & b_1 & c_1 & d_1\ a_2 & b_2 & c_2 & d_2\ a_3 & b_3 & c_3 & d_3 \end{array} \right]. $$
The vertical bar separates the coefficient columns from the constants.
Worked Example: Solving a System by Gaussian Elimination
Solve
$$ \begin{aligned} 2x+y-2z&=-1 \qquad (1)\ 3x-3y-z&=5 \qquad (2)\ x-5y+5z&=8 \qquad (3). \end{aligned} $$
First eliminate $x$ from equations $(2)$ and $(3)$. To avoid fractions, multiply equation $(2)$ by $2$ and equation $(1)$ by $3$, then subtract:
$$ \begin{aligned} 2(2):\quad &6x-6y-2z=10,\ 3(1):\quad &6x+3y-6z=-3. \end{aligned} $$
Subtract the second equation from the first:
$$ \begin{aligned} (6x-6y-2z)-(6x+3y-6z)&=10-(-3),\ -9y+4z&=13. \end{aligned} $$
Call this new equation $(4)$.
Now eliminate $x$ from equation $(3)$ by multiplying equation $(3)$ by $2$ and subtracting equation $(1)$:
$$ \begin{aligned} 2(3):\quad &2x-10y+10z=16,\ (1):\quad &2x+y-2z=-1. \end{aligned} $$
Therefore,
$$ \begin{aligned} (2x-10y+10z)-(2x+y-2z)&=16-(-1),\ -11y+12z&=17. \end{aligned} $$
Call this equation $(5)$.
We now have a two-variable system:
$$ \begin{aligned} -9y+4z&=13 \qquad (4),\ -11y+12z&=17 \qquad (5). \end{aligned} $$
To eliminate $y$, multiply equation $(4)$ by $11$ and equation $(5)$ by $9$:
$$ \begin{aligned} 11(4):\quad &-99y+44z=143,\ 9(5):\quad &-99y+108z=153. \end{aligned} $$
Subtract the first equation from the second:
$$ \begin{aligned} (-99y+108z)-(-99y+44z)&=153-143,\ 64z&=10,\ z&=\frac{10}{64},\ z&=\frac{5}{32}. \end{aligned} $$
Substitute $z=\frac{5}{32}$ into equation $(4)$:
$$ \begin{aligned} -9y+4\left(\frac{5}{32}\right)&=13,\ -9y+\frac{20}{32}&=13,\ -9y+\frac{5}{8}&=13,\ -9y&=13-\frac{5}{8},\ -9y&=\frac{104}{8}-\frac{5}{8},\ -9y&=\frac{99}{8},\ y&=-\frac{99}{72},\ y&=-\frac{11}{8}. \end{aligned} $$
Finally, substitute $y=-\frac{11}{8}$ and $z=\frac{5}{32}$ into equation $(1)$:
$$ \begin{aligned} 2x+\left(-\frac{11}{8}\right)-2\left(\frac{5}{32}\right)&=-1,\ 2x-\frac{11}{8}-\frac{10}{32}&=-1,\ 2x-\frac{22}{16}-\frac{5}{16}&=-1,\ 2x-\frac{27}{16}&=-1,\ 2x&=-1+\frac{27}{16},\ 2x&=-\frac{16}{16}+\frac{27}{16},\ 2x&=\frac{11}{16},\ x&=\frac{11}{32}. \end{aligned} $$
Thus the unique solution is
$$ \boxed{\left(x,y,z\right)=\left(\frac{11}{32},-\frac{11}{8},\frac{5}{32}\right)}. $$
Always check a solution by substituting the ordered triple into all three original equations.
Classifying Three-Variable Systems
A system is independent when it has exactly one solution. Algebraically, elimination produces values for all three variables. Geometrically, the three planes meet at one common point.
A system is inconsistent when it has no solution. During elimination, inconsistency appears as a false equation such as
$$ 0=2,\qquad 0=5,\qquad \text{or}\qquad 3=7. $$
A system is dependent when it has infinitely many solutions. Elimination produces an identity such as
$$ 0=0, $$
leaving at least one variable free.
Recognizing an Inconsistent System
Consider
$$ \begin{aligned} x-3y+z&=4 \qquad (1),\ 2x-8y+10z&=22 \qquad (2),\ 5x-13y+13z&=8 \qquad (3). \end{aligned} $$
Multiply equation $(1)$ by $-2$ and add it to equation $(2)$:
$$ \begin{aligned} -2(1):\quad &-2x+6y-2z=-8,\ (2):\quad &2x-8y+10z=22,\ \hline &-2y+8z=14. \end{aligned} $$
Next, multiply equation $(1)$ by $-5$ and add it to equation $(3)$:
$$ \begin{aligned} -5(1):\quad &-5x+15y-5z=-20,\ (3):\quad &5x-13y+13z=8,\ \hline &2y+8z=-12. \end{aligned} $$
Add the two resulting equations:
$$ \begin{aligned} (-2y+8z)+(2y+8z)&=14+(-12),\ 16z&=2. \end{aligned} $$
This particular system is consistent and gives $z=\frac18$. To see an actual contradiction, compare instead the equations
$$ -2y-8z=14 \qquad\text{and}\qquad 2y+8z=-12. $$
Adding them gives
$$ \begin{aligned} (-2y-8z)+(2y+8z)&=14+(-12),\ 0&=2. \end{aligned} $$
The statement $0=2$ is impossible, so no values of $x$, $y$, and $z$ can satisfy every equation. The system is therefore inconsistent:
$$ \boxed{\text{no solution}}. $$
Geometrically, the planes have no common point. Some planes may be parallel, or two planes may intersect in a line that never meets the third plane.
Dependent Systems and Free Parameters
A dependent system has infinitely many solutions because the equations do not impose three independent conditions. The planes may all coincide, two may coincide and intersect the third in a line, or three distinct planes may share a common line.
Worked Example: Writing a Parametric Solution
Solve
$$ \begin{aligned} 2x+y-3z&=0 \qquad (1),\ 4x+2y-6z&=0 \qquad (2),\ x-y+z&=0 \qquad (3). \end{aligned} $$
$$ \begin{aligned} -2(1):\quad &-4x-2y+6z=0,\ (2):\quad &4x+2y-6z=0,\ \hline &0=0. \end{aligned} $$
This identity shows that equation $(2)$ is dependent on equation $(1)$.
Use equation $(3)$ to solve for $y$:
$$ \begin{aligned} x-y+z&=0,\ -y&=-x-z,\ y&=x+z. \end{aligned} $$
Substitute this expression for $y$ into equation $(1)$:
$$ \begin{aligned} 2x+y-3z&=0,\ 2x+(x+z)-3z&=0,\ 3x-2z&=0,\ -2z&=-3x,\ z&=\frac{3}{2}x. \end{aligned} $$
Now find $y$:
$$ \begin{aligned} y&=x+z,\ y&=x+\frac{3}{2}x,\ y&=\frac{2}{2}x+\frac{3}{2}x,\ y&=\frac{5}{2}x. \end{aligned} $$
The variable $x$ is free: it can be any real number. Therefore,
$$ \boxed{(x,y,z)=\left(x,\frac{5}{2}x,\frac{3}{2}x\right),\qquad x\in\mathbb{R}}. $$
The parameter could instead be called $t$:
$$ \boxed{(x,y,z)=\left(t,\frac{5}{2}t,\frac{3}{2}t\right),\qquad t\in\mathbb{R}}. $$
Each value of $t$ gives a different point on the common intersection line.
Geometric Interpretation
Each equation in three variables represents a plane in three-dimensional space. The solution set is the common intersection of the three planes.
- A unique solution is one common point.
- No solution means the planes have no common point.
- Infinitely many solutions commonly occur when the planes share a line or when some planes coincide.
The algebraic outcomes $0=2$ and $0=0$ are not accidents; they reveal the geometry of the planes.
Matrix Form of a Linear System
A system can be written as
$$ AX=B, $$
where $A$ is the coefficient matrix, $X$ is the variable matrix, and $B$ is the constant matrix. For example,
$$ \begin{aligned} x+y&=3,\ y+z&=3,\ x+z&=4 \end{aligned} $$
becomes
$$ \left[ \begin{array}{ccc} 1&1&0\ 0&1&1\ 1&0&1 \end{array} \right] \left[ \begin{array}{c} x\y\z \end{array} \right]
\left[ \begin{array}{c} 3\3\4 \end{array} \right]. $$
If $A$ has an inverse, multiply both sides by $A^{-1}$:
$$ \begin{aligned} AX&=B,\ A^{-1}AX&=A^{-1}B,\ IX&=A^{-1}B,\ X&=A^{-1}B. \end{aligned} $$
For this system,
$$ A^{-1}
\frac12 \left[ \begin{array}{ccc} 1&-1&1\ 1&1&-1\ -1&1&1 \end{array} \right]. $$
Thus,
\begin{aligned}
X
&=
\frac12
\left[
\begin{array}{ccc}
1&-1&1\\
1&1&-1\\
-1&1&1
\end{array}
\right]
\left[
\begin{array}{c}
3\\3\\4
\end{array}
\right]\\
&=
\frac12
\left[
\begin{array}{c}
3-3+4\\
3+3-4\\
-3+3+4
\end{array}
\right]\\
&=
\frac12
\left[
\begin{array}{c}
4\\2\\4
\end{array}
\right]
=
\left[
\begin{array}{c}
2\\1\\2
\end{array}
\right].
\end{aligned}
Therefore,
$$ \boxed{(x,y,z)=(2,1,2)}. $$
If $A$ does not have an inverse, the system does not automatically have no solution. It may be inconsistent, or it may be dependent with infinitely many solutions.
Application: Investment Systems
Investment problems can be translated into systems by using one variable for each account. The total-investment equation describes the principal, and the interest equation describes the annual return.
Suppose $x$ dollars are invested at $4%$, $y$ dollars at $5%$, and $z$ dollars at $6%$. A total of $$10{,}000$ is invested, the amount at $4%$ is twice the amount at $5%$, and the annual interest is $$520$.
The system is
$$ \begin{aligned} x+y+z&=10000,\ x&=2y,\ 0.04x+0.05y+0.06z&=520. \end{aligned} $$
Substitute $x=2y$ into the total equation:
$$ \begin{aligned} 2y+y+z&=10000,\ z&=10000-3y. \end{aligned} $$
Substitute $x=2y$ and $z=10000-3y$ into the interest equation:
$$ \begin{aligned} 0.04(2y)+0.05y+0.06(10000-3y)&=520,\ 0.08y+0.05y+600-0.18y&=520,\ -0.05y+600&=520,\ -0.05y&=-80,\ y&=1600. \end{aligned} $$
Then
$$ \begin{aligned} x&=2y=2(1600)=3200,\ z&=10000-3(1600)=5200. \end{aligned} $$
Thus,
$$ \boxed{x=$3{,}200,\qquad y=$1{,}600,\qquad z=$5{,}200}. $$
Practice Problems
Solve each system by Gaussian elimination.
$$ \begin{aligned} x+y+z&=2,\ y-3z&=1,\ 2x+y+5z&=0. \end{aligned} $$
$$ \begin{aligned} 2x-y+3z&=17,\ -5x+4y-2z&=-46,\ 2y+5z&=-7. \end{aligned} $$
- Determine whether the system is inconsistent, dependent, or independent:
$$ \begin{aligned} x+2y-z&=3,\ 2x+4y-2z&=6,\ 3x+6y-3z&=10. \end{aligned} $$
Answers
- From $y-3z=1$, we have $y=1+3z$. From $x+y+z=2$,
$$ x=2-y-z=2-(1+3z)-z=1-4z. $$
Substitute into the third equation:
$$ \begin{aligned} 2(1-4z)+(1+3z)+5z&=0,\ 2-8z+1+3z+5z&=0,\ 3&=0. \end{aligned} $$
This contradiction means
$$ \boxed{\text{no solution; the system is inconsistent}}. $$
- Elimination gives
$$ \boxed{(x,y,z)=(4,-6,1)}. $$
- Multiply the first equation by $2$ to obtain the second equation, but elimination of the first and third equations gives
$$ 3(x+2y-z)=9 \qquad\text{and}\qquad 3x+6y-3z=10, $$
so
$$ 9=10. $$
Therefore,
Content adapted from OpenStax College Algebra 2e by Jay Abramson et al., licensed CC BY 4.0.

Source Materials
Study College Algebra on Lykke
This course page is free to open: signed out, you can read its first two sections, and signing in, on any plan, opens the rest. The free Lykke Chrome extension syncs your own Canvas courses, so ChatGPT, Claude and Muse can answer from your classes and deadlines. It only reads Canvas.
Add the free extensionSign in to open every section