Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The inverse of a function

  1. Jun 26, 2015 #1
    Hi, I know that the inverse function of

    y= f(x) =2x+1

    is

    y-1=2x
    x=(y-1)/2

    and then we just replace x with f-1(y) and then when we plug in any value of y it gives us a corresponding x value.

    Now my question is this: If we want to find a line or function that is perpendicular to another line or function, then we do the same steps to go from y=2x+1 to x=(y-1)/2 and then we switch x and y to get
    y=(x-1)/2

    Why is it practical to find an inverse of a function if they both have the same graph? If you ploty y=2x+1and x=(y-1)/2 you get the same graph, so what are the practical usages for finding the inverse of a function?
    Is the function that is perpendicular to another function, also a kind of an inverse even thought we switch x and y?
     
  2. jcsd
  3. Jun 26, 2015 #2

    RUber

    User Avatar
    Homework Helper

    The inverse of f(x) = 2x+1 is f^-1(x) = (x-1)/2.
    These are not the same function, but if you plot y = 2x+1 and x= (y-1)/2, you do get the same plot, since they are the same.
    If you want to find a line that is perpendicular to linear function of the form y=mx+b, you will get y = -x/m+c. The intercept c, will determine at which point the two lines intersect.
     
  4. Jun 26, 2015 #3

    Fredrik

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    The graph of the function f defined by f(t)=2t+1 for all t, is not the same as the graph of the function g defined by g(t)=(t-1)/2 for all t. Note however that for all t, we have
    \begin{align*}
    &f(g(t))=2\left(\frac{t-1}{2}\right)+1=t-1+1=t,\\
    &g(f(t))=\frac{(2t+1)-1}{2}=\frac{2t}{t}=t.
    \end{align*}
    This means that ##g=f^{-1}##.

    That depends on the function. Here's a fun example: Knowing that the exponential function has an inverse function (denoted by log or ln), and knowing the basic properties of that function, allows us to prove the identity ##a^xb^x=(ab)^x## in the following way:
    $$a^xb^x= e^{\log a^x} e^{\log b^x} = e^{x\log a}e^{x\log b} =e^{x\log a+x\log b} =e^{x(\log a+\log b)} =e^{x \log ab} =e^{\log(ab)^x} =(ab)^x.$$
     
  5. Jun 27, 2015 #4
    Then there is one thing that troubles me and unfortunately is a big contradiction: My book, calculus the infinitesimal approach, states

    "Two real functions f and g are called inverse functions if the two equations
    y=f(x) and x=g(y)
    have the same graphs in the (x,y) planes. (In general the graph of the equation x=g(y) is different from the graph y=g(x) but is the same as the graph of y=f(x)"

    So for y=x^2 (x≥0) x=√(y) is the inverse because g(y)=√(y)=√(x^2) =x

    So if you plot y=2x+1vs x=(y-1)/2 you do get the same graph, but if you plot y=2x+1 vs y=(x-1)/2 don't get the same graph, so they are NOT inverse.


    The contradiction: According to the book, as i understand it,

    f(x) = 2x+1 and f^-1(x) = (x-1)/2)

    are not inverse because f(x) and f^-1(x) = (x-1)/2) do not have the same graph. However y=f(x) = 2x+1 and g(y) = (y-1)/2) are inverse because they have the same graph and because g(y)= ((2x+1)-1)/2 = x
    but if you substitute
    f(x) = 2x+1=y into f^-1(x) = (x-1)/2)

    you do actually get x, I'll try f^-1(f(y) = ((2x+1-1)/2= x, so it seems to be a contradiction that the definition of a inverse must have the same graphs in the (x,y) plane AND at the same time it must satisfy y=f(x) and x=g(y) while people say that f-1(x) which is a function of x (and not y) with a different graph is the inverse of y=f(x). I can't understand that :(
     
    Last edited: Jun 27, 2015
  6. Jun 27, 2015 #5
    I'll try with an example to sort out contradictions: Notice that wikipedia (and my book) calls f(-1)(y) for the inverse and not f(-1)(x)
    To eradicate confusion of notation for myself: There are the following notations and equations
    x= f(-1)(y) also called g(y) or sometimes f(y)
    y=f(-1)(x)


    If

    y=f(x) = 2x+2

    then

    x=(y-2)/2 = f(-1)(f(x)) = f(-1)(y) = g(y) So we call (y-2)/2 for g(y) or f(-1)(y) or f(-1)(f(x)) when it's invers of y

    The graph of f(x) and f(-1)(y)=g(y) are the same acording to wikipedia and acording to my book.

    So y=f(y) and x=f(-1)(y) are inverse and have equal graphs.

    However:

    f-1(x) = (2-x)/2 (This is not g(y)=(2-y)/2)
    Is ALSO called the inverse of f(x) or f-1(x) which is VERY confusing: However this graph is not the same as f(x) = 2x+2

    Conclusion
    f(-1)(y) = x=(y-2)/2=g(y)
    is the inverse of y=2x+2 and they have same graphs.
    f(-1)(x) = (2-x)/2= g(x)
    is the inverse of x=2y+2 and they have same graphs
    f(-1)(x) = (2-x)/2 =g(x)
    and f(-1)(y) = x=(y-2)/2=g(y) are not inverse and do not have same graph.
    f(x)= 2x+2 and g(x)=(2-x)/2 are not inverse because they don't have the same graphs (acording to wikipedia and calculus an infinitesimal approach)
     
    Last edited: Jun 27, 2015
  7. Jun 27, 2015 #6

    Fredrik

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    They're not saying that f and g have the same graphs. They're saying that the sets ##\{(t,f(t))|t\in\mathbb R\}## and ##\{(g(t),t)|t\in\mathbb R\}## are the same. They're calling these sets the graphs of the equations y=f(x) and x=g(y) in the (x,y) plane. The former is the graph of f, but the latter isn't the graph of g. The graph of g is the set ##\{(t,g(t))|t\in\mathbb R\}##.

    You seem to be confusing functions defined by equations with the corresponding equations. Equations don't have inverses. They do however have graphs, and two equivalent equations have the same graph. The equations y=2x+1 and x=(y-1)/2 are equivalent in the sense for all values of x and y, they're either both true or both false.

    If someone is saying that ##f^{-1}(x)## (a string of text that represents a number) is the inverse of y=f(x) (a string of text that tells us something about the numbers represented by the variables inside it), they're not paying attention to what what the strings of text they're writing down actually represent. A function may have an inverse. A string of text may not.

    Your calculation of ##f^{-1}(f(y))## is wrong. For all real numbers y, we have
    $$f^{-1}(f(y))=\frac{f(y)-1}{2} =\frac{2y+1-1}{2}=y.$$ Note that the "for all" makes y a dummy variable. You can replace y with any other variable (including x) without changing the meaning of the statement.
     
  8. Jun 27, 2015 #7

    Fredrik

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    The equations are equivalent, not inverse, and because of that their graphs are the same. The functions ##f## and ##f^{-1}## do not have the same graph.

    If you want to see what the graph of ##f^{-1}## looks like, draw the graph of ##f## on a sheet of transparent plastic. Then rotate the sheet 90 degrees counterclockwise and then flip the sheet over, the way you would turn a page in a book. You are now looking at the graph of ##f^{-1}##.

    I think it would be useful for you to stop thinking of f(x) as a function. f is the function. f(x) is a number in its range. The inverse of f is neither ##f^{-1}(x)## nor ##f^{-1}(y)##, it's ##f^{-1}##. Of course, when the variable that you put into the function is the target of a "for all", it makes absolutely no difference what variable you're using. The statements

    For all real numbers x, we have ##f^{-1}(x)=\frac{x-1}{2}##.
    and

    For all real numbers y, we have ##f^{-1}(y)=\frac{y-1}{2}##.
    are saying exactly the same thing.
     
  9. Jun 27, 2015 #8
    Fredering, thank you so much for responding. I've spent a long time reading your post, and I think i might understand it now, and i feel like I'm learning a lot:
    So let's se if I'm on the right track.

    1) Equations don't have inverses, only functions do.

    2)
    two equivalent equations have the same graph.
    So f and g are inverse functions if and only if the
    equation of f, y=f(t), has an equivalent euqation t=g(y)
    meaning that the sets of the 2 equations ({(t,f(t))|t∈R}
    and {(g(t),t)|t∈R} are the same. So If the equation of f has an equaivalent
    equation t=g(y) then a function,g, must belong to the equation g(t)=y , and this function must
    be the inverse of f.

    So in our example the equation of f is y=2x+2 so the equivalent equation is found by isolating x, x=(y-2)/2=g(y) and the sets of the 2 equations
    ({(t,f(t))|t∈R}
    and {(g(t),t)|t∈R} are equivalent. To find the equation g(t)=y for the function g, we just switch x and y, g(x)=(x-2)/2 So this function is the inverse of f.

    so f(-1)=g(x) because f(g(x)) = x which is the same as saying f(f(-1)(x)) and g(f(x))= x-
    3) So how do i interprete f−1(x)=(x−1)/2. and f−1(y)=(y−1)/2, do I call them inverse functions of f with respect to y, or with respect to x?
    5) Is there a depper mathematical name for the process of swapping y out with x to get the inverse function?
    6) Are there true equations with no possible functions?
     
    Last edited: Jun 27, 2015
  10. Jun 27, 2015 #9

    RUber

    User Avatar
    Homework Helper

    To add onto Fredrik's last post, when you are not dealing with functions that are defined like ##f:\mathbb{R}\to\mathbb{R}## like the simple functions listed in your examples, you will need to really pay attention to the domain and range of the function.
    Say, for example, ## f(x) = \sin x ## ##f: \mathbb{R} \to [-1, 1]##, so if ##f(x) = y, y \in [-1, 1]##. Your inverse function should only have the domain of ##[-1, 1]## and a range of ##\mathbb{R}##. Unfortunately, ##\sin ## is periodic, so there is no way to tell if an original x was x, x+2pi, x-2pi, or any other member of ## [x]: \{s| s = x +2k\pi, k \in \mathbb{Z}\} .## The best inverse of sine, arcsine, will return a number in ##[0, 2\pi)##.
     
  11. Jun 27, 2015 #10

    RUber

    User Avatar
    Homework Helper

    In response to your number 3, any function defined by f(y) = 2x doesn't mean anything, since the input of the function is y and you are defining the output in terms of x, which we know nothing about.
    number 5, the swapping of x and y is simply a technique used to solve for the inverse--enforcing the condition that if f(x) = y, and g(y) = x, then f and g are inverses.
     
  12. Jun 27, 2015 #11
    Thank you very much for clarifying, acutally to #3 i meant f−1(x)=(x−1)/2. and f−1(y)=(y−1)/2,, but added a x instead of y, so sory for that!
    But I would think f−1(x)=(x−1)/2. and f−1(y)=(y−1)/2, are 2 very different functions? But now i think the point Frederik was making is that f−1(x)=(x−1)/2. and f−1(y)=(y−1)/2, don't mean inverse of a function like f(-1) does, but sloppy mathematicians can get away with writing it anyway?? :-)
     
  13. Jun 27, 2015 #12

    RUber

    User Avatar
    Homework Helper

    ##f^{-1}(x) = (x-1)/2## is exactly the same as ##f^{-1}(y) = (y-1)/2## since the equation is simply illustrating the action of the function on its input.
    The only reason a function of y would be different from a function of x would be if you were defining the domains of x and y to be different, and implicitly imposing those as the domains for the function.

    The equation - function debate can be thought of this way:
    a function takes an input and gives an output. It can be defined in many ways.
    Many mathematical functions are defined based on an input x, and the output is expressed as a relationship to the input, i.e. f(x) = 2x.
    That means for any x, the equation will be true. But the function is the doubling function. The inverse of the doubling function is the halving function, which for any x the equation g(x) = x/2 holds true.
     
  14. Jun 27, 2015 #13

    Fredrik

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Two functions f and g are equal if and only if they have the same domain, and f(x)=g(x) for all x in that domain. So if we define f and g by the statements

    ##f(x)=\frac{x-1}{2}## for all real numbers x
    and

    ##g(y)=\frac{y-1}{2}## for all real numbers y
    we will have f=g. They will both have domain ##\mathbb R##, and for all real numbers t, we will have
    $$f(t)=\frac{t-1}{2}=g(t).$$ This implies that f=g.
     
  15. Jun 27, 2015 #14
    Thank you, it makes a lot of sense: Just a question more: If i take let's say a function f with the equation y=2x+2, then solve for x --> x=(y-2)/2 then according to my book which states

    "Two real functions f and g are called inverse functions if the two equations
    y=f(x) and x=g(y)
    have the same graphs in the (x,y) planes"

    This means that y=2x+2, belongs to f with the set {(x,f(x))|x∈R}, and that x=(y-2)/2)=g(y) belongs to the set {(g(x),x)|x∈R} (This is what Frederik wrote). So my question is, Is this correct to write, if a function is called g(y)= (y-2)/2 could you say the set is {(g(x),x)|x∈R} or should you you say {(g(y),y)|x∈R}, if i know g(y)=x my logic tells me you can write both.

    Wau i totally just spent a complete day trying to understand this topic, but now at least i feel smarter. ^^
     
  16. Jun 27, 2015 #15
    Thank you frederik! It's liberating to understand something!
    So a last question to make sure i understand this 100% :

    1) On mathisfun.com the inverse of a function f is calculated like this

    f(x)=2x+3 --> x=(y-3)/2, then x is swapped with f(-1)(y) but y is not swapped with x So and so it's concluded that we have the inverse f(-1) =(y-3)/2,

    This seems wrong because we agreed that in my book

    Two real functions f and g are called inverse functions if the two equations
    y=f(x) and x=g(y)
    have the same graphs in the (x,y) planes.


    So you wrote

    They're saying that the sets {(t,f(t))|t∈R} and {(g(t),t)|t∈R} are the same.and the set of g the inverse is {(t,g(t))|t∈R}.

    So in this example y=f(x) has a function f with the set {(t,f(t))|t∈R}
    x=g(y) should have been g(y)=(y-3)/2, with the set {(g(t),t)|t∈R} and NOT the inverse?? Or am i misunderstanding it?
    And when we do the swapping of x and y (which was not done on the website)
    f(-1) =(x-3)/2,

    Is this the correct understanding?
     
  17. Jun 27, 2015 #16

    RUber

    User Avatar
    Homework Helper

    It seems like you are getting confused about x and y. The variable doesn't matter. You can define the function as a function of x or y. What matters is that IF y = f(x), then the graph (x,y) = (x, f(x) ) should look exactly like (f^{-1}(y), y) = (x,y). This only holds true if you first define y = f(x).
    The definitions of the functions themselves can use any variable you want, x, y, t, z, s, apples, elephants, etc.
     
  18. Jun 27, 2015 #17
    This is the only part i don't get: g(y)=(y-2)/2 and g(x)=(x-2)/2 are equal BUT if this is true then a function belonging to x=g(y)=(y-2)/2 would then be the same as a function belonging to g(x)=(x-2)/2 and then the graph of x=g(y) is the same as the graph of the equation for the inverse g(x)=(x-2)/2 ,
    And this istrouble beacuse the graph of g(y)=x is also the same as the graph of f(x)=2x+2
     
  19. Jun 27, 2015 #18
    So If we define y=f(x) and has the set of points (x,y), then why exactly should the graph look like (f^{-1}(y), y) = (x,y)? Sory I'm a but confused about what This proves.

    If I'm misunderstanding you, would you be so kind as providing a small example?
     
  20. Jun 27, 2015 #19

    Mark44

    Staff: Mentor

    The short version of the above is that if ##x = \frac{y - 2}{2}##, you can solve for y and get 2x = y - 2, so y = 2x + 2.

    The equation ##x = \frac{y - 2}{2}## is equivalent to y = 2x + 2, which means that every ordered pair (x, y) that is on one graph is also on the other.
    The first equation, ##x = \frac{y - 2}{2} = g(y)##, gives x as a function (g) of y. The second equation, y = 2x + 2 = f(x), gives y as a function (f) of x. In this case, f and g are inverses of each other. You can verify that f(g(y)) = y, and that g(f(x)) = x for all choices of y and x.

    For a "nice enough" equation in x and y, a function and its inverse give the relationships between x and y. By "nice enough" I mean an equation that pairs x and y values in a one-to-one relationship in both directions. That is, for each y value, there is exactly one x value that pairs with it, and for each x value there is exactly one y value that pairs with it. Functions whose graphs are straight lines represent one-to-one functions.
     
  21. Jun 27, 2015 #20

    Fredrik

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    The graph of an equation that contains the variables x and y is the set of all pairs (x,y) that satisfy the equation. (It's conventional to put x first, but it's really nothing more than a convention). In this case we're talking about all (x,y) such that that y=f(x), and all (x,y) such that x=g(y). These sets are the same if and only if the equations are equivalent. In that case, they're both the graph of f. The graph of g is the set of all (x,y) such that y=g(x), or equivalently, the set of all (y,x) such that x=g(y).

    The equation is just a string of text, and doesn't belong to a subset of ##\mathbb R^2##. x and y are real numbers, so they can't be elements of such a set either.

    The graph of f is by definition the set of all pairs (x,y) such that y=f(x). Since the equations y=f(x), y=2x+2, x=g(y) and x=(y-2)/2 are all equivalent, every pair (x,y) that satisfies one of these equations, satisfies them all.

    The sets ##\{(x,f(x))|x\in\mathbb R\}## and ##\{(g(x),x)|x\in\mathbb R\}## are the same. Proof: Let (a,b) be a element of ##\{(x,f(x))|x\in\mathbb R\}##. We have b=f(a). This implies that a=g(b). So ##(a,b)=(g(b),b))\in \{(g(x),x)|x\in\mathbb R\}##. Let (c,d) be an element of ##\{(g(x),x)|x\in\mathbb R\}##. We have c=g(d). This implies that d=f(c). So ##(c,d)=(c,f(c))\in\{(x,f(x))|x\in\mathbb R\}##.

    The function would be called g, not g(y) or g(y)=(y-2)/2. But it can be defined by the equality g(y)=(y-2)/2, if this equality is interpreted as a "for all" statement, i.e. if it's interpreted as saying exactly this:

    For all real numbers t, we have ##g(t)=\frac{t-2}{2}##.

    Those sets are the same. But I don't quite understand the question. You're asking about "the set". What set is that? The graph of g? It's not the set in the quote above. It's ##\{(x,y)|x\in\mathbb R,~y=g(x)\}##.

    f(x)=2x+2 doesn't imply x=(y-3)/2, because there's no y in the former. I guess you meant that y=2x+3 implies that x=(y-3)/2. If we define f by f(t)=2t+3 for all real numbers t, then we can write the first equation as y=f(x). If we define g by g(t)=(t-3)/2 for all real numbers t, we can write the second equation as x=g(y). Now you can see that f and g are each other's inverses by verifying that f(g(s))=s=g(f(s)) for all real numbers s.

    The point of "swapping x and y" is only that people like to denote the input by x and the output by y. The graph of g is by definition the set ##\{(s,t)|s\in\mathbb R,~t=g(s)\}##. If we want to denote the input by x and the output by y, we can rewrite this as ##\{(x,y)|x\in\mathbb R,~y=g(x)\}##. I wouldn't think of this as swapping x and y. We're just choosing to denote the input by x and the output by y.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: The inverse of a function
  1. Inverse functions (Replies: 3)

  2. Inverse functions (Replies: 3)

  3. Inverse function (Replies: 12)

  4. Inverse of a function (Replies: 6)

  5. Inverse function (Replies: 5)

Loading...