- Inverse functions
- Inequalities · coming soon
- Completing the square
- Translations of graphs
- What is a logarithm
- Partial fractions · coming soon
An output that no input can reach
In the last lecture we found the inverse of this function:
Its inverse was . At the end, we noticed something strange. The input 2 is not allowed in , because it makes the bottom zero. This means that never gives the output 2. The last lecture promised to explain why. Here is the explanation.
Try to make give 2. Set and solve:
The equation ends in something false. No value of makes it true. So there is no input that gives the output 2.
Now put into . The bottom becomes 0, and has no answer. So 3 cannot go in at all.
So this one function has a number that cannot go in, and a number that cannot come out. Not every number can go into every function, and not every answer can come out. This lecture is about how to find both.
Two questions to ask of every function
The domain of a function is the set of all inputs it is allowed to take.
The range of a function is the set of all outputs it can actually give, when the inputs come from the domain.
We need one piece of notation first. All the numbers on the number line are called the real numbers. This includes fractions and numbers like . The set of real numbers is written . The symbol means "is a member of". So is read "x is a real number".
For , any real number can go in. The domain is . For above, every real number except 3 can go in. We write the domain as .
What can go in: find what breaks the function
The domain question has a reliable method. Start with every real number. Then ask: which inputs would break this function? Remove those, and what is left is the domain.
At this level, two operations can break a function.
Dividing by zero. Division by zero has no answer. The statement means . So would have to be a number that gives 7 when multiplied by 0. But every number multiplied by 0 gives 0. No number works, so has no answer. This means that any input that makes a denominator zero must be removed from the domain.
The square root of a negative number. Every real number squared gives 0 or a positive number. So no real number squares to give . This means that is not a real number. Any input that makes the number under a square root negative must be removed.
For , we need , so the domain is . The input 3 is allowed, because .
The largest domain a formula can have, with only the breaking inputs removed, is called its natural domain. When a question asks for "the domain" without saying more, it means the natural domain.
A domain can also be chosen on purpose. A distance cannot be negative, so its sensible domain is . In the last lecture, we restricted to so that it would have an inverse. The domain is part of the function. The same formula with a different domain is a different function.
What is the domain of ? Is it the same as the domain of ?
Show the answer
No. Here both breaking operations appear. The square root needs , so . But the square root is now on the bottom of a fraction, so it must not be zero either. At , the bottom is , and has no answer. So 3 must be removed as well. The domain is , with a strict inequality. Check each breaking operation separately. Do not stop after the first one.
Solving for a domain often means solving an inequality. That is where the most common mistake in this topic lives. Find it in the working below.
A student finds the domain of g(x) = √(6 − 3x). One line is wrong. Tap the line you think is wrong.
A student's working for the domain of g(x) = √(6 − 3x), with the error marked.
1. The number under the root must be 0 or more: 6 − 3x ≥ 0. Correct.
2. Subtract 6 from both sides: −3x ≥ −6. Correct.
3. Divide both sides by −3: x ≥ 2. This is the error. Dividing by a negative number reverses the inequality, so the line should be x ≤ 2.
4. So the domain is x ≥ 2. This follows from the wrong line.
5. Check: x = 2 gives √0 = 0, which is allowed. True, but this check cannot find the error. Test a value inside the claimed domain: x = 3 gives √(−3), which is not real.
The correct domain is x ≤ 2.
Two lessons come from that working. Dividing an inequality by a negative number reverses it. And a good check tests a value inside your answer, because a boundary value often agrees with a wrong answer.
What can come out: the shadow of the graph
Here is the picture to hold in your mind. Plot the graph of the function. Then imagine a light shining from the side, so that the graph casts a shadow onto the -axis. The shadow is the range. Every height the graph reaches is an output, and every output is a height the graph reaches.
Take , for . The lowest point of its graph is the vertex . From there, the graph rises forever on both sides. So the shadow starts at 1 and goes up without end. The range is .
The range describes outputs, so it uses or , never . It cannot include 0, because is never negative, so is never less than 1.
The shadow also explains the hook. Look at the graph of .
The graph's shadow on the -axis covers every height except 2. The algebra shows why. Write the top as , which equals . Then:
A fraction with 7 on top can never be zero, so is never 0. This means that is never exactly 2. When is very large, the fraction is tiny, so is very close to 2. That is why the graph creeps towards the line . A line that a graph comes closer and closer to, without reaching it, is called an asymptote. The range of is .
The range depends on the domain
Change the domain, and the range can change too. This is where most range mistakes are made, so spend time here.
, with domain . The end values are and . Is the range ?
Show the answer
No. The domain includes , and . So 0 is an output, and it is smaller than 1. The graph dips down to its vertex at the origin, between the two ends. The lowest output is 0 and the highest is 9, so the range is . The end values of the domain do not always give the ends of the range. A turning point inside the domain can go lower or higher than both ends.
Explore this below. Choose a function and move the two ends of its domain. The teal band on the right is the range: the shadow of the teal part of the graph.
Choose a function. Move the left end and the right end of the domain. Watch the teal band: it is the range. When is the lowest output not at an end of the domain?
The graph of with domain . The end values are and . But the vertex is inside the domain, so the lowest output is . The range, marked by the teal band, is .
| Function and domain | End values | Range |
|---|---|---|
| x² − 2x, −1 ≤ x ≤ 4 | 3 and 8 | −1 ≤ f(x) ≤ 8 (vertex inside) |
| x² − 2x, 2 ≤ x ≤ 4 | 0 and 8 | 0 ≤ f(x) ≤ 8 (vertex outside) |
| 3 − x, −1 ≤ x ≤ 4 | 4 and −1 | −1 ≤ f(x) ≤ 4 (the left end gives the top) |
| √(x + 1), −2 ≤ x ≤ 3 | −2 is not allowed | 0 ≤ f(x) ≤ 2 (domain starts at −1) |
What should you have seen? For , the range reaches down to whenever the domain contains the vertex. For , the left end gives the top. For , the domain cannot go below . The safe method is always the same: find the end values and any turning point inside the domain, then take the lowest and the highest.
Domain and range swap places in an inverse
Now the full answer to the hook. An inverse exchanges inputs and outputs. If , then . So every output of is an input of , and every input of is an output of .
The domain of is the range of . The range of is the domain of .
Check it on . The domain of is , and its range is . The inverse has domain , which is the range of . Its outputs never equal 3, which is the domain of . Write and you can see it. That is it. That is the whole reason never gives 2: the number 2 is exactly the input its inverse cannot accept.
This gives you a second way to find a range. Solve for , as you do when finding an inverse. The values of for which the equation has a solution make up the range. In the hook, the equation had no solution, so 2 is not in the range.
The composite lecture promised that this lecture would find exactly which inputs a composite can accept. In , the outputs of become the inputs of . So is allowed only if is in the domain of and is in the domain of . Worked Example 5 shows this.
Worked examples
Find the domain of .
The only danger is dividing by zero. So find the inputs that make the bottom zero: , so , so or . Both values must be removed. Do not lose : too.
The domain is .
Check: at , the bottom is . ✓ And , so 1 is allowed. ✓
Find the domain and range of .
The number under the root must be 0 or more: . To avoid dividing by a negative number, add to both sides instead: . Then divide by 2: . The domain is .
For the range, think about what the root can give. At , . As gets smaller, grows without limit, so the root grows without limit too. A square root is never negative. So the range is .
Check: is inside the domain, and . ✓ is outside, and , not real. ✓
Find the range of , for .
The range of a quadratic is decided by its vertex, so find the vertex by completing the square: .
A square is never negative, so . This means that . The value 2 is reached when . Every value above 2 is reached, because the parabola rises forever.
The range is .
Check: . ✓ , which is at least 2. ✓
, with domain . Find the range.
Complete the square: . The vertex is . Is it inside the domain? Yes, because . So the lowest output is .
Now the end values: and . The highest output is the larger end value, 6.
The range is .
Check: . ✓ The end values alone would have given , which misses the vertex.
, for , and , for . Find the domains of and .
In , the function acts first. Any can go into . But the output must be an allowed input of , so , which gives . So , with domain .
In , the function acts first, so must be 0 or more. Every output of can go into , because accepts all real numbers. So , with domain .
Check: works in : . ✓ But in , gives and then , which is not real. ✓ The order of composition changes the domain, not only the formula.
Three classic mistakes
For with domain , the range is not . The vertex inside the domain gives 0. Always ask whether a turning point lies inside the domain.
From , dividing by gives , not . Dividing or multiplying an inequality by a negative number reverses it. You can avoid the danger completely: add to both sides first, to get , and then divide by 3.
For , writing the range as "" is wrong. That would describe inputs. The range describes outputs, so write or . Keep the letters clear: for what goes in, for what comes out.
Work each one on paper first. Open a hint only when you are stuck.
-
Find the domain and the range of .
Hint 1
The number under the root must be 0 or more.
Hint 2
Solve . For the range, find the output at the start of the domain, and ask what happens as grows.
Full answer
Domain: , so . Range: at , . As grows, grows without limit, and so does its root. A square root is never negative. So the range is . Check: , which is at least 0. ✓ is not real, and is outside the domain. ✓
-
Find the range of , for . Which input gives the smallest output?
Hint 1
Complete the square to find the vertex.
Hint 2
.
Full answer
. Since , we have . The smallest output, , comes from . The range is . Check: . ✓ , which is at least . ✓
-
. Find its domain. Then show that its range is , in two ways: by rewriting the formula, and by finding the domain of .
Hint 1
Write the top as , then split the fraction.
Hint 2
For the inverse: write , swap, multiply by , collect the terms and factorise.
Full answer
Domain: the bottom is zero at , so the domain is .
First way: . The fraction is never 0, so is never 1.
Second way: swap to get . Then , so , so , and . Its domain is . The domain of is the range of , so the range is .
Check: , and . ✓ Both ways agree.
-
Wei has 20 m of fencing to make a rectangular pen against a long wall. The wall forms one side, so the fence makes the other three sides. The two sides that meet the wall are each m long. Write the area in m², give a sensible domain, and find the range.
Hint 1
The side parallel to the wall uses the fencing that is left: m. Every length must be more than 0.
Hint 2
. Complete the square: take out first.
Full answer
The side parallel to the wall is m, so .
Domain: the width must be more than 0, and the length must be more than 0, so . The sensible domain is . The formula works for other numbers, but the situation decides the domain.
Range: . The squared part is never negative, so , with 50 m² when . At the ends of the domain the area approaches 0 but never reaches it, because and are not allowed. So the range is .
Check: . ✓ , which is between 0 and 50. ✓ The best pen is 5 m by 10 m.
A function is not only a formula. It is a formula together with its domain. Change the domain and you change the function: its range, whether it has an inverse, and which other functions can follow it. This is why the restricted in the last lecture had an inverse when the full did not.
The same idea runs through every subject that uses functions. A formula for the height of a thrown ball is only true while the ball is in the air. A quantity sold cannot be negative. Later, the logarithm will have its own forbidden inputs, and its inverse will show you why. Asking "what can go in, and what can come out?" finds the edges of any model of the world.
- The domain is the set of allowed inputs, and the range is the set of outputs the function can actually give from that domain.
- To find a natural domain, start with every real number and remove the inputs that would divide by zero or take the square root of a negative number.
- The range is the shadow of the graph on the -axis, and it is written in terms of or , never .
- On a restricted domain, the range comes from the end values and any turning point inside the domain.
- The domain of is the range of , and the range of is the domain of .
- An input is allowed in only if it is allowed in and its output is allowed in .