Function notation

A way to think of functions, is like a computer program that carries out a certain process on a set of inputs (in this instance the inputs are numbers) and then returns a certain output based on a defined process (some sort of an equation).

Requirements


Delving into using symbols in maths…

A more sophisticated way of thinking of a function is that it is a mapping between elements of 2 sets. One set contains elements of all the possible input values (an infinite amount), the other contains the oiutput values.

The notation for a function is simply this:

$$ f(x) = $$

The value of x is the input and the answer is the output. Another way to write the same thing is:

$$ f : x \mapsto $$

If we are given a function:

$$ f : x \mapsto \dfrac{1}{x-2} $$

We can easily work out the value of an input, say 3 for example by just replacing the x letter for 2:

$$ f(\color{red}{3}) = \dfrac{1}{\color{red}{3}-2} = 1$$

The problem with this function however, is we can’t have a value for 2 because we cannot divide a number by 0. The domain is the fancy word for the set that contains all of the input values that will give an output (and won’t cause a nasty error). By contrast, the range is the set which contains all of the possible output values.

In the above case, we must exclude 2 from the domain.

$$ f : x \mapsto \dfrac{1}{x-2}, \color{red}{x \neq 2} $$

The only times we need to worry about this is when we are dealing with roots (as a root must be positive) or fractions (the denominator must not be 0).

Now that we understand the “basics” of functions, we can look at composite functions which are 2 or more functions combined together. Let’s define another function:

$$ g : x \mapsto 2x + 1 $$

We can now combine the function g and f like this:

$$ fg(x) = $$

The important thing to remember is to start on the inside and work your way out (like with cutlery). Let’s have a go at finding the output value when x is 3:

$$ g(\color{red}{3}) = 2(\color{red}{3}) + 1 = 7 $$ $$ fg(3) = f(\color{red}{7}) = \dfrac{1}{\color{red}{7}-2} = \dfrac{1}{5} $$

Also, using the same process we can find the general equation for the function through algebra:

$$ fg(x) = \dfrac{1}{\color{red}{2x + 1} - 2} = \dfrac{1}{2x - 1} $$

Finally we can have inverse functions which allows us to connect the output value back to an input value (without knowing the input value). A cooler name for the inverse function is an anti-function.

We can find the inverse function by replacing the function with a y and a replacing the x term with a y. We then rearrange the equation to make y the subject of the equation. Let’s try finding the inverse function of the composite function we made:

$$ \color{blue}{x} \color{red}{(2y - 1)} = \dfrac{1}{\color{green}{2y} - 1} \color{red}{\times (2y - 1)} $$ $$ \dfrac{x(2y - 1)}{\color{red}{x}} = \dfrac{1}{\color{red}{x}} $$ $$ 2y - 1 \color{red}{+1} = \dfrac{1}{x} \color{red}{+1} $$ $$ \dfrac{2y}{\color{red}{2}} = \dfrac{1}{\dfrac{x}{\color{red}{2}}} + \dfrac{1}{\color{red}{2}} $$ $$ y = \dfrac{1}{x} \color{red}{\times \dfrac{1}{2}} + \dfrac{1}{2} = \dfrac{1}{2x} + \dfrac{1 \color{red}{\times x}}{2 \color{red}{\times x}} $$ $$ y = \dfrac{1 + x}{2x} $$

Finally, we replace the y with the correct function notation:

$$ f^{-1}(x) = \dfrac{1 + x}{2x} $$

inverse functions have the function notation to the power of negative 1 which tells us they are inverse functions.


Further reading

More coming soon