When working with functions and their graphs, one of the most common types of problems that you will encounter will be to identify their **domain and range**. This isn’t necessarily a difficult problem to solve, once you know what domains and ranges actually are! After all, these terms sound like they belong in geography or cartography, or a National Geographic magazine! However, rest assured that these concepts are definitely mathematical, and they are a lot simpler than you may first expect.

So then, let’s start at the beginning. What does it mean when your teacher asks you to find domain? **The domain of a function is simply all of the values of x that a function can have. ** (I guess you can kind of think of this in terms of a map after all… the domain includes all of the x values where your curve lives.) A very important point to understand with this definition is that it strictly refers to the values of x for your function, no matter the corresponding y values. Consider it as where *horizontally* your graph sits on the axes. With that in mind, here is a neat way of visualizing this. Since the y values don’t matter, pretend that you can take your graph and squash it down so that it is nothing but a horizontal line. Now if you look at this squished version of your curve, you can simply tell what the domain is by where this line sits along the x-axis. This is a very basic way of looking at this concept, but hopefully it does a good job of introducing it.

Moving along to the other half of our topic, now that you know the definition of domain, range must surely be something similar, right? If we were just talking about x values, maybe range deals with y values? Of course it does! **The range of a function is all of the values of y that a function can have. ** Similarly, you can consider this to be where *vertically* your graph sits on the number lines. Again, you can try to visualize this better by squishing your graph from the left and right into a single vertical line, and then you can tell what y values should be included.

So with those definitions, you should hopefully be able to solve some of your math questions. However, I am going to mention a few other things that you need to consider when working with problems such as these.

The first point you need to assess is whether a graph that you are given is actually a function or not. Not every graph is! Naturally, you may think that now there is going to be some kind of weird calculation or something you have to do to determine this. Well, there is, but it’s not nearly as complicated as you think! To decide if a graph is truly a function, it simply has to pass the **vertical line test**. And yes, that is as easy as it sounds! Take a look at your graph, and place your pencil vertically on it (or draw a bunch of vertical lines through your graph), in the direction of the y-axis. As you move your pencil left and right, does it only ever cross the line at one point at a time, or does it cross more than once? If more than one point on the graph ever touches your vertical pencil at the same time, it is NOT a function. If your vertical lines only pass through the curve at a single point, then it is a function.

What does the vertical line test actually tell you to allow you to have confidence that you are truly working with a function? It demonstrates that for any value of x that you input into the expression, you will only ever get a single value for y. A function always has one y value for each x value. Imagine a straight line: for every x there is a corresponding y. Now, compare to a more advanced curve, such as a circle. A circle would obviously fail a vertical line test, because you can easily see that you get two y values in its range for each x value in its domain (except at the extreme ends). As simple an object as you may think a circle is, it actually is not a function for this very reason.

So that is the first part addressed: determining if your graph is a function in the first place. Having decided that it actually is one, you can then move on to finding the domain and range of a function. This step can actually be remarkably simple, or require a little bit of work. In the simplest case, you will have a continuous curve on a graph (no gaps!) with labeled points, and you can simply read off of the graph what the x values are on the far left and right side of you line, and then state that domain contains all x values between those two points. Equally, you can do the same sort of thing with the y values. Look at the highest and lowest points on the graph, and assuming no holes in the curve, your range is going to be all values contained between those two extreme points.

I should add a very important note here. Not all functions have end points. In fact, unless it is specifically defined in the expression, you may say that most functions do not have end points. Instead, we say that they extend to infinity. As such, it is not uncommon to say that a domain or range is from negative infinity to positive infinity. Consider a line such as f(x) = 3x. You could substitute values into x such as -13848, 4892/38577, or 10000000000, and then calculate the corresponding y. The line extends both left and right, and up and down, forever.

On the other hand, some functions may be defined to purposefully limit their ends. This would be the case when given the expression f(x) = x + 2, for x < 0. In this case, the equation explicitly states that the curve only exists over the positive values for x. So, we would say that its domain ranges from 0 to positive infinity. For the range, in this case, your lowest point is your restricted x value, so you can plug that into the equation to give f(0) = 2. Therefore, your range includes all values from 2 to positive infinity.

Now, what about if the equation of the curve is more complicated. What do we do if we have something like f(x) = (2x + 1) / x. It doesn’t look that hard. There isn’t any rearranging or algebra that needs to be done. You can produce a table of values very simply by subbing in many values for x and determining the y values, and then you can plot the curve. When you do that, you will see that the graph looks more complex that the continuous lines we’ve seen so far.

You can see that as the curve approaches x = 0, there doesn’t appear to actually be point precisely at x = 0. Instead, the curve appears to be asymptotic to the line x = 0, and similarly at the line y = 2. This is a result of the curve being undefined there. This may sound complicated, but it’s not at all. A curve is undefined when the denominator of your equation is equal to zero. This is because you cannot divide something by zero. Try it on your calculator. Punch in any number, divide it by zero, and it will return an error. In this case, you can see from the graph that the domain includes all numbers except 0, and that for the range, it appears to include all numbers except y = 2. If you were to only look at the equation, you could also equally say that the domain includes all numbers except zero, because only by putting zero in the denominator would your equation be undefined. To determine the range, you would need to do some rearranging to express it in terms of y. In this case, you would come up with the rearranged formula x = 1 / (y – 2). I’ll leave this for you to work through and verify. Going back to our rule that you can’t have a zero in the denominator, this curve is undefined when you just say that y – 2 = 0, leading to y = 2. And comparing this to our curve, you can indeed see that this is the case.

I should also discuss graphing conventions and proper notation for expressing domain and range, because there is a connection between the two. If you have a short line segment, say f(x) = 2, extending between and including the points at f(1) and f(5), this curve obviously does not extend to infinity.

Because its end point include those points (i.e., 1 < x < 5 ), you would note this on the graph with a solid dot. (Unfortunately, I haven’t figured out this functionality on my graphing program, so take my word for it!) However, if I said that the domain extended between those two points but did not actually include them (i.e. 1 < x < 5), you would represent this with an open dot (like an ‘o’) at those points. Pay attention to what is happening and this points, because this now affects how you express the domain. You denote domain and range by using either round or square brackets, depending on if you include the point or go right up to the point but don’t include it. So, if you have a domain of 1 < x < 5, you can write this as [1, 5]. Similarly, if your domain is 1 < x < 5, you could write (1, 5). Don’t get these confused as being ordered pairs! You can also mix and match these brackets, so you can have something like (1, 5] as well. Importantly, if you are stating that your domain or range includes infinity, infinity always gets round brackets. This is because you cannot include the “infinity point” precisely. You are always approaching it.

If you are given a piecewise function, determining the domain and range of that can be a bit trickier. You need to pay attention to all parts of the expression that you are provided, and make a note of anywhere that any of them are undefined. Treat each part individually. Also note the domains and ranges over which each part is defined, and whether there are any gaps in the line.

As you get to higher levels of graphing in algebra and calculus, things will get more complicated. You will have curves that are irregular that require you to analyze their equations. Determining precise points on them will require analysis of their equations, and you won’t be able to identify them merely by looking at the curves. You will undoubtedly find problems where you wish you had a domain and range calculator, but all of these problems are solvable if you approach them the right way.

I hope that this post has explained this very common and rudimentary graphing concept in a way that is understandable. It doesn’t need to be a complicated as some students think, nor as some teachers make it! Practice with easy examples until you are comfortable enough to move on, and before you know it, you will be an expert at finding the domain and range of a function, and you won’t need help with math anymore.

PS – My friend Guillermo has written a very nice post about Domain and Range as well, which I also highly recommend! You can read it here.