A zero pivot: swap rows, or stop.
Elimination needs a nonzero number in each pivot position. When a zero shows up, either a row exchange fixes it, or the system has no single solution.
Think: a relay race
The runner for the second leg is missing. If another team member can run that leg, you swap the order and carry on. That is a row exchange: a temporary problem.
If nobody on the team can run it, the race is over. That is a singular system: a permanent problem.
Temporary: swap rows
Permanent: two ways to fail
- No solution: x − 2y = 1 and 2x − 4y = 11. Subtract 2 times the first: 0 = 9. Impossible. The lines are parallel.
- Infinitely many: x − 2y = 1 and 2x − 4y = 2. Subtract: 0 = 0. The second equation said nothing new. Both are the same line.
In both cases the second pivot is 0 and no row below can help. That happens exactly when the columns are dependent, so det A = 0. Lesson 1 called it squashing the plane onto a line.
Small pivots are risky too
A computer stores numbers with about 16 digits. Dividing by a tiny pivot, like 0.0000001, blows up rounding errors. So real solvers swap in the row whose pivot is largest in absolute value at every step. It is called partial pivoting, and NumPy does it for you.