Sparse Arrays

The Wolfram Language has special sparse-array technology for efficiently handling arrays with literally astronomical numbers of elements when only a small fraction of the elements are nonzero. The Wolfram Language's linear algebra and all standard list operations can be done in symbolic form on (RefLink[SparseArray, paclet:ref/SparseArray]) objects, in which nonzero elements are specified by giving rules—potentially including patterns—for the values of elements at particular positions.

(RefLink[SparseArray, paclet:ref/SparseArray]) — create a sparse array of any rank from a list of rules or a dense array

(RefLink[Normal, paclet:ref/Normal]) — convert a sparse array to a dense array of explicit lists

(RefLink[ArrayRules, paclet:ref/ArrayRules]) — find position->value rules for elements in a sparse array

(RefLink[CoefficientArrays, paclet:ref/CoefficientArrays]) — convert symbolic equations to sparse arrays

(RefLink[ArrayPlot, paclet:ref/ArrayPlot]) — visualize a 2D sparse array using grayscales or other color maps

(RefLink[MatrixPlot, paclet:ref/MatrixPlot]) — visualize a sparse matrix with color, ticks, etc.

(RefLink[GraphPlot, paclet:ref/GraphPlot]) — take a sparse array as the adjacency matrix for a graph

Sparse Linear Algebra

Import/Export Formats