Pivoting refers to rearranging the order of equations to avoid division by zero.
- Partial pivoting – moving rows so the largest coefficients are in the pivot (diagonal) positions
- Full pivoting – moving both rows and columns (not common, complicated to implement)
Partial pivoting would interchange row 1 with row that has the largest coefficient value, then row 2, then row 3 to get:
Remember to pivot but not !
Partial pivoting helps avoid division by zero problems and round-off errors caused by small but non-zero pivot element values. Note that round‐off errors can be cumulative in Gaussian elimination since each result depends on previous results (error accumulates). This is an important issue for large numbers of equations.