A matrix is in **row echelon form**, or **REF**, if it has all of the following three properties: - The [[zero rows]] of the matrix (if any) are all at the bottom of the matrix. - In every non-zero row of the matrix, the [[leading entry]] is $1$. - If row $i$ and row $(i+1)$ are both non-zero, then the leading entry in row $(i+1)$ is to the right of the leading entry in row $i$.
In other words, as you go down the rows, the leading entries must go to the right. For example, $\left[\begin{smallmatrix} 1&2&3&4&5\\0&1&2&3&4\\0&0&1&2&3\end{smallmatrix}\right]$ and $\left[\begin{smallmatrix} 1&2&3&4&5\\0&1&2&3&4\\0&0&1&2&3\\0&0&0&0&0\end{smallmatrix}\right]$ are both in REF, but - $\left[\begin{smallmatrix} 1&2&3&4&5\\0&0&0&0&0\\0&0&1&2&3\end{smallmatrix}\right]$ and $\left[\begin{smallmatrix} 1&2&3&4&5\\0&0&0&0&0\\0&0&1&2&3\\0&0&0&0&0\end{smallmatrix}\right]$ are not in REF, since they each have a zero row which isn't at the bottom; - $\left[\begin{smallmatrix} 1&2&3&4&5\\0&2&3&4&1\\0&0&1&2&3\end{smallmatrix}\right]$ is not in REF, since the leading entry on the second row isn't $1$; - $\left[\begin{smallmatrix} 0&1&2&3&4\\1&2&3&4&5\\0&0&1&2&3\end{smallmatrix}\right]$ is not in REF, since the leading entry in row $2$ is not to the right of the leading entry in row $1$.