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.
Find the dimensions of a matrix: In[1]:=Dimensions[{{a, b, c}, {d, e, f}}] Out[1]={2, 3}
AllowedHeads
ArrayDepth | Length | ArrayQ | VectorQ | MatrixQ
introduced in Version 1 (June 1988) last modified in Version 12.1 (March 2020)