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.
|f(x) = 3x|
|f(x) = 2x, x > 0|
|f(x) = (2x + 1) / x|
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.
|f(x) = 2|
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.