This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Documentation / Mathematica / Built-in Functions / Lists and Matrices / List Testing /

Dimensions

FilledSmallSquare Dimensions[expr] gives a list of the dimensions of expr.

FilledSmallSquare Dimensions[expr, n] gives a list of the dimensions of expr down to level n.

FilledSmallSquare expr must be a full array, with all the pieces of expr at a particular level having the same length. (The elements of expr can then be thought of as filling up a hyper-rectangular region.)

FilledSmallSquare Each successive level in expr sampled by Dimensions must have the same head.

FilledSmallSquare Example: Dimensions[a,b,c,d,e,f] LongRightArrow.

FilledSmallSquare For SparseArray objects, Dimensions yields the dimensions of the corresponding ordinary lists.

FilledSmallSquare See Section 1.8.3, Section 2.4.3 and Section 3.7.3.

FilledSmallSquare See also: ArrayDepth, VectorQ, MatrixQ.

FilledSmallSquare New in Version 1; modified in 5.0.

Further Examples