# Matrices – Elementary Row Operations

Hi, and welcome to this video about **matrix** manipulation! In this video, we’re going to look at:

- Elementary Row Operations
- Row Echelon Form of a Matrix
- Reduced Row Echelon Form of a Matrix
- and Finding the Inverse of a Matrix

Matrices of any dimension can be manipulated using three **elementary row operations**:

- Any two rows can be swapped.
- Any row can be multiplied by a non-zero scalar.
- A multiple of a row can be added to another row.

The process of using row operations on a matrix is referred to as **row reduction**.

The ultimate goal of row reduction is to end up with an upper triangular matrix – a matrix with all zero entries below the main diagonal. When this is achieved, the matrix is said to be in **row echelon form**. Specifically, to be in row echelon form:

- Rows with all zero entries must be at the bottom of the matrix
- The first non-zero element of a row must be to the right of the first non-zero element in the row above.

Let’s see some row reduction in action! Keep in mind that the series of row operations is not unique. Also, the row echelon form of a matrix is not unique. Different people might use different series of operations to end up with different row echelon forms of the same matrix. Here’s matrix *X*:

My first operation will be to use the 2 to turn the 4 below it into a 0. I want to subtract 2 times row 1 from row 2 and replace row 2. In shorthand, this looks like R2 minus 2R1 equals R2. Now I want to use the 2 again to turn the 3 in the bottom left into a 0. To make this easier, I’ll use two steps: 2R3 equals R3 and then R3 minus 3R1 equals R3. Now there’s only one more move to get this matrix to row echelon form. I need to use the 1 to make the negative 9 in row three into a 0. So R3 plus 9R2 equals R3.

This is one version of X in row echelon form. Another version might look like this

if we had decided, for example, to divide row 3 by row 2.

As you can see, we ended with an upper triangular matrix. The first nonzero entry in each row is to the right of the nonzero entry in the row above. In other words, the 1 is to the right of the 2 and the negative 78 is to the right of the 1.

We could go further and get X into **reduced row echelon form**. Reduced row echelon form can be obtained using different sequences of row operations, but this form is unique. A matrix has only one reduced row echelon form. In order to be in reduced row echelon form, a matrix must meet these conditions:

- Be in row echelon form.
- The leading entry in each nonzero row must be a 1.
- Wherever there is a leading 1, the entries in the rest of the column must be zeros.

Let’s pick up with X where we left off:

First, I need to turn that 2 into a 1; one half R1 equals R1. The first column looks good. Now to column 2. I need to use the 1 to turn the three halves above it into a 0; R1 minus three halves R2 equals R1. Now columns 1 and 2 look good. Time to turn that negative 78 into a 1; negative 1 over 78 R3 is equal to R3. Row 3 looks good. All that’s left is to use row 3 to change the 16 and negative 9 to zeroes; negative 16R3 plus R1 equals R1 and R2 plus 9R3 equals R2.

In this case, the reduced row echelon form of the matrix is \(I^{3}\). With square matrices, this will happen frequently, but it doesn’t need to happen. These matrices are in reduced row echelon form as well:

Some matrices have inverse matrices, denoted by the superscript -1. Inverse matrices satisfy the equation AA inverse equals A inverse A equals I. \(AA^{-1}=A^{-1}A=I\).

For instance, here we have matrix B and the inverse of matrix B.

Let’s try B times B inverse. To do this we do 4 times 4 is 16, plus 3 times negative 5 is negative 15. For our next element we’ll do 4 times negative 3 is negative 12, plus 3 times 4 is 12. Here we’re going to do 5 times 4 is 20, plus 4 times negative 5 is negative 20. Then we’ll do 5 times negative 3 is negative 15, plus 4 times 4 is 16. If we simplify this, we get 16 plus negative 15 is 1, negative 12 plus 12 is 0, 20 plus negative 20 is 0, and negative 15 plus 16 is 1.

This is our identity matrix for a 2 by 2 matrix. If you go ahead and multiply B inverse times B, you’ll get the same thing.

and

In order for a matrix to have an inverse, or to be **invertible**, two conditions must be met:

- The matrix must be a square matrix
- The determinant of the matrix must not be 0.

Let’s work with a 3 by 3 matrix Y:

Is Y a square matrix? Check!

Is the determinant of Y not equal to 0? Let’s see…

The determinant of Y is equal to 2 times, 4 times negative 1 is negative 4, minus 1 times 0 is 0, so negative 4 minus 3, times negative 4 times negative 1 is 4, minus 1 times 3 is 3, so 4 minus 3 is 1, plus negative 2, times negative 4 times 0 is 0, minus 4 times 3 is 12 – gives you negative 12. So the determinant of y is equal to negative 8 minus 3, plus 24, which is equal to 13.

\(det(Y) =2(-4)-3(1)±2(-12)=-8-3+24=13\)Yes, the determinant of Y does not equal 0. So now let’s figure out what the inverse of Y is.

Here are the two steps to finding the inverse of a matrix:

- Augment the matrix with the identity matrix of the appropriate size
- Row reduce the augmented matrix. When it is in reduced row echelon form, the structure will be I augment Y inverse [I|Y-1] and the inverse can be identified.

Y augment I looks like this: [Y|I]

Here’s what that process looks like. First, let’s turn the 2 into a 1; one half R1 equals R1. Next, let’s get zeroes below the 1 in column 1; R2 plus 4R1 equals R2 and R3 minus 3R1 equals R3. Now we need to make the 10 in column 2 into a 1; one tenth R2 equals R2. The rest of the entries in column 2 need to be 0; so R1 minus three halves R2 equals R1 and R3 plus nine halves R2 equals R3. Now the 13 over 20 in column 3 needs to change to 1; 20 over 13R3 equals R3. Lastly, the 2 remaining entries in column 3 need to be 0; R1 plus 11 over 20 R3 equals R1 and R2 plus three tenths R3 equals R2.

Now we have an augmented matrix in the form \([I|Y^{-1}\)].

Thanks for watching, and happy studying!

## Practice Questions

**Question #1:**

Matrix X is given.

\(X=\begin{bmatrix}

1 & 2 & 1\\

5 & 3 &0 \\

9 & 8 & 4

\end{bmatrix}

\)

Which step would change the 5 in row two into a zero?

**Answer:**

We can use the values in the matrices in place of the Rs the same way we substitute variables to see which one would result in \(5\) changing to \(0\). We can see when substituting the values in the equation \(R_2-5R_1=R_2\), we get the following \(5-5(1)=0\), therefore, \(R_2-5R_1=R_2\) would change the \(5\) to a \(0\).

**Question #2:**

Which matrix is in row echelon form?

2 & 6 & -9\\

0 & 5 & 7\\

0 & 0 & 18

\end{bmatrix}

\)

1 & 0 & 0\\

7& 9 & 0\\

4 & -3 & -1

\end{bmatrix}

\)

0 & 0 & 0\\

0 & -1 & 20\\

-4 &5 & 6

\end{bmatrix}

\)

6 & 4 & 2\\

9 & -8 & 0\\

0 & 0 & 0

\end{bmatrix}

\)

**Answer:**

For a matrix to be in row echelon form, it must have all zero entries below the main diagonal line. The values \(2\), \(5\), and \(18\) make up the diagonal line of the matrix in choice A and the entries below this line are zeros.

**Question #3:**

Which matrix is in reduced row echelon form?

0 & 1 & 1\\

0 & 1 & 0\\

1 & 1 & 0

\end{bmatrix}

\)

1 & 1 & 1\\

0 & 0 & 0\\

0 & 1 & 0

\end{bmatrix}

\)

1 & 0 & 0\\

0 & 1 &0 \\

0 & 0 & 1

\end{bmatrix}

\)

1 & 0 & 0\\

0 & 0 & 1\\

1 & 0 & 1

\end{bmatrix}

\)

**Answer:**

The definition of a matrix in reduced row echelon form is that it must be in row echelon form, the leading entry for each row that is nonzero must be a one, and where there is a leading one, the remaining entries must be zeros. Therefore, the only matrix that meets these conditions is \(\begin{bmatrix}

1 & 0 & 0\\

0 & 1 &0 \\

0 & 0 & 1

\end{bmatrix}

\).

**Question #4:**

Which is a true statement about a matrix and its inverse?

**Answer:**

The relationship between a matrix and its inverse states that if the matrix is multiplied by its inverse and vice versa, the resulting matrix is the identity matrix, which is what this statement \((A\times A^{-1}=A^{-1}\times A=I)\) is saying.

**Question #5:**

Which statement is true about a matrix that is invertible?

A matrix is invertible if it is a square matrix, and its determinant is zero.

A matrix is invertible if it is a square matrix, and its determinant is not a zero.

A matrix is invertible if it is not a square matrix, and its determinant is zero.

A matrix is invertible if it is not a square matrix, and its determinant is not a zero.

**Answer:**

A matrix is invertible if it is a square matrix, and its determinant is not a zero.

For a matrix to be invertible it must meet two conditions: the matrix must be a square matrix, and the determinant cannot be a zero.