There is a very important way to combine these functions that is fundamental to understanding linear functions and a vast number of other functions:

First find $g(x)$, then find $f(g(x))$.

We can see this as a new function called

So $(f \circ g)(x) = f(g(x))$ and $f \circ g : x \rightarrow g(x) \rightarrow f(g(x))$.

In this section we will study how mapping diagrams visualize and illuminate some fundamental features of linear functions by understanding composition. Though a visualization of composition is possible with graphs, the simplicity of the mapping diagram for composition makes it the choice for visualization as a learning tool. But first we will formally define the key concept of function composition.

In these two examples we use GeoGebra to visualize composition for linear functions.

Compositions are a key to understanding linear functions. the key
result is not hard to understand, but is very useful.

This result says **linear functions are built by composing two
core linear functions:** constant addition and
scalar multiplication.

Here is an example that visualizes the theorem.

You can use this next dynamic example with GeoGebra to investigate further the effects of composition in a mapping diagram of $f$ composed with a mapping diagram of $g$.