*** Welcome to piglix ***

Function composition


In mathematics, function composition is the pointwise application of one function to the result of another to produce a third function. For instance, the functions f : XY and g : YZ can be composed to yield a function which maps x in X to g(f(x)) in Z. Intuitively, if z is a function of y, and y is a function of x, then z is a function of x. The resulting composite function is denoted g ∘ f : XZ, defined by (g ∘ f )(x) = g(f(x)) for all x in X. The notation g ∘ f is read as "g circle f ", or "g round f ", or "g composed with f ", "g after f ", "g following f ", or "g of f", or "g on f ". Intuitively, composing two functions is a chaining process in which the output of the inner function becomes the input of the outer function.

The composition of functions is a special case of the composition of relations, so all properties of the latter are true of composition of functions. The composition of functions has some additional properties.

The composition of functions is always associative—a property inherited from the composition of relations. That is, if f, g, and h are three functions with suitably chosen domains and codomains, then f ∘ (g ∘ h) = (f ∘ g) ∘ h, where the parentheses serve to indicate that composition is to be performed first for the parenthesized functions. Since there is no distinction between the choices of placement of parentheses, they may be left off without causing any ambiguity.


...
Wikipedia

...