Nepedia
Back to Discover
Advanced Reader
🔢

Function composition

math Maturity 11-13 Next article →

Function composition is a mathematical operation that combines two separate functions to create a new, single function. In this process, the output of one function becomes the input for the next. This creates a chain of operations where each step depends on the result of the previous one. If we have two functions, $f$ and $g$, the composite function is often written as $f \circ g$. When we evaluate this at an input $x$, we first apply $g$ to $x$ and then apply $f$ to that result. This creates a sequence where the functions act one after another.

Example for a composition of two functions
Example for a composition of two functions

To understand how this mechanism works, imagine a sequence of transformations. The first function takes an initial value and produces a new value. This new value must belong to the domain of the second function for the composition to be valid. In a strict mathematical sense, the codomain of the first function should be the same as the domain of the second. However, it is also acceptable if the first codomain is a subset of the second. Mathematicians sometimes restrict the domain of the first function to ensure every result fits into the second function's required input range.

Example for a composition of two functions
Example for a composition of two functions

Function composition follows several important mathematical rules and properties. One primary property is associativity. This means that if you are composing three functions, $f$, $g$, and $h$, the grouping does not change the final result. Specifically, $(f \circ g) \circ h$ is equal to $f \circ (g \circ h)$. Because of this, mathematicians often omit parentheses entirely. Another key concept is commutativity, which refers to whether the order of the functions matters. Unlike addition or multiplication, function composition is not generally commutative. This means that $f \circ g$ is often not the same as $g \circ f$.

Absolute value composition
Absolute value composition

Specific types of functions behave in predictable ways when they are composed. For example, the composition of two one-to-one functions, also known as injective functions, is always one-to-one. Similarly, the composition of two onto functions, or surjective functions, will always be onto. If both functions are bijections—meaning they are both one-to-one and onto—their composition is also a bijection. This property is vital in the study of permutations and group theory. In these fields, mathematicians look at how sets of functions can be combined to form complex structures.

SVG skew and rotation
SVG skew and rotation

History and notation have evolved alongside these ideas. The concept of using a function repeatedly is called function iteration. This is sometimes written as $f^n$, representing the $n$-th functional power. The notation for these functional powers was introduced by mathematicians Hans Heinrich Bürmann and John Frederick William Herschel. Iteration is a fundamental part of studying dynamical systems and fractals. In more advanced calculus, the derivatives of composed functions are calculated using the chain rule. For even more complex, higher-order derivatives, mathematicians use Faà di Bruno's formula.

Example for a composition of two functions
Example for a composition of two functions

In higher mathematics, composition is used to build algebraic structures called monoids and groups. If you have a set of transformations that share the same domain and codomain, you can form chains of these transformations. These chains form a transformation monoid. If the transformations are all bijective, they form a transformation group, which is also called a permutation group. A famous result known as Cayley's theorem states that any group is actually a subgroup of a symmetric group. This connects the abstract idea of a group to the concrete idea of composing permutations.

SVG skew and rotation
SVG skew and rotation

Function composition also extends into the realm of multivariate functions. A multivariate function is a rule that takes multiple inputs at once. In partial composition, one of the arguments of a function is replaced by another function. This is a more general version of the standard composition used with single-variable functions. This concept is important in computer engineering and in the study of primitive recursive functions. It allows for the creation of highly complex logical and mathematical systems by layering simple rules upon one another.

Absolute value composition
Absolute value composition
659 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (3)
File:Example for a composition of two functions.svg
Example for a composition of two functions.svg
File:Absolute value composition.svg
Absolute value composition.svg
File:SVG skew and rotation.svg
SVG skew and rotation.svg
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.