What Is Domain and Range in a Function?
The domain and range are the possible outputs and inputs of a function. In this lesson, learn about what might restrict the domain and how to figure out the domain and range from a graph.
Enjoy More Slurp
Earlier, we talked about how a function is like a soda machine. By putting in different combinations of money (the inputs), you can get out different kinds of soda (the outputs). Mathematical functions are basically the same. You can input different numbers, and you get new numbers back out. But there is one aspect of functions that hasn't been talked about yet: domain and range.
Let's think about this in terms of the soda machine. There are different kinds of ways you can pay for your soda. You can use dimes, quarters, one dollar bills and some machines will even let you use your credit or debit card now. But what happens if you try to use a penny? To be honest, I'm not actually sure. I'd guess that it either spits it back out at you or just steals it and doesn't count it towards your soda. Either way, pennies don't work in the machine. That means that the domain of this soda machine is only {dimes, quarters, one dollar bills, credit cards and debit cards}. These are the possible inputs - the only things that will work in the machine.
But along with there being a limited number of things you can put into the machine, there are also a limited number of things you might get back out. No matter how you pay, there is no way you are going to get a cheeseburger back out of that machine! Let's say that the only possible soda's you can get from this machine are regular, diet and lemon-lime. That makes these three things, the range. The range of any function is the collection of possible outputs. Now that we've got an idea of what the domain and range are, let's go ahead and take a look at some real mathematical functions.
Domain & Range from Values Alone
The domain and range values for the function
We'll start with an easy, simple function like this one: f(x) = (5,-2) (3,9) (-1, 9) (4,1). This function doesn't have a rule; it's simply a collection of input and output values. For example, it tells us that when you input 5, you get -2, or when you plug in 4 you get 1.
So, what is the domain of this function? Another way of asking that question is: what are the possible input values? Well there are only a couple: 5, 3, 4 and -1. That's it! What about the range? This is the same as asking what the possible outputs are. In this case, that happens to be only -2, 9 and 1. Although two different inputs both give you 9, you don't have to list it twice when writing out the range.
Graph Squishing to Find Domain & Range
We can up the difficulty a little bit by asking to determine the domain and range from a graph, maybe this one. Now, when we are thinking about the domain (or the inputs), we need to look for the x-values on this graph. Is there anywhere on the x-axis that this graph does not go? I usually answer this question by imagining the whole graph being squished down onto the x-axis, maybe like this. Now the question becomes: what parts of the axis have squished bits of the graph on it? Well assuming that this graph would continue on forever to the left and forever to the right, it looks like the whole thing has squished graph on it. This means that the domain of the function is everything, or all the real numbers.
To find the range, we'll do a pretty similar thing. Except, this time, we're concerned with the output values - the y-axis. That means we squish the graph this way, and again, look to see where the graph ended up. Now though, the entire axis is not covered. It's only covered right in this area, the middle, between -1 and +1. That means that the range is not all the real numbers, and is only the values of y contained between -1 and +1.