Main content

### Course: Algebra (all content) > Unit 20

Lesson 3: Elementary matrix row operations# Matrix row operations

Learn how to perform the matrix elementary row operations. These operations will allow us to solve complicated linear systems with (relatively) little hassle!

## Matrix row operations

The following table summarizes the three elementary

**matrix row operations**.Matrix row operation | Example |
---|---|

Switch any two rows | |

Multiply a row by a nonzero constant | |

Add one row to another |

Matrix row operations can be used to solve systems of equations, but before we look at why, let's practice these skills.

## Switch any two rows

### Example

Perform the row operation ${R}_{1}\leftrightarrow {R}_{2}$ on the following matrix.

### Solution

So the matrix $\left[\begin{array}{rrr}{4}& {8}& {3}\\ {2}& {4}& {5}\\ 7& 1& 2\end{array}\right]$ becomes $\left[\begin{array}{rrr}{2}& {4}& {5}\\ {4}& {8}& {3}\\ 7& 1& 2\end{array}\right]$ .

Sometimes you will see the following notation used to indicate this change.

Notice how row $1$ replaces row $2$ and row $2$ replaces row $1$ . The third row is not changed.

## Multiply a row by a nonzero constant

### Example

Perform the row operation $3{R}_{2}\to {R}_{2}$ on the following matrix.

### Solution

To indicate this matrix row operation, we often see the following:

Notice here three times the second row replaces the second row. The other rows remain the same.

## Add one row to another

### Example

Perform the row operation ${R}_{1}+{R}_{2}\to {R}_{2}$ on the following matrix.

### Solution

To indicate this matrix row operation, we can write the following:

Notice how the sum of row $1$ and $2$ replaces row $2$ . The other row remains the same.

## Systems of equations and matrix row operations

Recall that in an augmented matrix, each row represents one equation in the system and each column represents a variable or the constant terms.

For example, the system on the left corresponds to the augmented matrix on the right.

System | Matrix |
---|---|

When working with augmented matrices, we can perform any of the

**matrix row operations**to create a new augmented matrix that produces an equivalent system of equations. Let's take a look at why.### Switching any two rows

Equivalent Systems | Augmented matrix |
---|---|

The two systems in the above table are equivalent, because the order of the equations doesn't matter. This means that when using an augmented matrix to solve a system, we can

**interchange any two rows**.### Multiply a row by a nonzero constant

We can multiply both sides of an equation by the same nonzero constant to obtain an equivalent equation.

In solving systems of equations, we often do this to eliminate a variable. Because the two equations are equivalent, we see that the two systems are also equivalent.

Equivalent Systems | Augmented matrix |
---|---|

This means that when using an augmented matrix to solve a system, we can

**multiply any row by a nonzero constant**.### Add one row to another

We know that we can add two equal quantities to both sides of an equation to obtain an equivalent equation.

So if $A=B$ and $C=D$ , then $A+C=B+D$ .

We do this often when solving systems of equations. For example, in this system $\begin{array}{rl}-2x-6y& =-10\\ 2x+5y& =6\end{array}$ ,
we can add the equations to obtain $-y=-4$ .

Pairing this new equation with either original equation creates an equivalent system of equations.

Equivalent Systems | Augmented matrix |
---|---|

So when using an augmented matrix to solve a system, we can

**add one row to another**.Notice that the original matrix corresponds to $\begin{array}{rl}2x+2y& =10\\ -2x-3y& =3\end{array}$ , while the final matrix corresponds to $\begin{array}{rl}x& =18\\ y& =-13\end{array}$ which simply gives the solution.

The system was solved entirely by using augmented matrices and row operations!

## Want to join the conversation?

- how did 5 - 13 ended up being 18 on the last challenge?

statement says "R1 - R2 -> R1"

Maybe a typo?(0 votes)- R1,3 is 5, while R2,3 is -13. When we subtract R1,3-R2,3, we get 5-(-13)=5+13=18. You had 13 mixed up with -13.(21 votes)

- Is there any way possible to know which operation is best to perform on the matrix first, besides using intuition?(22 votes)
- Usually with matrices you want to get 1s along the diagonal, so the usual method is to make the upper left most entry 1 by dividing that row by whatever that upper left entry is. So say the first row is 3 7 5 1. you would divide the whole row by 3 and it would become 1 7/3 5/3 1/3. From there you use the first row to make the first column have all 0s under that 1. Then repeat this going along the diagonal.(20 votes)

- If you want to apply the same priciples to columns do you us C1 or C2 instead of R1 or R2 or is there some other letter that you should use?(2 votes)
- Technically, yes. On paper you can perform column operations.

However, it nullifies the validity of the equations represented in the matrix. In other words, it breaks the equality. Say we have a matrix to represent:

3x + 3y = 15

2x + 2y = 10, where x = 2 and y = 3

Performing the operation 2R1 --> R1 (replace row 1 with 2 times row 1) gives us

4x + 4y+ = 20 = 4x2 + 4x3 = 20, which works

But if we did 2C2 --> C2 (replace Column 2 with 2 times column 2), we get

3x + 6y = 15 = 3x2 + 6x3 = 15 = 6 + 18 = 15

2x + 4y = 10 = 2x2 + 4x3 = 10 = 4 + 12 = 10

Ridiculous, ain't it? I was wondering the same thing before I saw you question. It's the same reason you can't operate on one side of an equation without doing the same to the other (after all, it's called an EQUAtion; it has to be EQUAL!) Hope this helped :)(12 votes)

- this is so trippy(6 votes)
- Step #1 of the last question appears to have the row operation labeled incorrectly.

Shouldn't it be R1 + R2 --> R2 ??(4 votes)- Yes, and you're supposed to drag the row operations up/down, so that they match what is done in each step.(4 votes)

- What's a non zero constant?(1 vote)
- Any number that is not zero is a non-zero constant.

A variable is not a constant as it is an unknown number.(8 votes)

- Why is it not legitimate to multiply a row with zero?(2 votes)
- Um, remember the multiplication property of 0? What happens when you multiply by 0? Everything becomes 0, so you lose any informaiton given in the original problem.(5 votes)

- So is the point of this just to solve for x and y at the same time? It seems a little unnecessary to me, since we already know how to solve systems of equations, and just about as quickly, without learning how to read matrices. It just seems like we don't need this . . .(3 votes)
- Matrix stuff does get its own uses, this is more like an intro to them to then later use in linear algebra and calculus. Among other places.(3 votes)

- Can one also use any of these row operations to add in a new row? This could prove useful in operations where the matrices need to have the same dimensions.(3 votes)
- No, row operations can only manipulate existing rows.(3 votes)

- Is there only one correct method of using row

operations on a specific matrix to solve a system of equations?(3 votes)- As long as you make as many columns that only have a 1 in them it doesn't really matter how you solve it. Making them a diagonal is just mostly used since it's systematic and is easy to keep track of since the answers are all the way on the right, so starting at the left makes it so you can go column by column.(2 votes)