Math Help - Codomain vs. Range.

1. Codomain vs. Range.

I do not quite understand the difference between the codomain and the range.

given:

$f:\mathbb{E}\rightarrow \mathbb{Z}$
State the domain, codomain, and range of:

$f(x)=\left |x \right |;x\in \mathbb{E}$

Domain: $\mathbb{E}$
Codomain: $\mathbb{Z}$
Range: $\mathbb{Z}^+$

Domain: $\mathbb{E}$
Codomain: $\mathbb{Z}$
Range: $\left (\mathbb{Z}^{+}\cap \mathbb{E}\right )\cup \left \{ 0 \right \}$

I just don't get how I should specifie the range, or really what the difference between the codomain and range is.

Any help? thx

$\int$

2. I think of a function as a computer, you put in numbers and you get them out.

The set of numbers you put in is the DOMAIN.

The set of numbers you EXPECT to get out is the CODOMAIN.

The set of numbers that you actually do get out is the RANGE. Note that the range is always a subset of the Codomain.

E.g. the function $f(x) = \frac{1}{x}$.

If you put in any real number other than 0, you would expect to get out a real number. But of course, you can not get out 0.

So that means the domain is $\mathbf{R}\backslash\{0\}$, the codomain is $\mathbf{R}$ and the range is $\mathbf{R}\backslash\{0\}$.

If we were to write this in full function notation it would be

$f := \left\{\mathbf{R}\backslash\{0\} \to \mathbf{R} | f(x) = \frac{1}{x}\right\}$

3. A function is a triple consisting of the domain A, the codomain B, and the set of pairs F (a subset of A x B), or a law F mapping elements of A into elements of B. Given the third element F, the domain can be reconstructed: it is the set of first elements of all pairs. Similarly, the set of second elements of all pairs is the range. The codomain, however, cannot be reconstructed from F; it can be an arbitrary superset of the range.

In other words, the relationship between F and the domain A is fixed and objective; the relation between F and the codomain B is subjective and is a matter of politics .

So, if $f:\mathbb{E}\rightarrow \mathbb{Z}$ is given, then the codomain of $f$ is $\mathbb{Z}$. It could be that $f$ does not cover the whole $\mathbb{Z}$, but someone who designed the function decided to give it this codomain. This is a matter of definition.

Next, the range does not have to be all of $\mathbb{Z}^+$. E.g., if $\mathbb{E}=\{-1,0,1\}$, then the range of $f$ is $\{0,1\}$. By the way, is $\mathbb{E}$ some arbitary set? This does not seem to be a standard notation.

4. $\mathbb{E}$ in my book is defined to be the set of all even integers.

So, the codomain is the general superset in which all possible values for the range COULD be in and the range is the specific set of outputs?
so
$f:=\left \{\mathbb{Z}^{+}\rightarrow \mathbb{Z}^{+}|f(x)=2x+1\right \}$
The codomain would be $\mathbb{Z}^{+}$ But the range would be $\mathbb{Z}^{+}\setminus \mathbb{E}$

5. So, the codomain is the general superset in which all possible values for the range COULD be in
Any member of the range MUST be in the codomain.

so
$f:=\left \{\mathbb{Z}^{+}\rightarrow \mathbb{Z}^{+}|f(x)=2x+1\right \}$
The codomain would be $\mathbb{Z}^+$ But the range would be $\mathbb{Z}^{+}\setminus \mathbb{E}$
Again, I am not sure about the notation, but since the book writes $\left (\mathbb{Z}^{+}\cap \mathbb{E}\right )\cup \left \{ 0 \right \}$, it seems that $0\notin\mathbb{Z}^+$. In this case, the range of $f$ is $\{3,5,\dots\}$, i.e., 1 is not in the range.

6. By the way the word "range" has somewhat varied usage. The unambiguous word for what you mean by it is image.

Sometimes authors use "range" to refer to image (as is done all throughout this thread) and sometimes authors use "range" to refer to codomain!