A fuel pump display can show any amount from 0.00 to 999.99, yet a pump filling a 50-liter tank at 2 dollars per liter never shows more than 100.00. The display is a container for possible outputs, and the amounts that actually appear form a smaller set. Every function comes with these two sets, and the smaller one answers a practical question. For which numbers does the equation have a solution?
Key terms
Codomain
Definition A function from a set to a set , written , assigns to each element of exactly one element of . The set is the domain of and the set is its codomain. The codomain is chosen as part of the definition of the function, and the only requirement is that every output lies in it. When a real function is given by a formula alone, its domain is the natural domain of the formula and its codomain is taken to be , the set of all real numbers.
In plain words The codomain is the set where the outputs are allowed to land. Think of it as the label on a container, which says what may go inside, not what is actually inside.
Example The rule as a function has codomain , even though no output is negative. The same rule from to is also a valid function, because every square lies in . The same rule from to is not a function at all, since the input has the output , which is outside .
Image
Definition Let be a function. For an element of , the element is called the image of under . For a subset of , the image of is the set of all outputs of inputs from ,
So a number belongs to exactly when for at least one in .
In plain words The image of a number is where the function sends it. The image of a set is everything its inputs reach, with each output listed once, however many inputs share it.
Example Take and . The five inputs have the images , so
This set has only three elements, because and share the image , and and share the image .
Range
Definition The range of a function is the image of its whole domain,
A number is in the range exactly when the equation has at least one solution in the domain . Some older books use the word range for the codomain. Here the range always means the set of outputs that actually occur.
In plain words The range is the set of outputs the function really produces. To test a number , try to solve for an input that is allowed.
Example Let with domain . Solving gives , which has a real solution exactly when . For the solutions are and , so is in the range. For the equation becomes , which has no real solution, so is not. The range is .
Range as a subset of the codomain
Definition For every function the range is a subset of the codomain,
because each output is an element of by definition. The two sets may be equal, or the range may be strictly smaller. A function whose range equals its codomain is called onto, or surjective.
In plain words The codomain is the container and the range is what is actually in it. The container can have room to spare.
Example The function with has range , a proper part of its codomain. A negative number such as is in the codomain but is never an output, since has no real solution. By contrast, the function with is onto, because every real number is the output of the input .
Projection of a graph
Definition The graph of a real function with domain is the set of points with in . Projecting a point onto the -axis keeps only its second coordinate . The range of is the projection of its graph onto the -axis, that is, the set of second coordinates of all points on the graph. Equivalently, a number is in the range exactly when the horizontal line meets the graph at least once. In the same way, the domain is the projection of the graph onto the -axis.
In plain words Slide every point of the graph sideways onto the -axis. The part of the axis that gets covered is the range.
Example The graph of , with domain , is the upper half of the circle of radius centered at the origin. Its heights run from at the ends up to at the top, so its projection onto the -axis is . Algebra confirms the picture. Every value is at least because it is a square root, and at most because . Each in is reached, since is in the domain and
The last step uses .
Attained and unattained bounds
Definition Let have domain . A number is an upper bound of if for every in , and a number is a lower bound of if for every in . A bound is attained if it is itself a value of , that is, it equals for some in , and unattained otherwise. An attained upper bound is the largest element of the range, the maximum value of , and an attained lower bound is the minimum value. The unattained bounds that matter are the ones the values approach. An upper bound is unattained but approached if for every in while for every some in has . Such an is not in the range, and the range has no largest element. Lower bounds that are unattained but approached are defined the same way.
In plain words A range can creep up on a number forever without ever touching it. When the range is an interval, that number is an open end and is written with a parenthesis in interval notation.
Example Consider
Since , every value satisfies . The lower bound is attained at . The upper bound is never reached, yet the values come as close to it as you like.
Solving confirms this. Multiplying by gives . For this says , so is never a value. For it gives
which has a real solution exactly when . The range is . Questions about whether a bound is attained come back in calculus as extreme values.
Effect of a restricted domain
Definition If is a subset of the domain of , the restriction of to is the function with domain and the same rule. Its range is the image , and
Restricting the domain keeps the range the same or makes it smaller, never larger. The new range has to be found from all of , not only from the values at the endpoints of , because the graph can turn around in between, and an endpoint left out of can leave a bound unattained.
In plain words Fewer inputs give at most the same outputs. Cut the graph down to the allowed inputs, then project what is left onto the -axis.
Example The function has a different range on each of these domains.
| Domain | Range |
|---|---|
On the endpoint values are and , yet the range is and not , because the input lies in and gives the output . On the function is increasing, so its values lie in , and each in is reached at . The bound is unattained because the input was left out.
Check yourself
- Find the range of the function below on its natural domain.
Show the answer
The natural domain is all . Solving gives
For this has the solution
which is never , since setting it equal to leads to , that is . For the equation becomes , with no solution. The range is .
- The function is given by . Name its codomain, find its range, and say whether is onto.
Show the answer
The codomain is . Every value is at least , and . For in the distance from to is at most , so every value is at most , and . The endpoint value is neither the smallest nor the largest value. Each in is reached at , which lies in . So the range is , and is not onto, since a number such as is never an output.
- Find the range of on and say which bounds are attained.
Show the answer
For we have , so . The lower bound is attained at . Each in is reached at , which is at least . The upper bound is never attained, because . The range is .