Banded Gaussian elimination (source code)

= Banded Gaussian elimination

For a <band matrix>, elimination without pivoting retains bounded lower and upper bandwidths in its triangular factors. A tridiagonal system therefore needs only linear work and storage, as in the <Thomas algorithm>. Pivoting can change the precise fill pattern and must be included in the bandwidth and cost analysis when required. The inverse need not be banded, so solving through the factors preserves sparsity that explicit inversion would lose.