BUILT-IN WOLFRAM LANGUAGE SYMBOL
gives True if expr is a list of lists or a two-dimensional SparseArray object that can represent a matrix, and gives False otherwise.
gives True only if test yields True when applied to each of the matrix elements in expr.
- MatrixQ[expr] gives True only if expr is a list and each of its elements is a list of the same length, containing no elements that are themselves lists, or if expr is a two-dimensional SparseArray object.
- MatrixQ[expr,NumberQ] tests whether expr is a numerical matrix.
Test of whether an object is a matrix:
These are not matrices:
Use tests to generalize and specialize:
Introduced in 1988
| Updated in 2003