Numerical Linear Algebra: Direct Methods

partial pivoting

Plain Gaussian elimination has a fragile spot: at each step it divides by the current diagonal entry, the pivot. If that pivot happens to be zero the method simply breaks, and if it is merely tiny the method survives but amplifies round-off into garbage. Partial pivoting is the cheap, standard fix: before clearing each column, look down the column and swap rows so the LARGEST-magnitude available entry sits in the pivot position.

Step by step, when you are about to eliminate column k, you scan entries a_kk, a_{k+1,k}, ..., a_nk, find the one with the biggest absolute value, and swap its row up into row k. Now the pivot is the largest available, so every multiplier m_ik = a_ik / a_kk has magnitude at most 1 — you never multiply a row by a huge factor, which is what kept error growth under control. Recording these row swaps as a permutation matrix P, the factorization becomes P A = L U instead of A = L U. The extra cost is just O(n^2) comparisons over the whole elimination, negligible against the n^3 of the arithmetic.

Partial pivoting is what makes Gaussian elimination usable in floating point: it is the default in essentially every dense solver, including LAPACK. With it, the multipliers are bounded and the method is backward stable in practice for the matrices that arise in applications. The honest caveat is that it is not a theoretical guarantee — there exist contrived matrices where the growth factor still blows up exponentially with partial pivoting — but such matrices essentially never appear in real problems, so partial pivoting is trusted as the workhorse, with complete pivoting reserved for the rare paranoid case.

For the matrix with rows (0, 1) and (1, 1) the pivot a_11 = 0 breaks plain elimination; partial pivoting swaps the rows to get rows (1, 1) and (0, 1), pivot 1, and elimination proceeds cleanly.

A row swap turns an impossible zero pivot into a healthy one — and bounds every multiplier by 1.

Partial pivoting bounds the multipliers but not the growth factor in the worst case; it is stable in practice because pathological growth essentially never occurs for real-world matrices. It is a row operation only — columns are not reordered.

Also called
partial pivoting (row pivoting)部分選主元列樞紐選擇