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

Recognizing functions from graph

Checking whether a given set of points can represent a function. For the set to represent a function, each domain element must have one corresponding range element at most. Created by Sal Khan and Monterey Institute for Technology and Education.

Want to join the conversation?

  • primosaur ultimate style avatar for user ankur-singh
    Does this mean f(x) = sqrt of x is not a function? It has two outputs; for example if we input 9 in we get -3 or positive 3.
    (7 votes)
    Default Khan Academy avatar avatar for user
    • stelly blue style avatar for user Kim Seidel
      f(x)=sqrt(x) is a function. If you input 9, you will get only 3. Remember, sqrt(x) tells you to use the principal root, which is the positive root. If the problem wanted you to use the negative root, it would say "- sqrt(x)".
      (14 votes)
  • purple pi teal style avatar for user Lakshmi kri
    At , Sal writes the function as -1-->f-->3. Can you write the same function as f(-1)= 3?
    (7 votes)
    Default Khan Academy avatar avatar for user
  • aqualine ultimate style avatar for user Samiul Islam
    I know a regular parabola is a function as it passes the vertical line test, but what about the horizontal line test, you can have multiple inputs for a given output, for example you can have 2x values for one y value (as Y is the dependent output). Is my logic correct? Thanks
    (4 votes)
    Default Khan Academy avatar avatar for user
    • leafers ultimate style avatar for user Jason Berg
      It's only the vertical line test that disqualifies it from being a function. There's a lot of functions that don't pass the horizontal line test. For example, the basic functions in trigonometry form waves, which wiggle back and forth forever. If you draw a horizontal line through it, it will intersect infinitely many points on that function.
      (3 votes)
  • duskpin tree style avatar for user Bian Lee
    What exactly is a relation and what is the difference between relation and a function?
    (1 vote)
    Default Khan Academy avatar avatar for user
    • stelly blue style avatar for user Kim Seidel
      A relation is a set of ordered pairs.
      A function is a relation where each input value (x-value) has only one output (y-value).
      Thus, all functions are relations. But, not all relations are functions because not all will meet the requirement that each unique input creates only one output .

      Hope this helps.
      (8 votes)
  • leaf yellow style avatar for user Inonge Simasiku
    how do you recognize functions from graphs. mind is lost.
    (2 votes)
    Default Khan Academy avatar avatar for user
    • stelly blue style avatar for user Kim Seidel
      You use the vertical line test. If you can draw a vertical line any where in the graph and it crosses more than 1 point on the graph, then the graph is not a function. The reason this works is that points on a vertical line share the same x-value (input) and if the vertical line crosses more than one point on the graph, then the same input value has 2 different output values (y-values) on the graph. So, it fails the definition of a function where each input can have only one ouput.
      (6 votes)
  • male robot hal style avatar for user Shomik
    If we change the axes, will it be a function?
    (5 votes)
    Default Khan Academy avatar avatar for user
  • winston default style avatar for user Turtle Man Travis
    Does it matter what cordinates you put the dots on?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • piceratops seed style avatar for user Thirumaran
    if f(X) is not a function?then what do we call it.
    (3 votes)
    Default Khan Academy avatar avatar for user
  • starky seed style avatar for user Dishita
    We considered 'x' values as inputs and 'y' values as outputs ( x and y with respect to x and y axis), then can we consider the values of y as input and x as output?

    If yes, what about a quadratic equation, for almost every value of y, there exists 2 values of x (graphically represented as a parabola).
    Wouldn't a quadratic equation then not be considered a function?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • mr pink green style avatar for user David Severin
      If you have y=x^2, you get a parabola on a coordinate plane, but if you graph x=y^2, you get a sideways parabola which is not a function. It is difficult to say anything about you wanting to completely change the coordinate plane so that the x and y axes are interchanged because that would redefine every function in math.
      (3 votes)
  • leafers ultimate style avatar for user DerekChen
    Why is it not a function? Help!
    (2 votes)
    Default Khan Academy avatar avatar for user

Video transcript

Determine whether the points on this graph represent a function. Now, just as a refresher, a function is really just an association between members of a set that we call the domain and members of the set that we call a range. So if I take any member of the domain, let's call that x, and I give it to the function, the function should tell me what member of my range is associated with it. So it should point to some other value. This is a function. It would not be a function if it says, well, it could point to y. Or it could point to z. Or maybe it could point to e or whatever else. This would not be a function. So this right over here not a function, because it's not clear if you input x what member of the range you're going to get. In order for it to be a function, it has to be very clear. For any input into the function, you have to be very clear that you're only going to get one output. Now, with that out of the way, let's think about this function that is defined graphically. So the domains, the valid inputs, are the x values where this function is defined. So for example, it tells us if x is equal to negative 1-- if we assume that this over here is the x-axis and this is the y-axis-- it tells us, when x is equal to negative 1, we should output. Or y is going to be equal to 3. So one way to write that mapping is you could say, if you take negative 1 and you input it into our function-- I'll put a little f box right over there-- you will get the number 3. This is our x. And this is our y. So that seems reasonable. Negative 1 very clear that you get to 3. Let's see what happens when we go over here. If you put 2 into the function, when x is 2, y is negative 2. Once again, when x is 2 the function associates 2 for x, which is a member of the domain. It's defined for 2. It's not defined for 1. We don't know what our function is equal to at 1. So it's not defined there. So 1 isn't part of the domain. 2 is. It tells us when x is 2, then y is going to be equal to negative 2. So it maps it or associates it with negative 2. That doesn't seem too troublesome just yet. Now, let's look over here. Our function is also defined at x is equal to 3. Our function associates or maps 3 to the value y is equal to 2. That seems pretty straightforward. And then we get to x is equal to 4, where it seems like this thing that could be a function is somewhat defined. It does try to associate 4 with things. But what's interesting here is it tries to associate 4 with two different things. All of a sudden in this thing that we think might have been a function, but it looks like it might not be, we don't know. Do we associate 4 with 5? Or do we associate it with negative 1? So this thing right over here is actually a relation. You can have one member of the domain being related to multiple members of the range. But if you do have that, then you're not dealing with a function. So once again, because of this, this is not a function. It's not clear that when you input 4 into it, should you output 5? Or should you output negative 1? And sometimes there's something called the vertical line test that tells you whether something is a function. When it's graphically defined like this, you literally say, OK, when x is 4, if I draw a vertical line, do I intersect the function at two places or more? It could be two or more places. And if you do, that means that there's two or more values that are related to that value in the domain. There's two or more outputs for the input 4. And if there are two or more outputs for that one input, then you're not dealing with a function. You're just dealing with a relation. A function is a special case of a relation. Or you could view it as a well-behaved relation.