Row reduction
An algorithm for solving linear systems using elementary row operations.
Phase 1. Towards row echelon form.
- Write an augmented matrix \(M\) for the system.
- Move all zero rows to the bottom.
- For each row \(R\), from top to bottom:
- Scale \(R\) so that its leading entry is 1.
- For each row \(R'\) below \(R\):
- Replace \(R'\) so that the column below the leading one in \(R\) is 0.
Phase 2. Towards reduced row echelon form.
- Is the last column is a pivot column?
- If so, abort execution, for the system is inconsistent.
- For each row \(R\), bottom to top:
- For each row \(R'\) above \(R\):
- Replace \(R'\) so that the column above the leading one in \(R\) is 0.
- For each row \(R'\) above \(R\):