8: Sparse Matrices
( \newcommand{\kernel}{\mathrm{null}\,}\)
A sparse matrix is a matrix in which most of the entries are zero. Such matrices are very commonly encountered in finite-difference equations. For example, when we discretized the 1D Schrödinger wave equation with Dirichlet boundary conditions, we saw that the Hamiltonian matrix had the tridiagonal form
H=−12h2[−211−2⋱⋱⋱11−2]+[V0V1⋱VN−1].
Hence, if there are N diagonalization points, the Hamiltonian matrix has a total of N2 entries, but only O(N) of these entries are non-zero.