Composition
Once I have two functions I can feed the output of one into the other, provided the types match. If and , the composition is the function given by
Proof
The graph of a composite is not the composite of the graphs; compare (1.1). Pairing with and forgetting the middle coordinate is a different operation from composing two subsets of the plane.
The order is the order of application, read right to left: first, then . I keep forgetting this and then a computation reminds me.
Algebra of composition
Composition is associative whenever it is defined,
because both sides send to . It is not commutative. Take and . Then
Same two functions, two different composites. The identity is the two-sided unit: when .
Proof
When composition is defined
The rule is strict. exists, with domain , only if every value of lands in the domain of . If is and is , then is not defined on all of : is not in . Restrict the domain of to and the composite exists,
I would rather notice the missing point than invent a value at zero.
Reading a long chain
A long expression like is a composition written inside out. Unpacking it,
When I later differentiate, this is the chain I will walk backwards. Associativity (1.4) says I may parenthesize the chain however I like; the derivative will care about the order of the factors, not about where I put the parentheses.