Expression Structure

A foundational idea in Mathematica is that all expressions—whatever they may represent—ultimately have a uniform tree-like structure.


FullForm the full functional form of an expression, without shortened syntax

TreeForm a representation of the tree structure of small expressions

Head the head of an expression: the f in

Length the number of elements in an expression

Part (..[[..]]) numbered part of an expression

Level parts specified by a given number of indices

Depth the maximum number of indices to specify any part

Atomic Components of Expressions »

Symbol ▪ Integer ▪ Real ▪ String ▪ ...

Expression Sizes & Signatures

LeafCount ▪ ByteCount ▪ Hash

New to Mathematica? Find your learning path »
Have a question? Ask support »