1 higher-level section hidden.
Educerie · IB Diploma · Mathematics: analysis and approaches
IB Mathematics AA 2.2 · SL and HL
Functions, domain, range and inverse
What exactly makes a rule a function, which inputs is it allowed to take and which outputs can it give, and when can it be run backwards?
What you will learn
- Understand that a function gives each input exactly one output, and how to test a rule, table or graph for this.
- Know how to find the domain and range of a function, including on a restricted domain and in a model.
- Understand that an inverse undoes a function and exists only when the function is one-to-one.
- Know that the graph of f⁻¹ is the reflection of f in y = x, so domain and range swap.
You must be able to
- Find the largest possible domain and the range of a function, using a sketch to check the range.
- Find f⁻¹(k) by solving f(x) = k, by hand or with a GDC.
- Sketch the graph of f⁻¹ by reflecting the graph of f in y = x.
- State the domain and range of f⁻¹ from the range and domain of f.
- Explain why a function has no inverse, and restrict its domain so that it has one.
- State a suitable domain for a model and interpret its values and constants in context.
In the exam. everywhere, because every later topic is written in function notation. Directly, in short Paper 1 questions (find the domain, the range, , , the domain of ; sketch ) and in the opening parts of Paper 2 modelling questions, where the context sets the domain and a constant must be explained in words. 2.5 then finds inverses algebraically.
1What makes a rule a function
A relation is any pairing of inputs with outputs. A function is a relation with one extra promise: each input is paired with exactly one output.
Figure 1 shows the difference with arrow diagrams, which the guide calls mappings.
- Panel (a). The rule is "square it". Both and go to . That is allowed: two inputs may share an output. This is called many-to-one. Each input still has only one arrow leaving it.
- Panel (b). The rule is "take the square root, positive or negative". The input has two arrows, to and to . That is one-to-many. It is not a function, because "the output for " does not name one number.
A third kind, one-to-one, is in section 8.
- On a graph the same test becomes the vertical line test, as Figure 2 shows. Every vertical line is one value of . If any vertical line crosses the graph more than once, that has more than one . The graph is not a function.
- Example: the parabola passes. The circle fails, because the line meets it twice.
The same check works on a list of pairs. Look for a first coordinate that appears twice with different partners.
- is a function, since each first coordinate appears once.
- is not, since the input has two outputs.
2Function notation
- Function notation names the function and its input together. is read "f of x". It means "the output of when the input is ".
- The letters change with the context. is a velocity at time . is the cost of items.
- The IB also uses mapping notation, . It reads "g maps x to " and means the same as .
- The input is the independent variable: you choose it. The output is the dependent variable: it depends on your choice. On a graph the input goes across and the output goes up, so . The output is also called the image of .
From a rule. Evaluating means substituting the input everywhere appears, in brackets, so signs survive. Take .
Solving runs the other way: you are given an output and asked for the input or inputs.
- Two inputs give the output . That is fine for a function, but it matters in section 8.
- Keep the two apart: asks for an output; asks for an input.
From a set of pairs or a table. is the second number in the pair whose first number is , or the entry under . Here is a table for a function .
| 0 | 2 | 3 | 5 | ||
|---|---|---|---|---|---|
| 3 | 2 | 5 | 7 |
- Then .
- A nested value is worked from the inside out. is , because , and .
- Reading goes the other way, bottom row first: .
From a graph
- is the height of the curve above .
- asks where the curve is at height . Draw a horizontal line at and read the -values where it meets the curve (none, one or several).
3Domain: which inputs are allowed
The domain of a function is the set of inputs it is defined for. Unless a question says otherwise, the exam takes the largest possible domain, usually all real numbers, . You only restrict it when something would break.
At this level three things break a rule for real numbers:
- Dividing by zero. is undefined when . Domain: , .
- The square root (or any even root) of a negative number. needs , so the domain is .
- The logarithm of zero or a negative number. needs , so . You meet this properly in 2.9.
Combine them when they appear together.
- : the root needs and the division needs . So , and the domain is , with a strict inequality.
- : both conditions hold at once, and .
- The guide's own example is . The expression under the root must not be negative: , so the domain is .
- Figure 3 shows it. The graph starts at and runs away to the left forever. Along the x-axis, that is exactly .
Ways to write a domain.
- Inequalities in , like or , are the plainest.
- Set notation says the same thing: , or , .
- Interval notation. The IB writes it with square brackets only. A bracket facing the number includes that end. A bracket turned away excludes it. An infinite end is always excluded.
- The guide's notation list gives for and for . So is , is , and , is .
- Round brackets at an excluded end, as in , mean the same and are accepted too. Use whichever form you can write without slips.
A function is a rule together with its domain. When a question states the domain, as in for , use that one even if the rule would accept more.
- When the function is a set of pairs or a table, the domain is just the list of inputs, each written once. has domain .
- Such a domain is discrete: separate values with nothing between. An interval is continuous.
Reading a domain from a drawn graph
- Follow the curve left to right. A filled dot means the end point is included. An open dot means it is not. An arrowhead means the graph carries on.
- Example: a graph begins at a filled dot at , peaks at and ends at an open dot at . Its domain is .
4Range: which outputs you get
The range is the set of outputs the function actually produces from its domain. It is written in terms of the output: , or , or in interval notation . A graph helps: look at how far it reaches up and down.
- For in Figure 3, the square root is never negative. It equals when , and it grows without limit as runs left. So the range is .
- For the drawn graph of section 3, the highest output is . After the peak the curve falls through every height down to, but not including, . The start height lies inside that stretch. The range is .
A square pushed up. for every , so . The range of is , reached where the square is zero.
A quadratic, from its vertex
- for . A quadratic is lowest or highest at its vertex, so find that first.
- Completing the square gives , so the vertex is . The parabola opens upwards, so .
- A negative coefficient, as in , makes the vertex the highest point. , so . On the GDC, read the minimum or maximum point.
A line on a restricted domain. for . The gradient is negative, so is highest at the left end and lowest at the right. and , so the range is .
A curve on a restricted domain
- for . The end points give and . Writing is wrong.
- Figure 4 shows why: the curve dips to its vertex at inside the domain. The range is .
Find a range from the graph, not from the end points. Sketch it, or look at it on your GDC, and read off the lowest and the highest outputs, including any turning point inside the domain.
An open end. for . On the curve only rises, so the outputs run from to . The input is excluded, so the output is never reached. The range is .
One value missing
- . The domain is .
- A fraction with a top of is never zero. So has no solution, and the graph gets as close to the x-axis as you like without touching it.
- The range is , written in interval notation as . A range does not have to be one unbroken stretch.
A finite set. For the range is the list of second numbers, each written once: . The repeated is listed one time.
5A function as a model
- The guide treats a function as a mathematical model: a rule that describes a real quantity. The context sets the domain, and that is often smaller than the domain the algebra allows.
- Example: a ball is thrown straight up from the ground. Its height in metres after seconds is .
- The formula works for any . The ball does not. It leaves the ground at and lands when again.
- So a sensible domain is . The highest point is at , where . So the range in context is .
- Figure 5 shows the model and the part of the curve that means nothing.
- A count of items only makes sense for whole numbers. So the domain is discrete, , , and the range is a list of separate values.
- A "suitable domain" answer needs the context's reason.
Saying what values mean. Models also come with "what does this represent?" questions.
Example: a water tank is being emptied by a pump. The litres left after minutes are modelled by , for .
- The is the gradient: the tank loses 12 litres every minute.
- The is , the volume in litres at the start, before the pump has run.
- : after 10 minutes 360 litres remain (input given, output asked for).
- means "after how many minutes are 300 litres left?". Solve , so . That is an output given, an input asked for.
- The tank is empty at , so the domain is and the range .
Name the quantity and its unit: "the amount" alone is too vague.
6The inverse: undoing a function
An inverse function reverses the effect of a function. If takes to , then takes back to .
means exactly the same as .
- A booth pays euros for dollars handed in. You multiply by , then take off a -euro fee.
- To undo it, do the opposite operations in the opposite order: add , then divide by . So turns euros received back into dollars handed in.
- Doing one and then the other returns what you started with: .
- A temperature conversion works the same way. An invented scale reads for degrees Celsius. The inverse subtracts , then halves: .
- This gives the guide's key link: solving is the same as finding . You do not need a formula for to find one value of it.
- Example: a customer walks away with 30 euros.
- On Paper 2, for a function you cannot rearrange easily, the GDC does it. To find for , solve . Use the equation solver, or intersect with . This gives (3 s.f.), so .
- Reading an inverse value off a table works the same way. Suppose is one-to-one and is given by
| 0 | 2 | 5 | ||
|---|---|---|---|---|
| 8 | 5 | 1 |
- Then is the input whose output is . Find in the bottom row and read the number above it, so . Likewise .
- This is only unambiguous because no output appears twice.
- An inverse in context. In the tank of section 5, . Its input is a volume and its output a time, so the tank holds 300 litres after 15 minutes.
- One warning about the notation. is the inverse function, not . The is a label, not an exponent.
- Example: for , is , which converts nothing into anything.
- Finding a formula for by algebra is the job of 2.5.
7Only one-to-one functions have inverses
- A function is one-to-one when every output comes from exactly one input: no two inputs share an output. Equivalently, only when .
- Only a one-to-one function has an inverse, because the inverse has to send each output back to a single input. A function where some output is shared is many-to-one.
- On a graph, the check is the horizontal line test. If any horizontal line meets the graph of more than once, is not one-to-one and has no inverse.
- Figure 6 shows what goes wrong otherwise. on all real numbers sends both and to . The horizontal line meets the graph twice. Its reflection in is a sideways curve that fails the vertical line test, so it is not a function.
- To explain why in words, name two different inputs with the same output, such as for . Or say that a horizontal line meets the graph twice.
Checking with algebra.
- For , gives , so : one-to-one.
- For , gives , which allows : not one-to-one.
Quick judgments:
- Slanted lines, and are one-to-one.
- , , any parabola and a horizontal line are many-to-one.
- A function that only ever increases, or only ever decreases, over its domain always passes the horizontal line test. That is the quickest reason to give for why an inverse exists.
- Section 2's had two solutions, so has no inverse on .
Restricting the domain
- The fix for a many-to-one function is to keep only a part of its domain on which it is one-to-one. On alone, is one-to-one, and its inverse is , as panel (b) of Figure 6 shows.
- For a parabola, cut at the vertex. Take , whose vertex is . On all of it has no inverse, since .
- Restrict to . The graph then only rises, and the range is . So the inverse has domain and range .
- The restriction works too, and gives an inverse with range .
8The inverse as a reflection in
If is on the graph of , then , so . The point is on the graph of .
Swapping the coordinates of every point is the same as reflecting the whole graph in the line . So:
The graph of is the reflection of the graph of in the line .
- Figure 7 does it for the guide's function . Take four points on : , , and . Swap each: , , and . Join them with the reflected shape.
- The point lies on the mirror line, so it stays where it is. The inverse here is for , a result 2.5 shows you how to find.
The reflection swaps what you read along the x-axis with what you read up the y-axis. So:
- the domain of is the range of , and
- the range of is the domain of .
In Figure 7, the range of is , so the domain of is . That is where the "" in comes from. Without it, would be a whole parabola.
The range of is the domain of , which is . So the range of is .
A swap works for end points too. If is one-to-one with domain and range , then has domain and range . No formula is needed.
To sketch an inverse in the exam:
- Draw the line lightly.
- Pick three or four clear points on , including any intercepts and end points.
- Swap their coordinates and join them with the mirror-image shape.
An x-intercept on becomes a y-intercept on , and the other way round. If has an asymptote , has the asymptote . Keep the same scale on both axes so the two graphs look like mirror images.
- A worked case. Let for , one-to-one because the domain starts at the vertex.
- Points on : , , , . Swapped, they lie on : , , , .
- The x-intercept has become the y-intercept , and the y-intercept the x-intercept .
- The range of is , so has domain and range : the upper half of a sideways parabola.
9HLSelf-inverse functions
This is AHL 2.14, taught in full in that unit. It sits here because it follows straight from the reflection.
Some functions are their own inverse: , so . Their graphs are symmetric about .
- Every line of gradient , , is one.
- So is every , . Applying it twice gives .
Practice questions
58 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.