Composition[f1,f2,f3,…]
represents a composition of the functions f1, f2, f3, ….
Composition 
Composition[f1,f2,f3,…]
represents a composition of the functions f1, f2, f3, ….
Details
- Composition allows you to build up compositions of functions that can later be applied to specific arguments.
- Composition objects are automatically simplified when possible. »
- InverseFunction objects containing Composition are automatically simplified when possible. »
- Composition has the attributes Flat and OneIdentity.
- Composition can be entered in the form f1@*f2@*….
- Composition[] gives Identity. »
Examples
open all close allBasic Examples (2)
Scope (4)
Use pure functions inside Composition:
Composition[1 + # ^ #&, a #&, # / (# + 1)&][x]Use Apply with Composition:
Composition[f, g, h]@@{x, y, z}Composition objects are automatically simplified when possible:
Composition[f, Identity, g]Composition[RotationTransform[θ], RotationTransform[ϕ]]Assign a Composition object to a variable:
f = 2#& @* Cases[_Symbol]The variable can be used like any other function:
f[{a, "b", c, d, "e", 5}]Applications (2)
Properties & Relations (10)
Composition[f] gives f:
Composition[f]Composition[] gives Identity:
Composition[]Identity inside a composition is automatically removed:
Composition[f, Identity, g]Consecutive TransformationFunction objects are combined:
Composition[TranslationTransform[{2, 2}], f, RotationTransform[θ], RotationTransform[-θ]]//SimplifyInverseFunction of a composition produces a reversed composition of inverse functions:
InverseFunction[Composition[f, g, h]]Composition composes on the left:
Composition[f, g][x]RightComposition composes on the right:
RightComposition[f, g][x]Pure functions let you set up objects that work like Composition:
Composition[f, g, h][x]f[g[h[#]]]&[x]Different ways of entering the same composition:
Composition[f, g, h][x]f @* g @* h@xComposition is natural with prefix notation, entering the functions in the same order:
f@g@h@xWith postfix notation, the functions are reversed relative to pure postfix application:
x//h//g//fx//f @* g @* hCompose a function with itself
times using Nest:
Nest[f, x, 3]Composition[f, f, f][x]Compose a function with itself
times using RSolve:
f[x_] := (2x + 3/x + 4)fn = a /. First@RSolve[{a[n + 1] == f[a[n]], a[0] == 0}, a, n]fn[10](Composition@@Table[f, {10}])[0]Use ComposeSeries to do composition of series expansions:
Series[Composition[Sin, Cos][x], {x, 0, 3}]ComposeSeries[Series[Sin[x], {x, Cos[0], 3}], Series[Cos[x], {x, 0, 3}]]Possible Issues (1)
Composition[…] objects do not hold their arguments:
Composition[Hold, Times][2 + 3, 4 + 5]Use ordinary function application to allow functions to hold their arguments:
Hold[Times[2 + 3, 4 + 5]]See Also
RightComposition ComposeList Nest Function ApplyTo ComposeSeries Identity Construct OperatorApplied Comap
Function Repository: AbstractCategory
Tech Notes
History
Introduced in 1991 (2.0) | Updated in 2014 (10.0)
Text
Wolfram Research (1991), Composition, Wolfram Language function, https://reference.wolfram.com/language/ref/Composition.html (updated 2014).
CMS
Wolfram Language. 1991. "Composition." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/Composition.html.
APA
Wolfram Language. (1991). Composition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Composition.html
BibTeX
@misc{reference.wolfram_2026_composition, author="Wolfram Research", title="{Composition}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/Composition.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_composition, organization={Wolfram Research}, title={Composition}, year={2014}, url={https://reference.wolfram.com/language/ref/Composition.html}, note=[Accessed: 13-June-2026]}