Let's talk about functions. First of all, we need to know what a function is. A function is any ordered pair that has exactly one output for each input.
In other words, every x can only have one y. Let me repeat that. Every x, or input, can only have one y, or output. So in our first example here, I can take this x, input, and map it over here to this output of a.
And I can take the y and take it over to the output of b and they're related. The z is related to the output of c. Once we do a function, the output becomes c. Every input has only one output that it is related to.
So this is what we call a function. Let me show you another example of a function. Here our input is our city and our output is our area code.
And if I had the city Grand Rapids, its area code is 616, so it maps over here to 616. Spring Lake, where I live, also has an area code of 616, but Muskegon has an area code of 231. Now I had three different inputs and only two outputs, but each input had only one output that it went to. Grand Rapids and Spring Lake had the same output, but Grand Rapids only had one output. and Spring Lake only had one output. This makes this a function.
Now let's look at an example that's not a function. If I look at this t table, I can see that I have these ordered pairs that are listed. And negative 2, then the input would go to negative 1, but this negative 2 also goes to 2. This one input has two different outputs. 0 goes to 5, that one is just 1, and this input of 3 only goes to 7. But right here we have not a function. It's not a function again because the input of 2 has two different outputs.
Another way we can tell if something is a function or not, if we can look at a table, if every x has a function, we can look at the table. only one y we know we have a function. But what if we just have a graph?
Well we can do what is called the vertical line test because a vertical line test the equation for vertical line is x equal a. That means that all the x's are the same and all the y's are different. If you look at this graph right here of this vertical line you can see that this point right here we might call that 2,0.
Up here we might call this one 2,2. Down here we might call this one 2,2. All the x's are the same and all the y's are different. But this 2 then has, in our case, has three different y's.
It can't be a function. The question says, can a vertical line be a function? No, because the x value or the input value has not exactly 1, it has infinite. But because of this fact, then we can use that as a test.
Because if I can draw a vertical line through my graph and it only crosses it once, well that means that every x right there has only one y. And the x right there has only one y. And the x right there has only one y.
So this is a function. If I look at the next example, if I plug a vertical line in here, I have an x that has two different y values. And I can try another one. Oops, this x value has two different y values. So this one...
is not a function. As soon as you have one line that doesn't satisfy the vertical line test, you know you don't have a function. Let's look at this last one.
You look at it and you aren't sure if it's a function or not, so we just start drawing vertical lines. And you're thinking, well maybe over here I might have something that is the same, but they're not. Every one of those X values, when I draw my vertical line through it, has only one function.
y value. Every x has exactly one, so it is a function.