Properly define a functions range and domain

analysiscalculusfunctions

If one wants to be pedantic $f(x)$ is not a function, it is just the value at the point $x$ for some unknown function.

Say I want to properly define $|x|$ as a function for $|x|\leq 1$.

Is it correct to say: "Let $f \colon [-1,1] \to \mathbb{R}$ be
a function such that $f(x) = |x|$.
or would one have to properly define the range as well? E.g Let $f\colon [-1,1] \to [0,1]$?

I often see functions defined as $f\colon \mathbb{R} \to \mathbb{R}$
when their actual range and domain are much smaller…

Any help clearing this up would be great.

Best Answer

Yes, in your example, it is correct to say $f:[-1,1]\to\mathbb{R}$. It is not necessary to specify the range.

The target space $\mathbb{R}$ is called the codomain. The range or image of $f$ is $[0,1]$. The image/range is always a subset of the codomain, but not always equal to the codomain.