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.

# 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?

• can a horizontal line represent a function?
• y = 5 is a horizontal line and is indeed a function.
• could he have just used the vertical line test?
• Yes, he could've. If he did that, then he would've noticed that the relation intersects the vertical line x=-2 at infinitely many points. This is because the relation is x=-2, so obviously it intersects it at infinitely many points.

However, I think Sal was trying to demonstrate a more rigorous way of testing a relation for being a function. Instead of just doing a vague, vertical line test, he used the definition of a function to test the relation for being a function.

I hope this helps!
• 3.14159, he actually started defining pi :)
• yes I saw that to. :)
• Can there be many domain but getting only one range? If the line will be horizontal will it be a function?
• One domain and one range although the domain can consist of the union of various regions on the x-axis. EG {-100 < x < -10} U {-1 < x < 1} U {10 < x < 100}. the U is the symbol of union.
A horizontal line is a function, but a pretty boring one since no matter what x value you input, the output will always be the same. EG f(x)=5. No matter what x is, the output is always 5. As you can see, the output value does not depend on the input value x.
• So is Sal saying that x -> f(x) -> infinity is not a function? If you just wrote the infinity sign could it be considered as only one output?
• Infinity cannot be a single output. This rhetorical question I'm about to give you came from another user: "Think of the biggest, biggest, biggest number you can then keep adding 1." There is no definite answer for infinity, so it can't be considered as a single output.
• is a function with multiple outputs a logarithm?
• No. A function, by definition, can not have multiple outs for a specific input value. Each input can create only one output to be a function. Thus, any equation that doesn't meet this definition would not be a function.

FYI.. there are logarithmic functions.
• can't you just do the vertical line test
• Absolutely, it's the simplest way.
• whats the vertical line test
• so in this graph, y is not a function of x but x is a function of y?
• Saying that "`y is a function of x`" means that x is the input and y is the output, which is the system that most people use.

If you were making a function and you decided to label the input "`y`" and the output "`x`" then you could say that "`x is a function of y`." But only if you did it that way.

Since Khan Academy and a lot of other mathematicians all do it this one way, it makes sense to do the same.

TL;DR: No, x is not a function of y.
(1 vote)
• Would a drastically curved line on a graph represent a function? Does the curve have to go through x and y to be a function?
(1 vote)
• For a relation to be a function, use the Vertical Line Test: Draw a vertical line anywhere on the graph, and if it never hits the graph more than once, it is a function. If your vertical line hits twice or more, it's not a function. For example, a circle is not a function because when you draw a vertical line on top of its graph, the vertical line will cut through the circle twice.