Log in Sign up
Back to Discover
🔢

Function composition

math Maturity 11-13

You can do things in a row.

Example for a composition of two functions.svg
Example for a composition of two functions.svg
First you do one step. Then you do another step. One step leads to the next. This helps us solve puzzles. It is like a chain of ideas. Can you think of a chain?
SVG skew and rotation.svg
SVG skew and rotation.svg

52 words

You can do things in a row.

Example for a composition of two functions.svg
Example for a composition of two functions.svg
Imagine one step leads to a next step. This is like a chain. You do the first part first. Then you use that answer for the next part.
SVG skew and rotation.svg
SVG skew and rotation.svg
This can happen with many things. It can happen with shapes. It can even happen with air pressure on a plane. The order of the steps matters. Doing them in a different order can change the result. It is a way to link ideas together.

91 words

In math, a function is a rule. It takes an input and gives an output. Sometimes, you can link two rules together. This is called function composition.

Example for a composition of two functions.svg
Example for a composition of two functions.svg

Think of it like a chain of steps. You use the first rule to get an answer. Then, you use that answer as the input for the second rule. For example, a plane's height changes with time. Air pressure also changes with height. You can link these rules. This tells you the air pressure at a specific time.

SVG skew and rotation.svg
SVG skew and rotation.svg

Order is very important. Doing the steps in a different order can change the result. This is why composition is not always commutative. Commutative means the order does not matter. But for most functions, it does.

Absolute value composition.svg
Absolute value composition.svg

You can even use the same rule many times in a row. This is called iteration. If you use a rule twice, it is like a functional square. Mathematicians use these chains to study complex patterns. They help us understand how things change over time.

180 words

In mathematics, a function is a rule that turns an input into an output. Sometimes, we can link two different rules together to form a single chain. This process is called function composition.

Example for a composition of two functions.svg
Example for a composition of two functions.svg
When we compose two functions, we apply the first rule to an input. We then take that result and use it as the input for the second rule. This creates a new, combined rule. It is a way of building bigger ideas from smaller ones. This idea works for many kinds of sets, including finite sets and infinite sets.
Example for a composition of two functions.svg
Example for a composition of two functions.svg

Think about how rules work in the real world. Imagine an airplane flying through the sky. We can have one rule that tells us the plane's altitude at a certain time. We can have another rule that tells us the air pressure at a specific altitude. By composing these two rules, we find the air pressure around the plane at a specific time.

SVG skew and rotation.svg
SVG skew and rotation.svg
Order matters very much in these chains. If you change the order of the rules, you might get a different answer. In math, we say composition is not always commutative. This means that doing rule A then rule B is not always the same as rule B then rule A.
Absolute value composition.svg
Absolute value composition.svg

Mathematicians have studied these patterns for a long time. People like Hans Heinrich Bürmann and John Frederick William Herschel helped describe how to use the same rule many times in a row. This is called function iteration.

Example for a composition of two functions.svg
Example for a composition of two functions.svg
When you use a rule twice, it is like a functional square. If you use it many times, it is called a functional power. We can even use these repeating rules to study complex shapes called fractals. These patterns appear in many natural systems. They help us understand how things change and grow over time.

There are many special rules that apply to these chains. One important rule is called associativity. This means that if you have three functions, it does not matter how you group them.

Absolute value composition.svg
Absolute value composition.svg
As long as the order stays the same, the result is the same. Another rule involves special types of functions. If the functions are one-to-one, their composition is also one-to-one. If they are onto, the composition is also onto. These properties help mathematicians predict how a chain will behave before they even do the math.

Function composition is used in many different fields. Computer scientists use it when writing code in many programming languages.

SVG skew and rotation.svg
SVG skew and rotation.svg
It is also a big part of group theory. In this area, mathematicians study groups of transformations. Cayley's theorem is a famous result that links these ideas. Even the very foundation of math can be built using functions and composition. This allows mathematicians to organize many different ideas into one big, connected system.
Absolute value composition.svg
Absolute value composition.svg

494 words

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.svg
Example for a composition of two functions.svg

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.svg
Example for a composition of two functions.svg

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.svg
Absolute value composition.svg

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
SVG skew and rotation.svg

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.svg
Example for a composition of two functions.svg

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
SVG skew and rotation.svg

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.svg
Absolute value composition.svg

679 words
🖼️ 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
Up Next
🔢
Associative property
Math
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.