(De-)constructions of functions

Mathematical functions can be seen as machines that transform an input into an output. Here we investigate, by starting from very basic machines, how we can accurately construct and understand more complex functions.

This will provide a solid basis for further understanding functions. However, at first sight, it can undoubtedly appear somewhat overwhelming.

This is an extra section tointroduce functions
and an impatient reader can consider directly
consulting the definition.

We give a function a name (typically we use the letter ), and that function transforms a thing of type into a thing of type which we note as . We represent this graphically as follows:

and we write this mathematically as: We call the domain and the codomain. If the and are clear from the context, we often write or even in short. In the graphic representation, we then also leave out and .

So while such function machines perform all kinds of operations on elements of sets, we immediately want to go one step further: we want to be able to perform simple operations on the function machines themselves as well. In the machine representation, the simplest construction is to place two machines in a row. Mathematically this is called composing functions. Of course, this is only possible if the output of the first machine can serve as an input for the second machine. Using mathematical terminology, we say that the codomain of the first function must be a subset of the domain of the second function.

This is graphically represented by sliding the domain of the second function over the codomain of the first, as shown below. The composite function thus produces a new machine.

Composing functions thus means replacing two existing machines placed one after the other, namely the (old) ’composing functions’, by one new machine, namely the (new) ’composite function’. The new machine simply does the work of the two old ones all at once.

We can also try to make machines for adding and multiplying numbers, but that is a bit more complex. Indeed, such machines need two inputs, namely the two terms or the two factors of addition or multiplication.

Graphically this becomes

and mathematically we write it with ordered pairs (this is not so important for the moment, and can be skipped): and

For technical reasons, we also introduce a ’clone-machine’, with which we can clone an input. So we put one into such a machine, and each time a copy of that comes out in two different places.

Many of the functions that occur in practice are built from simple basic functions.

In this module we learn to ’build with functions’, just like you can build with Lego or Playmobil. To distinguish clearly between a function and the value of a function, in this section we will always write a function as . The ’action’ of the function on an input then becomes and the ’output’, i.e. the result, of the function becomes . Thus , but the left hand side emphasises the action of the function, and the right hand side the result.

We start with only two types of basic functions:

(a)
The constant functions (one for each , which maps each to the same ):
(b)
The identity function (which maps each to itself, and thus ’changes nothing’):

and three ways in which we can combine two given functions and :

(a)
(addition, we read plus )
(b)
(multiplication, we read times )
(c)
(composition, we read after )

Graphically, this means that with two given machines, we can build three new ones:

Extra 1: Subtle subtleties about the use of letters

Note that the letters in the blocks , and each have very different meanings. More specifically, the use of the letter determines the exact meaning of the block.

  • In , the letter stands for a (random) constant, i.e. a random real number.
    So, with , you should think of or .
    Or, stands for the function (which e.g. is and ).
  • In , the letter stands for a variable. So, is a concrete and unique real function, namely the identity function that ’doesn’t really do anything’ except match each input value with the same output value .
    Or again, stands for the function (which e.g. is and ).
  • In the letter stands for an (arbitrary) function name.
    So, in you can think of or .
    Or, stands for the function (which e.g. is and ).

With these rather elementary ingredients, we can now set up surprisingly complex and intriguing constructions.

However, we start with a false start: what if we only combine the functions with different ’s? That is definitely not interesting, because we can build absolutely nothing new. Indeed, adding, multiplying and composing constant functions always yields only constant functions:

(a)
, so =
(b)
, so =
(c)
, so =

But if we try the same with the identity function , it becomes more interesting:

(a)
, so
(b)
, so
(c)
( x ), so =

So: addition and multiplying the identity function yield new functions (namely and ), but composing identical functions again yields the identical function .

Combining even more constant and identity functions also results in the following:

(a)
, so
(b)
, so
(c)
, so =
(d)
, so
(e)
, so

Graphically, that amounts to the following diagrams to build more complicated functions:

What is the point of this whole explanation? Hopefully it helpsyou to overcome you fear of some of the complicated expressions, which we can read ’from the inside out’ (from left to right in this machine representation), or ’from the outside in’ (from right to left in this machine representation).

2025-10-01 16:14:28