Nepedia
Back to Discover
Fluent Reader
🔢

Function composition

math Maturity 11-13 Next article →

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

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

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 skew and rotation

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

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

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

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 skew and rotation

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