Mathematica 9 is now available
 Documentation / Mathematica / Built-in Functions / Lists and Matrices / List Testing  /
TensorRank

  • TensorRank[ expr ] gives the depth to which expr is a full array, with all the parts at a particular level being lists of the same length.
  • TensorRank[ list ] is equivalent to Length[Dimensions[ list ]].
  • Examples: TensorRank[ a,b ]; TensorRank[ a, b ].
  • TensorRank[ expr , n ] tests only down to level n.
  • See the Mathematica book: Section 3.7.11.
  • See also: Dimensions, Depth, VectorQ, MatrixQ.

    Further Examples

    This is the tensor rank of the 3 x 3 matrix .

    In[1]:=

    Out[1]=

    This is the tensor rank of a 2 x 4 x 1 tensor.

    In[2]:=

    Out[2]=



    Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
    THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
    SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.