Hey, everyone. So up to this point, we've spent a lot of time talking about graphs. And in this video, we're going to see if we can apply this concept of graphs to this new topic of relations and functions. Now, this topic is often considered confusing when students initially encounter it. But throughout this video, we're going to be going over a lot of different scenarios and examples to see if we can really clear up some of this confusion around this subject. So let's get right into this.

Relations are a connection between X and Y values and graphically they are represented as ordered pairs. Now, functions are a special kind of relation where each input has at most one output, and it's important to note that all functions are relations, but not all relations are functions. So, to understand this a little bit better, let's take a look at this example that we have down here. We have these two graphs of relations and we want to see if we can determine whether these are also examples of functions.

We'll start with this graph on the left, and what I'm going to do is write out all of the inputs which correspond to all of the x values. So I'll do this in ascending order so first I see that we have an x value of negative 2. I also see that we have an x value of positive one and even though it shows up twice here, it's perfectly okay to only write it once in this bubble down here. Now lastly, I see that we have an x value of 3. These are all of the inputs that we have.

Now the outputs are going to correspond to the y values, and I'll list all of these out as well. So I see that we have positive 2, I see that we have 4, we also have 1, and then we have negative 2. So these are all of the inputs and outputs. Now looking at these points, I see that negative 2 is related to positive 2. I see that positive one is related to 4 and I also see that one is related to 1. Lastly, I see that we have this point which says 3 is related to negative 2. Now based off this relation that we see, can we conclude whether or not it's a function? Well, recall that we set up here for a relation to be a function, each input can have at most one output. If I look at each of our inputs, I can see that there is an input that has more than one output. And as soon as this happens, you can automatically conclude that this is not an example of a function.

But let's take a look at this other example for this graph on the right. So what I'm going to do with this graph is I'm going to list out all of the inputs in ascending order like we did before. So this will be all the x values, so I see that we have negative 4, I see that we have negative 2, I see that we have 1, and then we have 3. Now what I'm also going to do is list out all of the outputs, which correspond to all the y values. So I see that we have positive 2, I see that we have negative 1, and I also see that we have positive 2 up here but since we already wrote positive 2 once we don't have to write it again. So we have positive 2, and then we have positive 4. So these are all of the outputs.

Now looking at how these are related I can see that negative 4 is related to positive 2. I see that negative 2 is related to negative 1, and I see that positive 1 is related to positive 2, and then I see that we have that positive 3 is related to positive 4. Now given this information, can we conclude whether or not this is a function? Well, we need to see if any of the inputs have more than 1 output, and if I look at this, each of these inputs only goes to one output, and because of this, we would say this is an example of a function.

So this is how you can tell whether or not a relation is a function, but you may have noticed this process was a bit tedious, having to write out all the inputs and outputs like this. Well, you may be happy to know there is a shortcut to solving these problems, and the shortcut is called the vertical line test. This states that if you can draw any vertical line that passes through more than one point on your graph, then the graph is not going to be a function. So let's try this vertical line test on the two graphs we had up here. I'll take vertical lines and I'll draw them through every point that I see on the graph, and let me draw this vertical line a bit better. So if I draw these vertical lines, I notice that there is a place where the vertical line passes through more than one point. If this ever happens, then it's not a function.

But let's try the vertical line test on this other graph. If I draw vertical lines through each of the points that I see I noticed that no matter where I draw a vertical line, I'm only ever going to pass through one point at most. And because of this, we would say that this is an example of a function. Now let's take a look at a couple more examples because you could also use the vertical line tests on graphs like this. If I tried drawing some vertical lines for this graph on the left, I notice that we will have some vertical lines that pass through more than one point. And because of this, we can conclude that this is not an example of a function. But if I try the same vertical line test on the other graph that we have over here, notice that no matter where I draw a vertical line, we're only ever going to pass through one point at most, and because of this, we can conclude that this graph is an example of a function. So that's the basic idea of relations and functions. Hopefully this helped you out and let me know if you have any questions.