Sparse matrices and LU factorisation
A matrix is said to be sparse if most entries are zero.
By contrast, a matrix with most entries non-zero is called dense.
A square matrix $A$ is a band matrix with bandwidth $2r+1$
if $a_{ij} = 0$ for $|i-j|>r$.
Proposition (LU factorisation preserves leading zeros)
open_in_new
Let $A=LU$ be the LU factorisation
of a sparse matrix $A$. Then
Proof
-
If $A$ is a band matrix, then $L$ and $U$ are also band matrices with the same bandwidth as $A$.
-
Sometimes if $A$ is sparse, we can try reordering its rows and columns to
have more leading zeros, thus reducing the fill-in in $L$ and $U$.
The LU algorithm
takes $O(nr^2)$ operations to factorise for a banded $A$ with bandwidth $r$.
And to solve a linear system after factorisation, it takes $O(nr)$ operations.