3

This is simply a basic notation question: what is the meaning of $$f:\mathbb R \rightarrow \mathbb R$$ I imagine it's some sort of function to do with the set of real numbers, perhaps some sort of mapping. Until now I've only encountered functions of the form $$f(x)=...$$ or $$f:x\mapsto...$$ Thanks in advance.

2 Answers2

5

It means that the function maps any real number (all real numbers are the domain) to one and only one real number (the codomain is a subset of $\mathbb R$).

For example the following notations are valid

  • $f:\mathbb R \rightarrow \mathbb R,\: f(x)=x^3$
  • $f:\mathbb R \rightarrow \mathbb R,\: f(x)=x^2$
  • $f:\mathbb R \rightarrow \mathbb R^+_0,\: f(x)=x^2$
  • $f:\mathbb R^+_0 \rightarrow \mathbb R^+_0,\: f(x)=\sqrt x$

and the following are wrong

  • $f:\mathbb R \rightarrow \mathbb R^+_0,\: f(x)=\sqrt x$
  • $f:\mathbb R \rightarrow \mathbb R,\: f(x)=\log x$
  • $f:\mathbb R \rightarrow \mathbb R,\: f(x)=\frac 1x$
user
  • 154,566
  • Given a function, is it possible to find the codomain? For example, can you find the codomain of $f(x)=x^2$? – A-Level Student Aug 07 '20 at 09:57
  • @A-levelStudent Yes of course, in this case since $x^2\ge 0$ we have that the codomain is any $U\subseteq \mathbb R$ such that $\mathbb R^+_0\subseteq U$. – user Aug 07 '20 at 10:28
3

It means that $f$ is a function with domain $\Bbb R$ and codomain $\Bbb R$.

  • Just to doublecheck: codomain is simply the range? – A-Level Student Aug 06 '20 at 20:17
  • All the values are reals. But it is possible that some reals are not values. Some texts use "range" for the set of values of $f$. Thus the use of "codomain" where the set of values might or might not be all of $\mathbb R$. – GEdgar Aug 06 '20 at 20:18
  • @A-levelStudent The range is the collection of all the numbers that you can reach with the function, the codomain is simply a set that contains the range. – azif00 Aug 06 '20 at 20:18
  • @A-levelStudent: "Range" is often used more specifically to refer to the set of values that are actually mapped to from the domain. If the function is surjective ("onto"), then they are the same. For example, the function $\sin x$ can be said to be $\mathbb{R} \to \mathbb{R}$, but the range is $[-1, 1]$. – Brian Tung Aug 06 '20 at 20:19
  • Typically, range is the set ${f(x),:, x\in\operatorname{dom}f}$, whereas a codomain for $f$ is just a set $B$ such that $f(x)\in B$ for all $x\in\operatorname{dom}f$. Often, context pushes for one set being chosen as codomain rather than others. –  Aug 06 '20 at 20:19
  • @ Azif00 what else could be in the codomain (as it's a set) apart from the range? – A-Level Student Aug 06 '20 at 20:22
  • The codomain must contain the range, but could contain other values. See my earlier comment for an example. – Brian Tung Aug 06 '20 at 20:23
  • @A-levelStudent For example consider $f : [0,\infty) \to \mathbb R$ given by $f(x) = \sqrt{x}$. Then the range of $f$ is $[0,\infty)$ since the square root is always non-negative. – azif00 Aug 06 '20 at 20:25
  • 1
    @BrianTung Often Codomain and Range are used as synonyms and Image is used to indicate the set of all $f(x)$ with $x$ in the domain. – user Aug 06 '20 at 20:26
  • @A-levelStudent See here –  Aug 06 '20 at 20:28
  • 1
    @user: I know. That's why I only said that "range" is "often used more specifically..." :-) – Brian Tung Aug 06 '20 at 20:35
  • @Gae.S. thanks for that, that was really helpful. Does that mean that the codomain for all functions with real domains is simply $\mathbb R$, as the codomain eg for $f(x)=x^2$ is irrelevant to the actual function? – A-Level Student Aug 06 '20 at 20:37
  • @BrianTung Sorry I didn't see your first comment! That's fine we agree with that definition. Sometimes it's not the case! (as for the "divergent" and the "not existing" case for limits). Regards – user Aug 06 '20 at 20:37
  • @A-levelStudent Nothing of sort. It means that the function $f$, specifically, has domain $\Bbb R$ and codomain $\Bbb R$. –  Aug 06 '20 at 20:44
  • @Gae.S. ok... so in the case of $f(x)=x^2$ with codomain $\mathbb R$, what is the relevance of the codomain to the function? – A-Level Student Aug 06 '20 at 20:50
  • 1
    @A-levelStudent: It means that every value the function takes on (as output) falls within the reals. If you're familiar with function declarations in computing languages, it's like declaring that a function takes a float as input, and produces a float as output (except of course that reals are not floats). That declaration does not means that every float can be produced as an output; it just says that all outputs are floats. – Brian Tung Aug 06 '20 at 21:07
  • @BrianTung , thanks for that. Unfortuantely I'm unfamiliar with computer languages, but thanks to your and Gae.S,' and everyone's combined efforts I think I understand now, so thank you to all who helped :) – A-Level Student Aug 06 '20 at 21:21