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

Determining if a function is surjective

  1. Nov 29, 2012 #1
    I understand the concept of a surjective or onto function (to a degree). I understand that if the range and domain of the function are the same then the function is onto. My professor gave an additional definition which I did not understand. Here it goes:

    [itex]\forall[/itex]y[itex]\in[/itex]B [itex]\exists[/itex]x[itex]\in[/itex]A: f(x) = y

    I understand that I need to solve the equation for x, but once I solve the equation for x, what is the next step. How do I use that to demonstrate the function is surjective?

    Could you provide a function of your choosing and work out a problem, please?
  2. jcsd
  3. Nov 29, 2012 #2
    No. Take f:R+-->R where f(x) = x. Then the range and domain are the same and the function is not surjective.

    The correct definition is the second one you listed, which is self-explanatory if you understand logical notation: For every element y in the codomain, there is an element x in the domain such that f(x) = y.
  4. Nov 29, 2012 #3
    Whoops I meant if the range is equal to the codomain then the function is surjective.
  5. Nov 29, 2012 #4
    If, for any y you are given, you can show that there's an x with f(x)=y, then you have proven that f is surjective. In other words: you need to show some way of determining the x for any y.

    You say that "if the range and domain of the function are the same then the function is onto." This depends on your definition of "range". There are two:

    (1) The set in which all images y=f(x) lie. This is also called the "codomain" of the function. For instance, if you look at the "square of an real number" function, all your images f(x) will be real numbers (never matrices, vectors or geometric objects like circles or lines). So your codomain is the set of all reals.

    (2) The set of all images f(x) and no other elements. This is also called the "image" of the function. In our "square" example, the image contains only the positive reals and zero, since the square of a real number will never be negative.

    In a typical example you will be given the codomain, and to show that your function is surjective, you must show that this codomain is also the image. Here's an example:

    Consider the set of all pairs (a,b) of positive real numbers. The average of this pair is the number f(a,b) = (a+b)/2. The codomain of f is R+ (i.e. the set of all positive reals). Show that f is surjective.

    To prove this, start with a value y=f(?,?). We know that y must be a positive real, so how do we find numbers a and b so that y=f(a,b)? Let's try a=y/2. That's still positive and real, so now we can try to look for b. Actually we can calculate b by b = (3/2)y. And this b is also positive and real.

    So for any y we can produce a pair (a,b) with f(a,b)=y. That proves that f is surjective. Q.E.D.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook