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

Difference between codomain and range

  1. Nov 9, 2012 #1
    I am having a difficult time wrapping my mind around the differences between a codomain and a range. Could someone explain the difference between the two and possibly provide an example?
  2. jcsd
  3. Nov 9, 2012 #2
  4. Nov 9, 2012 #3
    Consider the function f(x)=sin(x)

    We could say f:R->R. The codomain of f is R because that's where the values of x are mapped to.

    The range of f:X->Y, S, is defined as: for all elements y in Y, there exists x in X such that y=f(x). Basically, S=f(X).

    In our example above, the range is [-1,1].
    We have π mapped to 0, π/2 mapped to 1, etc.

    Note that the range is dependent on the domain.

    Edit: If you consider g:[0,π/2]->R, then the range of g(x)=sin(x) is [0,1].

    If you consider h:R->C, the range of h(x)=sin(x) is still [-1,1]. The codomain being the complex numbers. Since the domain are reals, sin maps them to real values.
    Last edited: Nov 9, 2012
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook