There are three types of elementary row operations, each used in different situations.
Multiply a row by a non-zero constant

Notation: Ri ← cRi. Replace row i by c times itself (c ≠ 0).

This one is useful if you want to obtain a leading 1 in row i; you just multiply the row by the reciprocal of the original leading entry. Here's an example; click the button to see the effect of applying this operation.

  • To exchange a row with one below it whose leading entry is further to the left, for example:
Exchange two rows

Notation: Ri ↔ Rj. Exchange rows i and j.

Exchanging rows is useful in two situations.

  • To move a row of zeroes to the bottom of the matrix, for example:

 

Subtract a multiple of one row from another.

Notation: Ri ← Ri - kRj. Replace row i by itself minus k times row j (j ≠ i).

This is the row operation that allows you to get zeroes above or below a leading 1. If a row contains a k in the column containing the leading 1, replace that row by itself minus k times the row with the leading 1. For example:

 

A warning: The k in the row operation Ri ← Ri - kRj can be negative, of course, so you can just as well add a multiple of one row to another. But notice that the operation is

Replace a row by itself plus or minus a multiple of another row,

i.e.

Ri1Ri - kRj.

Variations such as Ri ← kRj - Ri are NOT elementary row operations (they are combinations of elementary row operations). The distinction is not important for ordinary row reduction, but if you use row operations to evaluate determinants, for example, the distinction is very important.

The end goal of the row reduction algorithm is a matrix in a special form.

A matrix is in reduced row-echelon form when

  • any rows of all zeroes (called zero rows) are at the bottom
  • the leading entry in any other row is a 1 (called a leading 1, or pivot 1)
  • each leading 1 is further to the right than any leading 1's above it
  • any column with a leading 1 has zeroes in the rest of that column.
Here's an example.
How could you decompose the row operation Ri ← kRj - Ri into a sequence of elementary row operations?
How to Row Reduce a Matrix