In
numerical analysis, a
sparse matrix is a
matrix in which most of the elements are zero. By contrast, if most of the elements are nonzero, then the matrix is considered
dense. The fraction of non-zero elements over the total number of elements (i.e., that can fit into the matrix, say a matrix of dimension of m x n can accommodate m x n total number of elements) in a matrix is called the
sparsity (
density).