# Elementary matrix operations

In mathematics, an **elementary matrix** is a matrix which differs from the identity matrix by one single elementary row operation (or column operation). Left multiplication (pre-multiplication) by an elementary matrix represents **elementary row operations**, while right multiplication (post-multiplication) represents **elementary column operations**.

Elementary matrix operations play an important role in many matrix algebra applications, such as finding the inverse of a matrix, in Gaussian elimination to reduce a matrix to row echelon form and solving simultaneous linear equations.

- Interchange two rows (or columns);
- Multiply each element in a row (or column) by a non-zero number.;
- Multiply a row (or column) by a non-zero number and add the result to another row (or column).

## Elementary operations:

## Elementary operations notation:

Compact notation to describe elementary operations:

Operation description | Notation | |

Rowoperations | 1. Interchange rows i and j | R_{i} ↔ R_{j} |

2. Multiply row i by s, where s ≠ 0 | sR_{i} → R_{i} | |

3. Add s times row i to row j | sR_{i} + R_{j} → R_{j} | |

Columnoperations | 1. Interchange columns i and j | C_{i} ↔ C_{j} |

2. Multiply column i by s, where s ≠ 0 | sC_{i} → C_{i} | |

3. Add s times columns i to columns j | sC_{i} + C_{j} → C_{j} |

## Elementary operators

Each type of elementary operation may be performed by matrix multiplication, using square matrices called**elementary operators**.

## Elementary row operations

**A**, an n×m matrix, take the following steps:

- To find
**E**, the elementary row operator, apply the operation to an n×n identity matrix. - To carry out the elementary row operation, premultiply
**A**by**E**.

Illustrate this process for each of the three types of elementary row operations.

### Interchange two rows

Suppose we want to interchange the first and second rows of **A**, a 3×2 matrix. To create the elementary row operator **E**, we interchange the first and second rows of the identity matrix **I _{3}**:

⇒ | ||

I_{3} | E |

Then, to interchange the first and second rows of **A**, we premultiply **A** by **E** (R_{1} ↔ R_{2}):

= | = | ||||

E | A | B |

### Multiply a row by a number

Suppose we want to multiply each element in the third row of Matrix **A** by 3. Assume **A** is a 3×2 matrix. To create the elementary row operator **E**, we multiply each element in the third row of the identity matrix **I _{3}** by 3:

⇒ | ||

I_{3} | E |

Then, to multiply each element in the third row of **A** by 3, we premultiply **A** by **E** (3 R_{3} → R_{3}):

= | = | ||||

E | A | B |

### N.B. Divide a row by a number

If we want to divide each element in some row of matrix by number n we must multiply each element of this row by

### Multiply a row and add it to another row

Assume **A** is a 3×2 matrix. Suppose we want to multiply each element in the first row of A by 4; and we want to add that result to the second row of **A**. For this operation, creating the elementary row operator is a two-step process. First, we multiply each element in the first row of the identity matrix **I _{2}** by 4. Next, we add the result of that multiplication to the second row of

**I**to produce

_{2}**E**:

⇒ | = | |||

I_{2} | E |

Then, to multiply each element in the first row of **A** by 4 and add that result to the second row, we premultiply **A** by **E** (
4 R_{1} + R_{2} → R_{2}):

= | = | ||||

E | A | B |

## Elementary column operations

To perform an elementary column operation on a**A**, an n×m matrix, take the following steps:

- To find
**E**, the elementary column operator, apply the operation to an m×m identity matrix. - To carry out the elementary column operation, postmultiply
**A**by**E**.

## Examples of elementary matrix operations

A = | 4 | 2 | 0 | ||

1 | 3 | 2 | |||

-1 | 3 | 10 |

**Solution:**

R_{1} ↔ R_{2} (interchange the first and second rows)

4 | 2 | 0 | ~ | 1 | 3 | 2 | ~ | ||||

1 | 3 | 2 | 4 | 2 | 0 | ||||||

-1 | 3 | 10 | -1 | 3 | 10 |

-4 R_{1} + R_{2} → R_{2} (multiply 1 row by -4 and add it to 2 row); R_{1} + R_{3} → R_{3} (1 row add to 3 row)

~ | 1 | 3 | 2 | ~ | 1 | 3 | 2 | ~ | ||||

4 + (-4)·1 | 2 + (-4)·3 | 0 + (-4)·2 | 0 | -10 | -8 | |||||||

-1 + 1 | 3 + 3 | 10 + 2 | 0 | 6 | 12 |

R_{2} / (-2) → R_{2} (divide 2 row by -2); R_{3} / 6 → R_{3} (divide 3 row by 6)

~ | 1 | 3 | 2 | ~ | 1 | 3 | 2 | ~ | ||||

0 | -10/(-2) | -8/(-2) | 0 | 5 | 4 | |||||||

0 | 6/6 | 12/6 | 0 | 1 | 2 |

R_{2} ↔ R_{3} (interchange the 2 row and 3 row)

~ | 1 | 3 | 2 | ~ | ||

0 | 1 | 2 | ||||

0 | 5 | 4 |

-5 R_{2} + R_{3} → R_{3} (multiply 2 row by -5 and add it to 3 row);

~ | 1 | 3 | 2 | ~ | 1 | 3 | 2 | ||||

0 | 1 | 2 | 0 | 1 | 2 | ||||||

0 | 5 + (-5)·1 | 4 + (-5)·2 | 0 | 0 | -6 |

*Add the comment*