This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.

MatrixQ

 MatrixQ[expr]gives True if expr is a list of lists or a two-dimensional SparseArray object that can represent a matrix, and gives False otherwise. MatrixQgives 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.
Test of whether an object is a matrix:
These are not matrices:
Use tests to generalize and specialize:
Test of whether an object is a matrix:
 Out[1]=
 Out[2]=

These are not matrices:
 Out[1]=
 Out[2]=

Use tests to generalize and specialize:
 Out[1]=
 Out[2]=
 Scope   (2)
Test if a matrix has positive (real) entries:
Test if a matrix has real numeric entries:
Faster test for real-valued numbers:
 Applications   (1)
Define a function that only evaluates for explicit matrices:
This represents the Hermitian part of a matrix symbolically:
This gets the Hermitian part explicitly:
MatrixQ is a special case of ArrayQ:
A matrix is made up of vectors of equal length: