A matrix is sparse if most of its elements are 0. To define a
sparse matrix, it is enough to define the non-zero elements, which can
be done with a table. The matrix command can then turn the
table into a matrix.
Input:
or:
Output:
This table can be converted to a matrix with either the
convert command or the matrix command.
Input:
or:
Output: