Maths Mutt HOME

Functions

Example

Three different ways to show how the function \(f\) links the input \(\{1,2,3,4\}\) to the output \(\{2,4,6,8\}\):

Function mapping diagram

So \(f(x) = 2x\). The “\(f\) of \(x\)” equals \(2x\).

Example

The function \(f\) such that \(1 \mapsto 5\), \(2 \mapsto 10\) is described below:

\[ f: 1 \mapsto 5 \] \[ f: 2 \mapsto 10 \] \[ f: 3 \mapsto 15 \] \[ f: 4 \mapsto 20 \] \[ f: x \mapsto 5x \]
\[ f(1) = 5 \times 1 = 5 \] \[ f(2) = 5 \times 2 = 10 \] \[ f(3) = 5 \times 3 = 15 \] \[ f(a) = 5 \times a = 5a \]

So \(f(x) = 5x\). The “\(f\) of \(x\)” equals \(5x\).

To calculate “\(f\) of \(x\)” for a given function \(f(x)\)

Example
Function example
\[ f(1) = 5 \times 1 + 6 = 11 \] \[ f(2) = 5 \times 2 + 6 = 16 \] \[ f(3) = 5 \times 3 + 6 = 21 \] \[ f(a) = 5 \times a + 6 = 5a + 6 \]

Working backwards:

Example
\[ f(x) = ax + b \] \[ f(2) = 5 \] \[ f(1) = 4 \] \[ \text{Find the equation for } f(x). \]

Solution:

\[ 5 = 2a + b \quad \text{(1)} \] \[ 4 = a + b \quad \text{(2)} \] \[ \text{Multiply equation (2) by } -1 \text{ to get equation (3):} \] \[ -4 = -a - b \quad \text{(3)} \] \[ \text{Add equations (1) and (3):} \] \[ 5 + (-4) = (2a + b) + (-a - b) \] \[ 1 = a \] \[ \text{So } a = 1 \] \[ \text{Substitute into equation (2):} \] \[ 4 = a + b \] \[ 4 = 1 + b \] \[ b = 3 \] \[ \text{Therefore } a = 1 \text{ and } b = 3. \] \[ f(x) = x + 3 \]

This can be used to find the equation of a line if two points have been given:

Example

Find the equation of the line joining the points \((1,5)\) and \((3,11)\).

\[ x_1,\, y_1 \qquad x_2,\, y_2 \] \[ (1,5) \qquad (3,11) \] \[ m = \frac{y_2 - y_1}{x_2 - x_1} \] \[ = \frac{11 - 5}{3 - 1} \] \[ = \frac{6}{2} \] \[ = 3 \]
\[ y = mx + c \] \[ m = 3 \quad\Rightarrow\quad y = 3x + c \] \[ \text{when } x = 1,\; y = 5 \] \[ 5 = 3 \times 1 + c \] \[ 5 = 3 + c \] \[ c = 2 \] \[ \text{check: when } x = 3,\; y = 11 \] \[ 11 = 3 \times 3 + c \] \[ 11 = 9 + c \] \[ c = 2 \]
\[ \text{Equation is } y = 3x + 2 \]
Maths Mutt Logo © Alexander Forrest