Matrix Row Switching

Read · 1 min

Row Switching

Row switching is probably the simplest row operation. All you do is take one row and switch it with a second row. It is denoted with Ri⟷RjR_i\longleftrightarrow R_j which just means switch the ithi^{th} row with the jthj^{th} row.

Example

Let A=[abcdefghi]A=\begin{bmatrix}\color{blue}{a}&\color{blue}{b}&\color{blue}{c}\\d&e&f\\\color{red}g&\color{red}h&\color{red}i\end{bmatrix}

Now say we want to apply the row operation: R1⟷R3R_1\longleftrightarrow R_3

The matrix now becomes: [ghidefabc]\begin{bmatrix}\color{red}{g}&\color{red}{h}&\color{red}{i}\\d&e&f\\\color{blue}{a}&\color{blue}{b}&\color{blue}{c}\end{bmatrix}

Illustrated · 1 min

Row Switching

One of the most common types of matrix elementary row operations is called row switching. Here, we basically switch two rows in a matrix. This is the first of the matrix basic operations.

Let's look at the following elementary matrix:

Matrix Row Operations: Row Switching
R_1 --> R_2
We can switch the rows in the matrix!

Image source: by Anusha Rahman

Example

If we wanted to apply the row switching technique to the following matrix,

[246357]\begin{bmatrix} 2&4&6 \\ 3&5&7 \\ \end{bmatrix}

We could say that R1→R2R_1 \rightarrow R_2:

[357246]\begin{bmatrix} 3&5&7 \\ 2&4&6 \\ \end{bmatrix}

We switched the first and second rows in the matrix!

The Tricky Part

The tricky part of matrix row switch comes up most commonly with the identity matrix. When you're dealing with these, you want to make sure you keep track of the elements in a row.

Looking Further

In the next few lessons, we will cover other types of matrix operations, such as matrix row multiplication and matrix row addition. With multiplication, you are multiplying a row by a number, and with addition, you are adding values.

You may use these matrix row operations with advanced linear systems, so take the time to get these foundations right!

Video

(Video) Matrix Row Operations: Matrix Row Switching

by Anusha Rahman

In this video, Anusha Rahman goes over what matrix row switching is and walks you through an example.

Summary

Matrix row switching allows us to switch rows within a matrix.

If given Matrix AA, [123456789]\begin{bmatrix} 1&2&3 \\ 4&5&6 \\ 7&8&9 \\ \end{bmatrix}, we may want to switch rows 11 and 33, R1→R3R_1 \rightarrow R_3. To do that, we will literally swap the first and third rows of Matrix AA. That means our new matrix looks like,

[789456123]\begin{bmatrix} 7&8&9 \\ 4&5&6 \\ 1&2&3 \\ \end{bmatrix}

Type a concept, like “slope” or “photosynthesis”.

↑ ↓ to choose · Enter to openSearch explanations and problems