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

Homework Help: One-to-one and onto

  1. Nov 18, 2012 #1
    Hello all,

    This is tripping me up a bit an I just want to see if I on the right track. Here is the problem:

    Give a function from Z to N that is onto N but not one-to-one.

    Answer: f(x) = {x if x ≥ 0, -1x if x < 0

    Seems simple, but I think it works. Note: in our book, 0 is included in the set of natural numbers.
  2. jcsd
  3. Nov 18, 2012 #2


    Staff: Mentor

    That works. Your function is essentially the absolute value function, |x|, with its domain restricted to the integers.

    Fair warning: The three parts of the homework template are there for a reason. In the future, when you post a problem, do not delete them.
  4. Nov 18, 2012 #3
    Thanks for the help. And, I'll be sure to follow protocol next time.

    I guess I could just do this:

    f(x) = |x|
  5. Nov 18, 2012 #4


    Staff: Mentor

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook