# Maths – Functions (Part 2)

September 10, 2009 Leave a comment

## Composition of Functions

Say we have 2 functions:

*f*:——>*R**S*_{1}- g
*:***S**_{2}—–>*T*

These functions are only **composable**, or have an inter-relationship when

*S*_{1}=*S*_{2}

When these conditions are met, we can safely define the **composite** of the functions as:

*h*=*g о f*

This states that *h* is equal to *f* followed by *g*. This definition can also be written as:

*h*(*x*) =*g*(*f*(*x*))

Therefore, we can see that *g о f *has source, or domain, ** R** (which is the source of

*f*), and has target, or co-domain,

**. (which is the target of**

*T**g)*. Therefore, we can now write:

*g о f :***R**——->*T*

As you can see, the intermediate domain ** S** is not detectable from the

**composite**of this function.

OK, now consider the following 3 functions:

*f*:——->*S**L**g*:——>*L**R**h*:——>*R**T*

These can be composed is various ways. So we can form:

*g о f:***S***R**h о g:***L***T*

These may then be further composed, to achieve:

*h о (g о f)*:——->*S**T**(h о g) о f*:——->*S**T*

This shows us that **composition** of functions is **associative**, meaning we can remove the brackets and write:

*h о g о f*

Just to note, it is also possible to sometimes omit the ‘*о*’ and just right:

*hgf*

The same can be done for the above functions as well. And thats it, end of Functions 🙂