IB Diploma Mathematics AA · Functions
Function notation, domain and range
1What a function is
A function is a rule that gives exactly one output for each input.
- $f(x)$ is read "$f$ of $x$". It is the output when the input is $x$.
- It can also be written $f: x \mapsto 2x + 1$.
To evaluate a function, substitute the input for $x$.
Evaluating
- For $f(x) = x^2 - 3x$: $f(4) = 16 - 12 = 4$.
- $f(-2) = 4 + 6 = 10$.
- $f(a + 1) = (a+1)^2 - 3(a+1) = a^2 - a - 2$.
On a graph, a relation is a function if every vertical line crosses the graph at most once. This is the vertical line test. A circle fails it, so a circle is not a function.
Check yourself
If f(x) = 3x − 2, what is f(5)?
Show the answer
13
3 × 5 − 2 = 13.
2Domain and range
- The domain is the set of all allowed inputs ($x$ values).
- The range is the set of all possible outputs ($y$ values).
Domain and range of a square root function
Unless told otherwise, the domain is all real numbers, except values that cause a problem.
- You cannot divide by zero. For $f(x) = \dfrac{1}{x - 3}$, the domain is $x \neq 3$.
- You cannot take the square root of a negative number. For $f(x) = \sqrt{x - 2}$, the domain is $x \geq 2$.
- You cannot take the logarithm of zero or a negative number. For $f(x) = \ln x$, the domain is $x > 0$.
The range is easiest to find from the graph.
Finding a range
- For $f(x) = x^2 + 1$, with all real $x$ as the domain.
- $x^2$ is never negative, so the smallest value of $f$ is 1.
- The range is $f(x) \geq 1$.
Check yourself
What is the domain of f(x) = √(x − 4)?
Show the answer
x ≥ 4
The expression under the square root must not be negative.
3Graphs of functions
The graph of a function is the set of points $(x, f(x))$.
Key features to find, usually with a calculator:
- $y$-intercept: where $x = 0$.
- $x$-intercepts (zeros, roots): where $f(x) = 0$.
- Maximum and minimum points.
- Asymptotes: lines that the graph approaches but never reaches.
- Intersections of two graphs: where $f(x) = g(x)$.
To sketch a graph, show its general shape and label the key features. To draw a graph, plot points accurately on a grid.
Check yourself
What are the zeros of a function?
Show the answer
The x-values where f(x) = 0
They are where the graph crosses the x-axis.
4Restricting domains in context
In real-life models, the domain is often restricted by context.
- A function giving the height of a ball, $h(t) = 20t - 5t^2$, only makes sense while the ball is in the air: $0 \le t \le 4$.
- A cost function cannot have a negative number of items.
- The range then follows from the domain.
$h(t) = 20t - 5t^2$
- $h = 0$ when $t = 0$ or $t = 4$, so the domain is $0 \le t \le 4$.
- Maximum at $t = 2$: $h = 40 - 20 = 20$ m.
- Range: $0 \le h \le 20$.
Check yourself
What is the range of $h(t) = 20t - 5t^2$ for $0 \le t \le 4$?
Show the answer
$0 \le h \le 20$
Maximum 20 at $t = 2$.
5Domains of square roots and logarithms
Some functions have natural restrictions:
- $\sqrt{g(x)}$ needs $g(x) \ge 0$.
- $\ln g(x)$ needs $g(x) > 0$.
- $\frac{1}{g(x)}$ needs $g(x) \ne 0$.
Domain of $f(x) = \frac{\ln(x - 1)}{x - 3}$
- Logarithm: $x - 1 > 0$, so $x > 1$.
- Denominator: $x \ne 3$.
- Domain: $x > 1$, $x \ne 3$.
Check yourself
What is the domain of $\sqrt{5 - x}$?
Show the answer
$x \le 5$
$5 - x \ge 0$.
6Going deeper: finding the range properly, and four standard domain problems
Range questions lose more marks than domain questions, because students test the endpoints and forget turning points.
$f(x) = x^2 - 4x + 7$. Find the range (a) for $x \in \mathbb{R}$, (b) for $0 \le x \le 5$.
- Complete the square: $f(x) = (x - 2)^2 + 3$. The minimum is 3, at $x = 2$.
- (a) For all real $x$: range $f(x) \ge 3$.
- (b) The vertex $x = 2$ lies inside the domain, so the minimum is still 3.
- Endpoints: $f(0) = 7$ and $f(5) = 12$. The maximum is 12.
- Range: $3 \le f(x) \le 12$.
- The trap: using endpoints only gives $7 \le f(x) \le 12$, which is wrong.
Four standard domain problems
- Square root: $g(x) = \sqrt{6 - 2x}$ needs $6 - 2x \ge 0$, so $x \le 3$. The range is $g(x) \ge 0$.
- Denominator: $h(x) = \frac{2x + 1}{x - 3}$ needs $x \ne 3$. The range is $y \ne 2$, the horizontal asymptote.
- Logarithm: $k(x) = \ln(x^2 - 9)$ needs $x^2 - 9 > 0$, so $x < -3$ or $x > 3$. Note the strict inequality.
- Combined: $m(x) = \frac{1}{\sqrt{x - 1}}$ needs $x - 1 > 0$, so $x > 1$: the square root cannot be zero because it is in a denominator.
Notation
- Inequalities: $-2 \le x < 5$. Interval notation: $[-2, 5)$. A square bracket includes the endpoint; a round bracket excludes it.
- $f: x \mapsto 2x + 1$ means the same as $f(x) = 2x + 1$.
- For a rule to be a function, each input has exactly one output: the vertical line test on a graph.
- A function is one-to-one if each output comes from only one input: the horizontal line test. Only one-to-one functions have inverses.
In context: if $h(t)$ is the height of a ball $t$ seconds after it is thrown and it lands at $t = 4$, the sensible domain is $0 \le t \le 4$, whatever the algebra allows.
Using the GDC: plot the function over the stated domain and use the minimum and maximum tools, then confirm with algebra where the question says "show that".
Check yourself
What is the range of f(x) = x² − 6x + 1 for 1 ≤ x ≤ 6?
Show the answer
−8 ≤ f(x) ≤ 1
The vertex at x = 3 gives −8, which is inside the domain; the endpoints give −4 and 1.
Now test yourself
This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.
Practise in Impera