# Function Notation

Consider the relation $y=3x+2$, which is a function.
The $y$-values are determined from the $x$-values, so we say ‘$y$ is a function of $x$, abbreviated to $y=f(x)$.
So, the rule $y=3x+2$ can also be written as follows.
\large \begin{align} f: \mapsto \ &3x+2 \\ &\text{or} \\ f(x)= \ &3x+2 \\ &\text{or} \\ y= \ &3x+2 \end{align}
A function $f$ such that $x$ is converted into $3x+2$.

### Example 1

If $f(x)=4x-5$, find $f(2)$.

\begin{align} \displaystyle f(2) &= 4 \times 2-5 \\ &= 3 \end{align}

### Example 2

If $f(x)=x^2-5x+1$, find $f(-1)$.

\begin{align} \displaystyle f(-1) &= (-1)^2-5(-1)+1 \\ &= 7 \end{align}

### Example 3

If $f(x)=x^2-3x+2$, find $f(x+1)$.

\begin{align} \displaystyle f(x+1) &= (x+1)^2-3(x+1)+2 \\ &= x^2+2x=1-3x-3+2 \\ &= x^2+x \end{align}

### Example 4

Given $f(x)=ax+b$, $f(1)=7$ and $f(2)=11$, find $a$ and $b$.

\begin{align} \displaystyle f(1) &= 7 \\ a \times 1 +b &= 7 \\ a+b &= 7 \cdots (1) \\ f(2) &= 11 \\ a \times 2 + b &= 11 \\ 2a+b &= 11 \cdots (2) \\ (2) &- (1) \\ (2a+b)-(a+b) &= 11-7 \\ a &= 4 \\ 4 + b &= 7 \cdots (1) \\ b &= 3 \end{align}