topic badge

4.02 Systems of equations and row operations

Lesson

Concept summary

The same solving methods that are used for systems of equations with 2 equations can be used to solve systems with more than 2 equations. For example, a system with 3 equations and 3 unknown variables like this: \begin{cases} x + y + z = 20\\4x - 2y + 3z = 14\\3 \left(x + y\right) = z \end{cases} Can be solved by graphing in a 3D coordinate plane. It can also be solved using matrices.

For a matrix or an augmented matrix, we can perform row operations to create a related matrix.

The operations we can perform are:

  • Multiplying a row by a scalar: R_1 \to 2R_1 ; \left[ \begin{matrix} 5 & 4 \\ -1 & 3 \end{matrix} \right] \to \left[ \begin{matrix} 5\cdot 2 & 4 \cdot 2 \\ -1 & 3 \end{matrix} \right] = \left[ \begin{matrix} 10 & 8 \\ -1 & 3 \end{matrix} \right]
  • Adding two rows: R_1 \to R_1+R_2 ; \left[ \begin{matrix} 5 & 4 \\ -1 & 3 \end{matrix} \right] \to \left[ \begin{matrix} 5+(-1) & 4+3 \\ -1 & 3 \end{matrix} \right]=\left[ \begin{matrix} 4&7 \\ -1 & 3 \end{matrix} \right]
  • Swapping two rows: R_1 \leftrightarrow R_2 ; \left[ \begin{matrix} 5 & 4 \\ -1 & 3 \end{matrix} \right] \to \left[ \begin{matrix} -1 & 3 \\ 5 & 4 \end{matrix} \right]

We can combine multiple operations into one step: R_1 \to R_1-2R_2 ; \left[ \begin{matrix} 5 & 4 \\ -1 & 3 \end{matrix} \right] \to \left[ \begin{matrix} 5-2(-1) & 4-2(3) \\ -1 & 3 \end{matrix} \right]= \left[ \begin{matrix} 7 & -2 \\ -1 & 3 \end{matrix} \right]

We do these steps to help with solving systems of equations represented by matrices.

Augmented matrix

A matrix which joins the columns of two smaller matrices with the same number of row together so that the same row operations can be easily applied to both. The columns of the two smaller matrices are separated visually by a vertical line.

Example:

\left[ \begin{array}{cc|c} 1 & -1 & -1 \\ 4 & -1 & 2 \end{array} \right]

For equations in standard form, the entries to the left of the vertical line are the coefficients in order and the entries to the right of the vertical line are the constants.

\left[ \begin{array}{ccc|c} 1 & -1 & 1 & 8\\ 0 & 1 & 2 & -2 \\ 0 & 0 & 1 & 1 \end{array} \right] \iff \begin{alignedat}{4} & x & - & y & + & z & = & 8 \\ & & & y &+2& z & = & -2 \\ & & & & &z & = & 1 \end{alignedat}

We can solve a system in two ways:

  1. Getting the augmented matrix to row-echelon form using row operations and then solving using back substitution
  2. Getting the augmented matrix to reduced row-echelon form using row operations
Row-echelon form

A matrix where the first non-zero number in each row is to the right of the first non-zero number in the row above. Any rows of all zeros are at the bottom.

Example:

\left[ \begin{array}{ccc|c} 1 & 3 &1&1\\ 0 & 2 &4 &9\\ 0 & 0 &-4 &2 \end{array} \right]

The coefficient matrix may also be called an "upper right triangular matrix".

Back substitution can be used because we can identify the value of one of the variables and then substitute that value back into the equation above it and repeat that process until we have solve for all variables.

Reduced row-echelon form

A row-echelon matrix where the first non-zero entry in each row is the only non-zero entry in its column and is a 1

Example:

\left[ \begin{array}{ccc|c} 1 &0 & 0&3\\ 0 & 1 &0&-2\\ 0 & 0 &0 &7 \end{array} \right]

The coefficient matrix may also be called a "diagonal matrix".

Note that to have a unique solution we need at least the same number of equations as variables and for the reduced row-echelon form to not have any rows that are all zeros for coefficients, but non-zero for the constant.

  • Unique solution, for example x=3, y=-2, and z=7: \left[ \begin{array}{ccc|c} 1 &0 & 0&3\\ 0 & 1 &0 &-2\\ 0 & 0 &1&7 \end{array} \right] \text{ or } \left[ \begin{array}{ccc|c} 1 &0 & 0&3\\ 0 & 1 &0 &-2\\ 0 & 0 &1&7 \\ 0 & 0 &0&0 \end{array} \right]
  • Infinite number of solution, for example x=3, y=-2, and z=t, where t is any real number: \left[ \begin{array}{ccc|c} 1 &0 & 0&3\\ 0 & 1 &0 &-2 \end{array} \right] \text{ or } \left[ \begin{array}{ccc|c} 1 &0 & 0&3\\ 0 & 1 &0 &-2 \\ 0 & 0 &0 &0 \end{array} \right]
  • No solution, where the last equation would be 0x+0y+0z=7, which is not valid: \left[ \begin{array}{ccc|c} 1 &0 & 0&3\\ 0 & 1 &0 &-2\\ 0 & 0 &0&7 \end{array} \right]

Worked examples

Example 1

Use technology to solve the following system of equations.\begin{cases} 3x-2y+z=15 \\ x+ 8y - 2z = -11 \\ \frac{1}{2}x-4y-\frac{1}{2}z=1 \end{cases}

Approach

We can use technology to help us solve this system of equations. We will plot the 3 equations with a 3D calculator and find the intersection point of the equations.

To help identify and keep track of the equations, we can label them as equations 1-3:

1\displaystyle 3x-2y+z\displaystyle =\displaystyle 15
2\displaystyle x+ 8y - 2z\displaystyle =\displaystyle -11
3\displaystyle \frac{1}{2}x-4y-\frac{1}{2}z\displaystyle =\displaystyle 1

Solution

Open the calculator tool and type the first function into the calculator's input. You can repeat this process for the remaining 2 equations.

The 3D graphing calculator tool with 3 planes graphed. Speak to your teacher for more info.

We now need to find the intersection point. We can do this by first finding the line of intersection of equations 1 and 2, followed by the line of intersection of equations 2 and 3. Afterwards we can find the intersection of those two lines which will be our common point of intersection for all 3 equations.

You can find the intersection line of two equations by going to "Tools", and clicking "Intersect Two Surfaces".

The 3D calculator tool with 3 planes graphed showing the basic tools menu. Speak to your teacher for more info.

We will repeat this twice, once for equations 1 and 2, then equations 2 and 3. The results will look like this:

The 3D calculator tool with 3 planes graphed and a line graphed at the intersection of each pair of planes. Speak to your teacher for more info.

The final step is to find the intersection point between our two lines. We can do this by going to tools and clicking "More", find the "Points" section and click "Intersect".

The 3D calculator tool with 3 planes graphed and a line graphed at the intersection of each pair of planes and the basic tools menu shown. Speak to your teacher for more info.

Once you intersect the two lines, you can go back to "Algebra" and you will see the resulting point of intersection.

The 3D calculator tool with 3 planes graphed and a line graphed at the intersection of each pair of planes. A point is graphed at the intersection of the lines. Speak to your teacher for more info.

As you can see the intersection of our two lines is at the point \left(3, -\dfrac{1}{2}, 5 \right). Therfore the solution to our system of equations is x=3, y=-\dfrac{1}{2}, and z=5.

Example 2

Perform the indicated row operation for the given matrices:

a

R_1 \to \dfrac{1}{3}R_1 ; \left[ \begin{matrix} -9 & 12 \\ 6 & 7 \end{matrix} \right]

Approach

For any real number a, the row operation R_n \to aR_n in a matrix means to replace each element in the nth row with a times its value.

Solution

The row operation R_1 \to \dfrac{1}{3}R_1 is asking us to replace each number in the first row with \dfrac{1}{3} times the value.

The matrix \left[ \begin{matrix} -9 & 12 \\ 6 & 7 \end{matrix} \right] becomes: \left[ \begin{matrix} \frac{1}{3}(-9) & \frac{1}{3}(12) \\ 6 & 7 \end{matrix} \right]=\left[ \begin{matrix} -3 & 4 \\ 6 & 7 \end{matrix} \right].

b

R_2 \to 3R_2-2R_3 ; \left[ \begin{matrix} -5 & 9 & 4\\ 10 & -8 & 2\\ 3 & -6 & 7 \end{matrix} \right]

Approach

Let a and b be real numbers. The row operation R_2 \to aR_2-bR_3 in a matrix means to replace each number in the second row with the difference of a times the corresponding number in second row and b times the corresponding number in the third row.

Solution

The row operation R_2 \to 3R_2-2R_3 means to replace each number in the second row with the difference of 3 times the corresponding number in second row and 2 times the corresponding number in the third row.

The matrix \left[ \begin{matrix} -5 & 9 & 4\\ 10 & -8 & 2\\ 3 & -6 & 7 \end{matrix} \right] becomes:\left[ \begin{matrix} -5 & 9 & 4\\ 3(10)-2(3) & 3(-8)-2(-6) & 3(2)-2(7)\\ 3 & -6 & 7 \end{matrix} \right]=\left[ \begin{matrix} -5 & 9 & 4\\ 24 & -12 & -8\\ 3 & -6 & 7 \end{matrix} \right]

Reflection

We could also do this one in two steps:

\displaystyle \left[ \begin{matrix} -5 & 9 & 4\\ 3(10) & 3(-8) & 3(2)\\ 3 & -6 & 7 \end{matrix} \right]\displaystyle =\displaystyle \left[ \begin{matrix} -5 & 9 & 4\\ 30 & -24 & 6\\ 3 & -6 & 7 \end{matrix} \right]R_2\to 3R_2
\displaystyle \left[ \begin{matrix} -5 & 9 & 4\\ 30-2(3) & -24-2(-6) & 6-2(7)\\ 3 & -6 & 7 \end{matrix} \right]\displaystyle =\displaystyle \left[ \begin{matrix} -5 & 9 & 4\\ 24 & -12 & -8\\ 3 & -6 & 7 \end{matrix} \right]R_2\to R_2 -2R_3

Example 3

The following matrix is in row-echelon form and represents a linear system in x, y and z:\left[ \begin{array}{ccc|c} 1 & 1 & -1 & 10\\ 0 & 1 & -1 & 7 \\ 0 & 0 & 1 & -5 \end{array} \right]

Solve for x, y and z.

Approach

We can solve a system represented by an augmented matrix by finding the reduced row-echelon form. To do this, we can use row operations to transform the coefficient matrix to an identity matrix.

Solution

The steps in solving the augmented matrix \left[ \begin{array}{ccc|c} 1 & 1 & -1 & 10\\ 0 & 1 & -1 & 7 \\ 0 & 0 & 1 & -5 \end{array} \right] are the following:

\displaystyle \text{Step 1:} \left[ \begin{array}{ccc|c} 1-0 & 1-1 & -1-(-1) & 10-7\\ 0 & 1 & -1 & 7 \\ 0 & 0 & 1 & -5 \end{array} \right]\displaystyle =\displaystyle \left[ \begin{array}{ccc|c} 1 & 0 & 0 & 3\\ 0 & 1 & -1 & 7 \\ 0 & 0 & 1 & -5 \end{array} \right]R_1 \to R_1-R_2
\displaystyle \text{Step 2: }\left[ \begin{array}{ccc|c} 1 & 0 & 0 & 3\\ 0+0 & 1+0 & -1+1 & 7+(-5) \\ 0 & 0 & 1 & -5 \end{array} \right]\displaystyle =\displaystyle \left[ \begin{array}{ccc|c} 1 & 0 & 0 & 3\\ 0 & 1 & 0 & 2 \\ 0 & 0 & 1 & -5 \end{array} \right]R_2 \to R_2+R_3

This gives us x=3,\,y=2 and z=-5.

Reflection

We can also solve this system by rewriting the augmented matrix as a system of equations and using back substitution to solve.

\begin{cases} x + y - z = 10 \\ y - z = 7 \\ z = -5 \end{cases}

The first solution is z=-5 from the third equation of the system of equations.

By substituting z=-5 into the second equation we get:

\displaystyle y-z\displaystyle =\displaystyle 7Second equation
\displaystyle y-(-5)\displaystyle =\displaystyle 7Substitute
\displaystyle y+5\displaystyle =\displaystyle 7Simplify
\displaystyle y\displaystyle =\displaystyle 2Subtract 5 from both sides

Finally, we can substitute z=-5 and y=2 into the first equation to find x:

\displaystyle x+y-z\displaystyle =\displaystyle 10Third equation
\displaystyle x+2-(-5)\displaystyle =\displaystyle 10Substitute
\displaystyle x+7\displaystyle =\displaystyle 10Simplify
\displaystyle x\displaystyle =\displaystyle 3Subtract 7 from both sides

This gives us the same solution, x=3, y=2, and z=-5

Outcomes

M1.N.M.A.3

Create and use augmented matrices to solve systems of linear equations in real-world contexts, by hand and using technology.*

M1.MP1

Make sense of problems and persevere in solving them.

M1.MP2

Reason abstractly and quantitatively.

M1.MP3

Construct viable arguments and critique the reasoning of others.

M1.MP4

Model with mathematics.

M1.MP5

Use appropriate tools strategically.

M1.MP6

Attend to precision.

M1.MP7

Look for and make use of structure.

M1.MP8

Look for and express regularity in repeated reasoning.

What is Mathspace

About Mathspace