Expressions as Trees

Here is an expression in full form:

FullForm[x^3+(1+x)^2]

(RefLink[TreeForm, paclet:ref/TreeForm]) prints out expressions to show their "tree" structure:

TreeForm[x^3+(1+x)^2]

You can think of any Wolfram Language expression as a tree. In the expression above, the top node in the tree consists of a (RefLink[Plus, paclet:ref/Plus]). From this node come two "branches", x^3 and (1+x)^2. From the x^3 node, there are then two branches, x and 3, which can be viewed as "leaves" of the tree.

This matrix is a simple tree with just two levels:

TreeForm[{{a,b},{c,d}}]

Here is a more complicated expression:

{{a b,c d^2},{x^3 y^4}}

The tree for this expression has several levels:

TreeForm[%]

The indices that label each part of an expression have a simple interpretation in terms of trees. Descending from the top node of the tree, each index specifies which branch to take in order to reach the part you want.