What Are the Domain and Range of a Function?

What are the domain and range of a function? What does the vertical line test for functions tell you? And what's the best way to picture the meaning of a function in the first place? Keep on reading to find out!

Jason Marshall, PhD
5-minute read
Episode #187

FunctionsIn our first episode on functions, we learned that you can think of a function as a sort of machine that's fed input and in return gives back a unique output based upon some relationship. Simple, right? Well, sort of. Because as we'll see today, there are few additional details about functions that you need to keep in mind.

Of particular note is the extremely important detail that we mentioned last time: A function is only a function if it provides one-and-only-one output for every possible input. Which is an idea that's very closely related to what are called the domain and range of the function. What exactly do these terms mean?

Stay tuned because that's exactly what we'll be talking about today.


How to Picture Functions

Before we tackle the idea of the domain and range of a function, we first need to spend a few minutes talking about how to picture what any particular function does. One way is to simply plug a few numbers into the function and see what output it gives you. But that sort of one-at-a-time process is hard to keep track of.

So let's try to improve upon this idea by coming up with a way to see what a function does for every possible piece of input all at once. How? Well, one way is to start feeding the function numbers one-by-one and making a table of the results. For example, if we do this for the functions y(x) = x and y(x) = x2, we get

Function Value Table

If we’re really ambitious, we could continue doing this on up to higher and higher values of x…or maybe we choose to start plugging in negative values of x, too. While that effort would be noble, it doesn’t really help us understand the bigger picture. In other words, it’s hard to look at a table and get a feel for the overall big-picture behavior of the function.

For example, sometimes it’s helpful to know where a function has negative values, or perhaps you want to know all of the x values where a function is equal to 0, 10, or whatever other number. All of these things are tough to do with a table. Of course, what we really want is a graph:

Function Value Graph

When we look at the graph of a function, we can imagine that it's passed each value of x one-by-one, that it calculates the numerical value of its output for each of these inputs, and finally that it puts these points on the plot. In the example functions shown here, you can see specific output values at input values of x = 0, 1, 2, 3, and 4.

But notice that the values for these individual points are also connected by a line which shows us the output values for all of the “in-between” values of x. Which means that this plot actually gives us a picture of the overall behavior of the function.

Vertical Line Test for Functions

As we've said many times now, a function cannot have more than one output value for the same input value. In other words, in a function like y(x) = x2, every value that you plug in for x gives you back one-and-only-one value for y(x). To see what I mean, let's take a look at the following two plots. One of these plots is a function and the other is not—can you figure out which is which?

Function Vertical Line Test

If you look at the graph on the left, you’ll see that each point on the x-axis corresponds to a single value in the y-direction. Put another way, imagine passing a vertical line back-and-forth over the graph and checking to see if there are any points along the x-direction that have more than one y-value. If there aren't any such points, the relationship is a function. But if there are multiple y-values for a given x-value, the relationship is not a function.

Pop Quiz: Are These Functions?

Quick, test yourself by using the vertical line test to figure out which of the following relationships are functions:

Functions Pop Quiz

You can find the answer at the very end of the episode.

Domain and Range of Functions

So we now know how to picture a function as a graph and how to figure out whether or not something is a function in the first place using the vertical line test. Now it's time to talk about what are called the "domain" and "range" of a function.

As it turns out—and as we alluded to before using less mathematical language—we can’t just feed a function any old input that suits our fancy, we can only give it input that’s in what’s called its domain. What does that mean? Well, the domain of a function is simply a list or a description of all the input or x-values for which the function is defined. Let’s see how this works for the following functions:

Domain and Range of Functions

The function on the left contains 5 values that can be described by the ordered pairs: (1, 5), (2, 3), (3, 1), (4, 3), and (5, 5). Since the domain of a function is the list of all possible x-values that it can have, the domain of this function is just the set of values { 1, 2, 3, 4, 5 }. On the other hand, the set of all possible output values this function can have is called the range of the function. Since this function is only defined at the five points shown, its range must simply be the unique y-values that it can have. In other words, its range is { 1, 3, 5 }.

How about the function in the middle? Well, that function is defined not only at the circled points, but at all the points on the lines connecting the circles, too. Which means that the domain of this function consists of all the points between 1 and 5. Or, using inequalities, we can say that the domain of this function is 1 ≤ x ≤ 5. And its range? Well, since it has values anywhere along the lines, its range is described by 1 ≤ y ≤ 5.

And how about the function on the right? As you can see, this function continues on forever for both larger and larger values of x and for more and more negative values of x. So the domain of the function is the entire set of real numbers. In other words, the domain is every number that you can find on the number line. How about its range? Well, as you can see by looking at the graph, the minimum value of the function is at the point (3, 1), and its value continues to grow forever in either direction. Therefore its range is z ≥ 1.

Pop Quiz: What's the Domain and Range?

To test your new knowledge, use your domain and range finding skills to figure out the domain and range of these functions (because they are all functions, right?):

Domain and Range Pop Quiz

Once again, you can find the answer at the very end of the episode.

Wrap Up

Okay, that's all the math we have time for today.

Please be sure to check out my book The Math Dude’s Quick and Dirty Guide to Algebra. And remember to become a fan of the Math Dude on Facebook where you’ll find lots of great math posted throughout the week. If you’re on Twitter, please follow me there, too.

Until next time, this is Jason Marshall with The Math Dude’s Quick and Dirty Tips to Make Math Easier. Thanks for reading, math fans!

Pop Quiz Solutions

Vertical Line Test

Functions Pop Quiz Solution

Domain and Range

Domain and Range Pop Quiz Solution

Betterment LLC is an SEC Registered Investment Advisor. Brokerage services are offered by Betterment Securities, an SEC registered broker-dealer and member FINRA/SIPC. Investments are not FDIC Insured. No Bank Guarantee. May Lose Value. Investing in securities involves risks, and there is always the potential of losing money when you invest in securities. Before investing, consider your investment objectives and Betterment's charges and expenses. Not an offer, solicitation of an offer, or advice to buy or sell securities in jurisdictions where Betterment and Betterment Securities are not registered.

Functions image from Shutterstock.

About the Author

Jason Marshall, PhD

Jason Marshall is the author of The Math Dude's Quick and Dirty Guide to Algebra. He provides clear explanations of math terms and principles, and his simple tricks for solving basic algebra problems will have even the most math-phobic person looking forward to working out whatever math problem comes their way.

You May Also Like...