topic badge

2.02 Systems of equations and row operations

Lesson

Concept summary

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

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 2

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

A2.N.M.A.3

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

A2.MP1

Make sense of problems and persevere in solving them.

A2.MP2

Reason abstractly and quantitatively.

A2.MP3

Construct viable arguments and critique the reasoning of others.

A2.MP4

Model with mathematics.

A2.MP5

Use appropriate tools strategically.

A2.MP6

Attend to precision.

A2.MP7

Look for and make use of structure.

A2.MP8

Look for and express regularity in repeated reasoning.

What is Mathspace

About Mathspace