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


gives a list of the dimensions of expr.
gives a list of the dimensions of expr down to level n.
  • 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.)
  • Each successive level in expr sampled by Dimensions must have the same head.
Dimensions of a matrix:
Dimensions of a matrix:
Click for copyable input
Dimensions counts only dimensions at which an expression is not "ragged":
Dimensions works with arrays of any depth:
Give dimensions only down to level 2:
Dimensions works with any head, not just List:
The "array" is considered full only when it has the same head as at the top:
Dimensions works with SparseArray objects:
Find dimensions of regions filled by 10 steps of cellular automaton evolution:
New in 1 | Last modified in 5