# Working with Functions

> Function machines, function notation, domain and range, the vertical line test, composite, odd and even functions.

From HSC Maths Advanced on WhizzNotes, free study notes for NSW students: https://whizznotes.com/mathematics-advanced/working-with-functions/. Updated 3 November 2026.
Year 11 and Year 12 boxes go deeper than the Year 10 text around them.

### Story time: The vending machine
Noah presses B4 on the school vending machine and a muesli bar drops out. Every time he presses B4, he gets a muesli bar. The machine never gives a muesli bar one day and a drink the next for the same button.

That is exactly what a **function** is: a rule where each input gives **one** output. Some buttons might give the same snack (two buttons, one output is fine). But one button giving two snacks would be a broken machine, and a broken function.

**In short:** A function is a rule that gives exactly one output for each input, written $f(x)$. Its domain is the inputs it allows and its range is the outputs it can give. An even function is symmetric in the y-axis, and an odd function is symmetric about the origin.

## Starting point: Years 9 and 10

### Rules, tables and graphs

A rule like "double it and add 3" can be written as $y = 2x + 3$. A **table of values** lists inputs and outputs:

| $x$ | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| $y$ | 3 | 5 | 7 | 9 |

Plot the points and join them to see the graph. Any set of ordered pairs $(x, y)$ is called a **relation**.

### What makes a function

A **function** is a relation where every $x$ gives exactly one $y$.

### Key idea: The vertical line test
Draw vertical lines across a graph. If any vertical line hits the graph more than once, it is **not** a function.
- A parabola $y = x^2$ passes: it is a function.
- A circle $x^2 + y^2 = 9$ fails: $x = 0$ gives $y = 3$ and $y = -3$.

### Function notation

Instead of $y = 2x + 3$, write $f(x) = 2x + 3$. Read it as "f of x". To find $f(4)$, put 4 in for $x$:

$$f(4) = 2(4) + 3 = 11$$

So $f(4) = 11$ means the point $(4, 11)$ is on the graph.

### Worked example: Substituting expressions
If $f(x) = x^2 - 1$, find $f(-3)$ and $f(a + 1)$.

$f(-3) = 9 - 1 = 8$.

$f(a + 1) = (a + 1)^2 - 1 = a^2 + 2a + 1 - 1 = a^2 + 2a$.

### Watch out: f(x) is not f times x
$f(3)$ means "the output when the input is 3". It does not mean $f \times 3$.

### Calculator tip: Several values of f(x) quickly
To find $f(-2)$, $f(0)$ and $f(3)$, type the rule once using the letter `X`, for example `X² - 3X + 1`. If your calculator has a `CALC` key, press it and enter each value of $x$ in turn. Otherwise store each value in `X` with `STO`, then press the up arrow to bring back the rule and `=`.

**Mind map**

```text
Functions
  Idea
    One input, one output
    Vertical line test
  Notation
    f(x)
    f(4) is the output at 4
  Domain and range
    Domain: allowed x
    Range: possible y
  Combining
    Composite f(g(x))
    Sum, product
  Symmetry
    Even: f(-x) = f(x)
    Odd: f(-x) = -f(x)
```

### Year 11: Domain and range
The **domain** is the set of $x$ values you are allowed to put in. The **range** is the set of $y$ values that come out.

Two things shrink a domain:
- You cannot divide by zero. $f(x) = \dfrac{1}{x - 2}$ has domain $x \neq 2$.
- You cannot square root a negative. $g(x) = \sqrt{x + 1}$ has domain $x \geq -1$ and range $y \geq 0$.

**Interval notation** uses square brackets to include an end and round brackets to leave it out. $[2, 5)$ means $2 \leq x < 5$. $(-\infty, 3]$ means $x \leq 3$.

$f(x) = x^2$ has domain all real numbers, $(-\infty, \infty)$, and range $[0, \infty)$.

**Domains of combined functions.** Every part must work. For $y = \ln(x - 1) + \sqrt{5 - x}$, the log needs $x > 1$ and the root needs $x \leq 5$, so the domain is $1 < x \leq 5$. For $y = \sqrt{\ln x}$, the inside of the root must be at least 0, so $\ln x \geq 0$, which means $x \geq 1$.

**A root of a quadratic.** For $y = \sqrt{4x - x^2}$, solve $4x - x^2 \geq 0$: $x(4 - x) \geq 0$, so $0 \leq x \leq 4$. The inside is largest at the vertex $x = 2$, where it equals 4, so the range is $0 \leq y \leq 2$.

**Range on a restricted domain.** Find the values at both ends and at any turning point inside the interval. For $f(x) = x^2 - 4x$ on $1 \leq x \leq 5$: $f(1) = -3$, the vertex gives $f(2) = -4$, and $f(5) = 5$. So the range is $-4 \leq y \leq 5$.

### Year 11: One-to-one, many-to-one and piecewise functions
A **one-to-one** function gives a different output for every input, like $y = 2x + 3$. A **many-to-one** function lets different inputs share an output, like $y = x^2$, where $f(2) = f(-2) = 4$. Use the **horizontal line test** to tell them apart.

A **piecewise** function uses different rules on different parts of the domain:

$$f(x) = \begin{cases} x + 1, & x < 0 \\ x^2, & x \geq 0 \end{cases}$$

Then $f(-3) = -2$ and $f(3) = 9$.

**Continuous piecewise functions.** A piecewise function is **continuous** if the pieces meet with no jump. Make both rules give the same value at the join. For $f(x) = kx + 1$ when $x < 2$ and $f(x) = x^2 - 3$ when $x \geq 2$: at $x = 2$, $2k + 1 = 1$, so $k = 0$.

**Average rate of change** between $x = a$ and $x = b$ is the gradient of the line joining those points: $\dfrac{f(b) - f(a)}{b - a}$. For $f(x) = x^2$ from $x = 1$ to $x = 4$ it is $\dfrac{16 - 1}{3} = 5$.

### Year 11: Composite, odd and even functions
A **composite** function puts the output of one into another. $f(g(x))$ means "do $g$ first, then $f$."

If $f(x) = x^2$ and $g(x) = x + 3$: $f(g(x)) = (x + 3)^2$ but $g(f(x)) = x^2 + 3$. Order matters.

For $f(g(x))$ to exist, the range of $g$ must fit inside the domain of $f$.

**Even** functions satisfy $f(-x) = f(x)$. Their graphs are mirror images in the y-axis, like $x^2$ and $x^4$.

**Odd** functions satisfy $f(-x) = -f(x)$. They look the same after a half turn about the origin, like $x^3$ and $\dfrac{1}{x}$.

Test $f(x) = x^3 - x$: $f(-x) = -x^3 + x = -(x^3 - x) = -f(x)$, so it is odd.

**Domain and range of a composite.** For $f(g(x))$ with $f(x) = \sqrt{x}$ and $g(x) = x - 4$: $f(g(x)) = \sqrt{x - 4}$, so the domain is $x \geq 4$ and the range is $y \geq 0$. Work from the inside out: first which $x$ values $g$ accepts, then which of $g$'s outputs $f$ accepts.

**Using odd and even facts.** If $f$ is odd, $f(-2) = -f(2)$. If $g$ is even, $g(-2) = g(2)$. Use these to evaluate expressions such as $f(g(-2))$ step by step from the inside.

### Year 12: Domains in calculus
In Year 12 the domain decides where you can differentiate and integrate. $\ln x$ only exists for $x > 0$, so $\ln(x - 3)$ needs $x > 3$. A function can only have a derivative where it is defined and smooth. Always state the domain before you find stationary points or areas.

## Quick summary

- A function gives exactly one output for each input. Use the vertical line test.
- $f(a)$ means substitute $a$ for $x$.
- Domain: allowed inputs. Range: possible outputs. Watch for dividing by zero and roots of negatives.
- $f(g(x))$: do $g$ first. Order matters.
- Even: $f(-x) = f(x)$, symmetric in the y-axis. Odd: $f(-x) = -f(x)$, symmetric about the origin.

## Quiz

Try these questions from the chapter quiz.

1. If $f(x) = 3x - 4$, what is $f(5)$?
   - A. 7
   - B. 11
   - C. 19
   - D. $-1$
   - Answer: B. 11. $3(5) - 4 = 11$.

2. If $f(x) = x^2 + 2x$, what is $f(-2)$?
   - A. 0
   - B. $-8$
   - C. 8
   - D. 4
   - Answer: A. 0. $(-2)^2 + 2(-2) = 4 - 4 = 0$.

3. Which of these is NOT a function?
   - A. $y = x^2$
   - B. $y = 2x + 1$
   - C. $x^2 + y^2 = 16$
   - D. $y = x^3$
   - Answer: C. $x^2 + y^2 = 16$. A circle fails the vertical line test.

The whole chapter quiz is on the page, for signed-in students: https://whizznotes.com/mathematics-advanced/working-with-functions/#quiz
