In mathematics, function composition is the application of one function to the results of another. For instance, the functions f: X → Y and g: Y → Z can be composed by computing the output of g when it has an argument of f(x) instead of x. Intuitively, if z is a function g of y and y is a function f of x, then z is a function of x.
Thus one obtains a composite function g ∘ f: X → Z 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 composed with f", "g after f", "g following f", or just "g of f".
The composition of functions is always associative. 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 safely left off.
The functions g and f are said to commute with each other if g ∘ f = f ∘ g. In general, composition of functions will not be commutative. Commutativity is a special property, attained only by particular functions, and often in special circumstances. For example, only when .
Considering functions as special cases of relations (namely functional relations), one can analogously define composition of relations, which gives the formula for in terms of and .
Derivatives of compositions involving differentiable functions can be found using the chain rule. Higher derivatives of such functions are given by Faà di Bruno's formula.
The structures given by composition are axiomatized and generalized in category theory.
Read more about Function Composition: Example, Functional Powers, Composition Monoids, Alternative Notations, Composition Operator
Famous quotes containing the words function and/or composition:
“The mothers and fathers attitudes toward the child correspond to the childs own needs.... Mother has the function of making him secure in life, father has the function of teaching him, guiding him to cope with those problems with which the particular society the child has been born into confronts him.”
—Erich Fromm (19001980)
“At painful times, when composition is impossible and reading is not enough, grammars and dictionaries are excellent for distraction.”
—Elizabeth Barrett Browning (18061861)