A banded matrix has its non-zero elements within a `band' about the diagonal. The bandwidth of a matrix A is defined as the maximum of |i-j| for which aij is nonzero. The upper bandwidth is the maximum j-i for which aij is nonzero and ji. See diagonal, tridiagonal and triangular matrices as particular cases.