Talk:Codomain
|
Example
Copied from article
Let the function f be a function on the real numbers:
- <math>f\colon \mathbb{R}\rightarrow\mathbb{R}<math>
defined by
- <math>f\colon\,x\mapsto x^2<math>
The codomain of f is R, but clearly f(x) never takes negative values, and thus the range is in fact the set R+—non-negative reals, i.e. the interval [0,∞):
- <math>0\leq f(x)<\infty<math>
One could have defined the function g thus:
- <math>g\colon\mathbb{R}\rightarrow\mathbb{R}^+<math>
- <math>g\colon\,x\mapsto x^2<math>
While f and g have the same effect on a given number, they are not, in the modern view, the same function since they have different codomains.
The codomain can affect whether or not the function is a surjection; in our example, g is a surjection while f is not.
Discussion
Why should f and g be considered different functions? No doubt this is very confusing for those who are meeting functions for the first time; also I know of no use for the surjection concept (although I still have to read that article). Brianjd