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 states one function is to give.
The bud must bloom till blowsy blown
Its petals loosen and are strown;
And thats a fate it cant evade
Unless twould rather wilt than fade.”
—Robert Frost (18741963)
“Since body and soul are radically different from one another and belong to different worlds, the destruction of the body cannot mean the destruction of the soul, any more than a musical composition can be destroyed when the instrument is destroyed.”
—Oscar Cullman. Immortality of the Soul or Resurrection of the Dead? The Witness of the New Testament, ch. 1, Epworth Press (1958)