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

Testing if a relationship is a function

Learn to determine if points on a graph represent a function. Created by Sal Khan and Monterey Institute for Technology and Education.

Want to join the conversation?

  • leaf green style avatar for user Dan Gagne
    if this were a quadraic funcion there would be 2 outputs for each input , is a quadratic function a special type of fuction that is immune to these rules
    (68 votes)
    Default Khan Academy avatar avatar for user
    • mr pants teal style avatar for user Josh Hafer
      A "C" graph would have a single X value that would output 2 Y values. The vertical line test fails and therefore it would not be a function. A quadratic or "U" function outputs a single Y value for every X value. This graph passes the vertical line test and is therefore a function.
      (12 votes)
  • blobby green style avatar for user danakreiss
    Why can't this be a function of the y-axis? f(y)?
    (16 votes)
    Default Khan Academy avatar avatar for user
  • piceratops ultimate style avatar for user Darmon
    Is it ever possible to have a function that has two (or more) values assigned to one element on the y axis?
    (5 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Jackson Carver
    Respect the website. It's a great one!
    (9 votes)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user josie
    I rely on subtitles, so I'm guessing as to what this video is about, but I believe the video was talking about how a function cannot have multiple y values for any given x value. Have I understood this correctly?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • piceratops ultimate style avatar for user Lauren Mauricio
    Could you switch the axes, i.e. make the vertical line y and make the horizontal line f(y)?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • duskpin tree style avatar for user Gavin Weaver
    A WAY easier (and faster), way to know if it is a function is to see if there are two of the same x-intercept (which make a vertical line). If there is, then it is NOT a function. Hope that answered any of your stated ?'s and to-be ?'s. Sorry if that doesn't though, I try.
    (4 votes)
    Default Khan Academy avatar avatar for user
  • purple pi purple style avatar for user Sid Joon
    Hey
    I get you can't have 2 numbers in range for 1 in domain (e.g. 1,6. 1,9)
    But can you call it a function if its (2,-3) (2,3) (3,4) (3,-4). You know what I mean. Like the same number except in negative and positive
    (1 vote)
    Default Khan Academy avatar avatar for user
    • spunky sam blue style avatar for user JaDeriv
      Sid, that's a good question! That would not be a function, because you can't have the same domain give you different ranges. Here's the way I think of it: basically, "Multiple domains can have the same range, but one domain cannot have multiple ranges".
      Hope that helps!
      (7 votes)
  • male robot hal style avatar for user Anthony Avram
    Why is the f(x) axis f(x) and not f(y) since it would be the y-axis on a normal coordinate plane?
    (3 votes)
    Default Khan Academy avatar avatar for user
    • aqualine ultimate style avatar for user J Choi
      f(x)=y. In a function, f(x) means "the function of x". For example, f(x)=2x is the same thing as y=2x. But f(y) would be something different entirely, because that would be using the function definition to change the y-value.
      (3 votes)
  • leafers tree style avatar for user Nick
    So a function can have 2 inputs for 1 output like in quadratics, but can't have 2 outputs for 1 input? y=x^2 is a function but x=y^2 isn't. Is there any reasoning behind this? Thanks
    (3 votes)
    Default Khan Academy avatar avatar for user
    • male robot hal style avatar for user Sid
      If y is a function of x, there must be at most one output for any given x. That makes sense, because the value of y depends only on x.

      If y can take on more than one value for any given value of x, then there must be some additional factor that determines the output. So in this case, y is not a function of x, it is a function of x and something else.
      (2 votes)

Video transcript

We're asked: Do the points on the graph below represent a function? So in order for the points to represent a function, for every input into our function, we can only get one value. So if we look here, they've graphed the point--it looks like negative 1, 3, so that's the point negative 1, 3. So if we assume that this is our x-axis and that is our f of x axis, and I'm just assuming it's a function, I don't know whether it really is just now, this point is telling us that if you put negative 1 into our function, or that thing that might be a function, or maybe our relation, you'll get a 3 So it's telling us that f of negative 1 is equal to 3. So far it could be a reasonable function. You give me negative 1 and I will map it to 3. Then they have if x is 2, then our value is negative 2. This is the point 2, negative 2, so that still seems consistent with being a function. If you pass me 2, I will map you or I will point you to negative 2. Seems fair enough. Let's see this next value here. This is the point 3 comma 2 right there. So once again, that says that, look, if you give me 3 into my function, into my black box, I will output a 2. Pretty reasonable. No reason why these points can't represent a function so far. Now, what about when we input 4 into the function? Let me do this in magenta. So what happens if I input 4 into my function? So this is 4 right here. Well, according to these points, there's two points that relate to 4 that 4 can be mapped to. I could map it to the point 4 comma 5. So that says if you give me a 4, I'll give you a 5. But it also says if you give me a 4, I could also give you a negative 1 because that's the point 4, negative 1 So this is not a function. It cannot be a function if for some input into the function you could give me two different values. And you can see that right here. And an easy test is to just see, look, for one value I have two points for this relationship. So this cannot be a function. So this is not a function! I'll put an exclamation mark.