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 function of art is to do more than tell it like it isits to imagine what is possible.”
—bell hooks (b. c. 1955)
“I live in the angle of a leaden wall, into whose composition was poured a little alloy of bell-metal. Often, in the repose of my mid-day, there reaches my ears a confused tintinnabulum from without. It is the noise of my contemporaries.”
—Henry David Thoreau (18171862)