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

Worked example: matching an input to a function's output (graph)

Sal finds the input value for which g(x)=-2 given the graph of g.

Want to join the conversation?

  • piceratops ultimate style avatar for user helen.okorie
    what is the purpose of functions exactly? They seem to remind me of how computers work (inputs and outputs). What word problems would functions be used as a solution? What problems in the world would need functions to find the answer? What are functions destined for? Thank you for answering!
    (23 votes)
    Default Khan Academy avatar avatar for user
    • starky seed style avatar for user Miss Megan
      This is a fantastic question! Functions are used in computer science as you mentioned, although they don't follow the same definition that we use in algebra. Algebraic functions can be extremely useful for scientists, engineers, architects, you name it! For example, let's say that I am a botanist trying to determine the ideal amount of sunlight to expose a new species of plant to. I would conduct an experiment exposing plants to different amounts of light and record how tall they grew in each condition. Once I collect that data, I can use a function to model the pattern. This way I can predict the height of the plant under any light conditions. H would be height of the plant, and "t" would be amount of time exposed to the sun, so H(t) would be my function.
      (18 votes)
  • piceratops ultimate style avatar for user Philosopher King
    How does Sal know that g(x)=y? what is the process to determine that?
    (8 votes)
    Default Khan Academy avatar avatar for user
  • aqualine ultimate style avatar for user XyCrosier
    Hypothetically, if the question had been "What is the input value for which g(x) = 1?", given the same function in the video, what would be the correct way to answer this problem?

    You've got g(x) = 1 for the inputs -6, 2, 1.5, 3, 5, and 7 through 8.

    Would you just list them all, and is there a convention for this?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Aura Long
    I don’t understand. Why is it -9.
    (4 votes)
    Default Khan Academy avatar avatar for user
    • mr pink green style avatar for user David Severin
      g(x) is functional notation for a y =, so the question that is being asked if you have g(x) = - 2 is if y = -2 (same as g(x) = 2), what is the value of x? So if you find y = -2 by going down 2, you go across to an x value of - 9 .
      If you wanted to find g(5), you would go across to where x = 5 and find the value of y.
      (2 votes)
  • piceratops sapling style avatar for user samuel storie
    what about when you get What is the input value other than −2 for which h(x)=h(−2)?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • starky sapling style avatar for user Sophie Cavalli
    What is the answer if the y coordinate crosses x axis at 0?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • primosaur seed style avatar for user Hafsa Mohamed
    I do not understand the part where Sal called the graph y equals g of x. He said that at . Could anyone please explain why he did and perhaps how he came up with that. Thanks
    (1 vote)
    Default Khan Academy avatar avatar for user
    • mr pink green style avatar for user David Severin
      the idea is that you can use either variable notation (for example, y = 3x +5) or you could use functional notation (g(x) = 3x +5). They are interchangeable, but functional notation has more power when you get to Algebra II and adding, subtracting, multiplying and dividing multiple functions.
      (2 votes)
  • blobby green style avatar for user akari matthews
    how would i graph the function f(x)= -2x+1 with a domain:{-2,-1,0,1,2}
    (2 votes)
    Default Khan Academy avatar avatar for user
  • aqualine tree style avatar for user williamsw
    Is it true that f(x) can be written as just x or was it just a hoax?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • duskpin tree style avatar for user Saigh
    Can someone explain to me how to differentiate the when the question asks for the output or the input? A simple example will suffice
    (1 vote)
    Default Khan Academy avatar avatar for user
    • piceratops ultimate style avatar for user MichaelCat87
      When a question is asking for an input, it's asking for the x value that you plug into the function to get a specific y value, and when it's asking for an output, it's asking what y value you get when you plug in a specific x value. For example, if you're asked for an input for which a function equals 3, you would look for the x value on the function that has a y value of 3. Likewise, if you were asked for an output where x=3 you would answer with the function's y-value when the x value is 3.

      Hopefully this helps.
      (2 votes)

Video transcript

The graph of the function g is shown below What is the input value for which g of x is equal to negative 2? So what they do here is along the x axis these are the inputs and then the graph shows us what's the output so when x is equal to 7, G of 7 we see here is 1. If x equals 9, g of 9 here is 2. If x equals 6, g of 6 is equal to the y coordinate at this point is equal to 0. so what is the input value for which g is equal to negative 2? so this graph over here, this is y equals g of x. So g of x equaling to negative 2 means y of x is equal to negative 2 And so when does y equal negative 2? (muttering) when does equal negative 2? (talking) it looks like that happens right at this point. And that happens when you input negative 9 into g. g of negative 9 is negative 2 so this is going to be negative 9. And we're done.