This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Built-in Functions / Lists and Matrices / List Testing  /
Dimensions

  • Dimensions[ expr ] gives a list of the dimensions of expr.
  • Dimensions[ expr , n ] 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.
  • Example: Dimensions[ a,b,c , d,e,f ].
  • See the Mathematica book: Section 1.8.3Section 3.7.3.
  • See also: TensorRank, VectorQ, MatrixQ.

    Further Examples

    In[1]:=

    Out[1]=

    In[2]:=

    Out[2]=