### Row
Echelon Form

##### 2. Shape of row echelon form

To understand the definition of row echelon form in more detail, we introduce some terminologies.

The leading entry of a row is the first nonzero entry counted from left.
The leading entries are denoted by * in the example above. Moreover, the leading
entries in the matrix

[ |
1 |
0 |
-1 |
0 |
] |

0 |
0 |
3 |
-3 |

0 |
2 |
0 |
0 |

are 1, 3, 2, and the matrix has the shape.

[ |
* |
# |
# |
# |
] |

0 |
0 |
* |
# |

0 |
* |
# |
# |

The length of a nonzero row is the number of entries on the right of (and including) the leading entry.
For example, the lengths of the three rows in the matrix above are 4, 2, and 3.
The zero row (in which all entries are zero) has no leading entry and had length 0.

Example Suppose a matrix has the following shape,

[ |
* |
# |
# |
# |
] |

0 |
* |
# |
# |

0 |
* |
# |
# |

in which [row 2] and [row 3] have the same length. Denote the leading entries of the two rows
by `a` and `b` (which are nonzero, by the definition of leading entries).

[ |
* |
# |
# |
# |
] |

0 |
`a` |
# |
# |

0 |
`b` |
# |
# |

Then the operation (-`b`/`a`)[row 2] + [row 3] gives us

[ |
* |
# |
# |
# |
] |

0 |
* |
# |
# |

0 |
0 |
# |
# |

which has simpler shape because [row 3] has shorter length.

The example shows that if a matrix has the simplest shape,
then any two *nonzero* rows must have different lengths.
Thus the two properties in the definition of row echelon forms mean that,
going from the top to the bottom, the lengths of the rows are *strictly* decreasing
and then followed by the zero rows. Such a shape must be an *upside down staircase*.

Example The following are some shapes of row echelon forms.

[ |
* |
# |
# |
# |
# |
] |

0 |
0 |
* |
# |
# |

0 |
0 |
0 |
* |
# |

[ |
* |
# |
# |
# |
] |

0 |
0 |
* |
# |

0 |
0 |
0 |
0 |

[ |
* |
# |
# |
# |
] |

0 |
0 |
* |
# |

0 |
0 |
0 |
0 |

0 |
0 |
0 |
0 |

[ |
0 |
* |
# |
# |
# |
# |
# |
# |
] |

0 |
0 |
* |
# |
# |
# |
# |
# |

0 |
0 |
0 |
0 |
* |
# |
# |
# |

0 |
0 |
0 |
0 |
0 |
0 |
* |
# |

The length sequences are (5, 3, 2), (4, 2, 0), (4, 2, 0, 0), (7, 6, 4, 2).
All of these are strictly decreasing sequences followed by zeros.
The following matrices are more concrete examples of row echelon forms.

[ |
1 |
3 |
2 |
0 |
1 |
0 |
] |

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

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

0 |
0 |
0 |
0 |
0 |
1 |

Note that the one row matrices and the zero matrices are row echelon forms.