If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Does a vertical line represent a function?

Explaining why a vertical line doesn't represent a function. Created by Sal Khan.

Want to join the conversation?

Video transcript

In the following graph, is y a function of x? So in order for y to be a function of x, for any x that you input into the function, any x for which the function is defined. So let's say we have y is equal to f of x. So we have our little function machine. It should spit out exactly one value of y. If it spits out multiple values of y, we don't know what f of x is going to be equal to. It could be equal to any of those possible values for y. So let's see if, for this graph, whether for a given x it spits out exactly one y. Well, the function seems to be only defined so the domain of this function is x is equal to negative 2. That's the only place where we have a definition for it. And if we try to input negative 2 into this little black box, what do we get? Do we get exactly one thing? No. If we put in negative 2 here, we could get anything. The point negative 2, 9 is on this relation. Negative 2, 8 is on this relation. Negative 2, 7; negative 2, 7.5; negative 2, 3.14159-- they're all on these. So if you put a negative 2 into this relation, essentially, you actually get an infinite set of values. It could be 9. It could be 3.14. It could be 8. It could be negative 8. You get an infinite number of results. So since it does not map to exactly one output of this function, in the following graph, y is not a function of x.