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

Determining if a function is invertible

Learn how to build a mapping diagram for a finite function, and how to use this diagram to determine if the function is invertible. An invertible function has a one-to-one mapping between its domain and range. Functions that map multiple domain elements to the same range element are not invertible.

Want to join the conversation?

  • winston default style avatar for user Nelson S. Mu
    Doesn't the first function not work, since it fails the vertical line test?
    (9 votes)
    Default Khan Academy avatar avatar for user
    • stelly blue style avatar for user Kim Seidel
      The vertical line test only works when you have a graph of a function within the coordinate plane.
      In this video, the "graphs" are really just mapping tables/picture. The oval on the right has the input/domain values . The oval on the left has all the output/range values. Each arrow depicts a relationship between an input value and an output value. The way to determine if you have a function from these mappings is to see of any input value has more than one arrow.
      (18 votes)
  • purple pi purple style avatar for user Ricky Muse
    How you determine if a function is invertible
    (5 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Wan Muhammad Alkaf Yaacob
    So one-to-one functions are invertible. Many-to-one functions are not invertible. What about one-to-many functions, can that be possible? I presume many-to-one and many-to-many are NOT invertible.
    And, what is the difference between range, co-domain, and image?
    (3 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user kubleeka
      What you call a one-to-many function is not a function. A relation is only a function if each input has a single, definite output or set of outputs. Many-to-many relations are not functions for the same reason.

      Many-to-one functions, like y=x^2 are not typically invertible unless we restrict the domain. So if we amend that we only want our outputs to be positive, we can invert y=x^2 to get y=√x. It's just that we will only get positive numbers.

      And, codomain is the set of all possible numbers our function could map to. In high school, that's almost always the set of real numbers, R.

      The image is the set of numbers actually mapped to. So the image of y=sin(x) is the interval [-1,1]. The image is always a subset of the codomain.

      Range is a synonym for either image or codomain. Which one it's a synonym for varies between schools and people, but I think that in American high schools, it usually refers to the image.
      (10 votes)
  • starky ultimate style avatar for user kungfujag
    How do you get smart?
    (4 votes)
    Default Khan Academy avatar avatar for user
  • starky ultimate style avatar for user allyson
    So are all parabolas not invertible then? Since each "y" in the range would correspond to two "x"s in the domain?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • piceratops ultimate style avatar for user Amaan Zubairi
    how do u solve the function f(x)=x^3 for proving that its an one-one function (i.e injective function)
    (1 vote)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user levgenid
      Let's assume that it is invertible. If it is invertible let's try to find the form of the inverse. So we have:
      f(x)=x^3=y or
      x^3=y or
      x=y^(1/3)
      We state the function g(y)=y^(1/3). Since the symbol of the variable does not matter we can make g(x)=x^(1/3). If f and g are truly each other's inverse then f(g(x))=x for any x that belongs to the domain of g. Truly:
      f(g(x))= (x^(1/3))^3=x^((1/3)*3)=x^1=x
      So f is invertible. If f invertible it is also 1-1.
      (2 votes)
  • starky ultimate style avatar for user Charizard-Max
    so does this mean for a function to have a inverse, first it needs to be a linear(or if it's not linear, run a horizontal line(I don't know, I don't really know what it's called) then there can only be a single x value for a single y value) function so that for a single y value their can only be a single x value as well?

    e.g. linear: y=3x+5
    not linear(but single x for a single y): y=2^x +3
    (1 vote)
    Default Khan Academy avatar avatar for user
    • starky ultimate style avatar for user KLaudano
      All non-horizontal linear functions are invertible, but a function does not need to be linear in order to have an inverse. There are many non-linear functions that are also invertible, such as exponential functions.

      Formally speaking, there are two conditions that must be satisfied in order for a function to have an inverse.

      1) A function must be injective (one-to-one). This means that for all values x and y in the domain of f, f(x) = f(y) only when x = y. So, distinct inputs will produce distinct outputs.

      2) A function must be surjective (onto). This means that the codomain of f is equal to the range of f.

      Any function that satisfies both of these conditions is called bijective and will always have an inverse.
      (2 votes)
  • hopper cool style avatar for user Bob The Zealot
    What kind of functions would be like the not invertible ones in the video? Why would different inputs ever produce the same output?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • ohnoes default style avatar for user How Khan I Do This
    help!!
    determine if f(x) = x-1 (if x≥3), f(f(x+3)) (if x<3)
    (ps. how will it look like if i drew f(f(x+3)) (if x<3) as a graph?)
    (1 vote)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user aaabdullahi22
    How about determine if f (x) = 2x-3 has inverse fuctions
    (1 vote)
    Default Khan Academy avatar avatar for user
    • spunky sam green style avatar for user Rupanshu Yadav
      As you can see the f(x) is a one-one function as it f(x) can only have value for each input given(value of x), and if x can take values from negative infinityto infinity then f(x) will also range from negative infinity to infinity(as infinity multiplied by or added by a integer makes no difference) therefore f(x) have the same co-domain and range which indicates that it is onto. And if a function is onto and one-one it is invertible.
      (1 vote)

Video transcript

- [Voiceover] "f is a finite function whose domain is the letters a to e. The following table lists the output for each input in f's domain." So if x is equal to a then, so if we input a into our function then we output -6. f of a is -6. We input b we get three, we input c we get -6, we input d we get two, we input e we get -6. "Build the mapping diagram for f by dragging the endpoints of the segments in the graph below so that they pair each domain element with its correct range element. Then, determine if f is invertible." Alright, so let's see what's going on over here. Let me scroll down a little bit more. So in this purple oval, this is representing the domain of our function f and this is the range. So the function is going to, if you give it a member of the domain it's going to map from that member of domain to a member of the range. So, for example, you input a into the function it goes to -6. So a goes to -6, so I drag that right over there. b goes to three, c goes to -6, so it's already interesting that we have multiple values that point to -6. So this is okay for f to be a function but we'll see it might make it a little bit tricky for f to be invertible. So let's see, d is points to two, or maps to two. So you input d into our function you're going to output two and then finally e maps to -6 as well. e maps to -6 as well. So, that's a visualization of how this function f maps from a through e to members of the range but also ask ourselves 'is this function invertible?' And I already hinted at it a little bit. Well in order fo it to be invertible you need a, you need a function that could take go from each of these points to, they can do the inverse mapping. But it has to be a function. So, if you input three into this inverse function it should give you b. If you input two into this inverse function it should output d. If you input -6 into this inverse function, well this hypothetical inverse function. what should it do? Well you can't have a function that if you input one, if you input a number it could have three possible values, a, c, or e, you can only map to one value. So there isn't, you actually can't set up an inverse function that does this because it wouldn't be a function. You can't go from input -6 into that inverse function and get three different values. So this is not invertible. Let's do another example. So here, so this is the same drill. We have our members of our domain, members of our range. We can build our mapping diagram. a maps to -36, b maps to nine. c maps to -4, d maps to 49, and then finally e maps to 25. e maps to 25. Now is this function invertible? Well let's think about it. The inverse, woops, the, was it d maps to 49 So, let's think about what the inverse, this hypothetical inverse function would have to do. It would have to take each of these members of the range and do the inverse mapping. So if you input 49 into our inverse function it should give you d. Input 25 it should give you e. Input nine it gives you b. You input -4 it inputs c. You input -36 it gives you a. So you could easily construct an inverse function here. So this is very much, this is very much invertible. One way to think about it is these are a, this is a one to one mapping. Each of the members of the domain correspond to a unique member of the range. You don't have two members of the domain pointing to the same member of the range. Anyway, hopefully you found that interesting.