3

This is a quick question. When people write $f:I\to J$ for instance, does $J$ need to be the range of $f$ or can it be any set containing the range of $f?$ For example, is $g(x)=\pi$ an $\mathbb{R}\to\mathbb{R}$ function?

5 Answers5

3

Usually, $f:A\to B$ means the domain of $f$ is $A$ and $\forall a\in A$, $f(a)\in B$. The map does not have to be injective or surjective. The range of $f$ is usually denoted as img$(f)$ or the image of $f$, which in this case is a subset of $B$.

NECing
  • 4,095
3

$f:X\to\Bbb R$ simply means that all of our function values are real. It doesn't mean that all real values are obtained by our function. ($\Bbb R$ in this case is called a codomain for our function $f$.) Your example $g$ is indeed an $\Bbb R\to\Bbb R$ function (so long as we require that $x$ is real, and allow $x$ to take on any real value), even though it's certainly not the case that all real values are obtained by $g$.

Cameron Buie
  • 102,994
  • 1
    +1 Has there every been a more basic question with more obtuse and wrong answers? This one is just right, however. Only thing that would make it clearer is to add that, yes, $f(x)=\pi$ is a function. :) – Thomas Andrews Mar 14 '13 at 04:55
  • I guess if I am going to complain about obtuseness, I should have been more specific. Yes, $f(x)=\pi$ is a function $\mathbb R\to\mathbb R$. – Thomas Andrews Mar 14 '13 at 05:05
  • It's somewhat remarkable to me that, as basic as functions are to mathematics, I've found more fundamental disagreement on functions than on any other topic I've discussed on M.SE. – Cameron Buie Mar 14 '13 at 05:10
  • But some of the answers here were just completely wrong, and others were obtuse, not getting the the heart of the question, which, expressed as a mathematician would, is, are all $f:\mathbb R\to\mathbb R$ onto? For example, when OP is asking a basic question like this, the response should be to use words like "injective" without definition. Even "range" is pointless, because the OP's question indicates he is confused about whether the "range" is the "image" or not. – Thomas Andrews Mar 14 '13 at 05:25
  • A fair point. I've never seen "range" meaning anything different from "image", myself, but wikipedia informs me that there is some ambiguity of usage there. I have rephrased my answer to reduce the obtuseness on this page. ;-) – Cameron Buie Mar 14 '13 at 05:41
  • 1
    Hah, I hadn't noticed you had used "range," because your answer got to the point of the basic question quickly enough and I was so relieved. :p – Thomas Andrews Mar 14 '13 at 06:00
3

Here's a point I would like to stress, though: You don't START with something like $g(x) = \pi$ and ASK if this is a $\mathbb{R} \rightarrow \mathbb{R}$ function. When you write $f:I \rightarrow J$, the sets $I$ and $J$ are part of the DEFINITION of the function.

In other words, I could define a function $g$ by saying $g:\mathbb{R} \rightarrow \mathbb{R}$, $g(x) = \pi$. And I could define a function $h$ by saying $h:\mathbb{R} \rightarrow \{\pi\}$, $h(x) = \pi$. And these are DIFFERENT functions.

Alex Zorn
  • 4,304
  • Yes, this is the problem with defining functions in set theory merely as subsets of $X\times Y$ - there is no way to determine the actual codomain - there isn't even a set of possible codomains. :) This means that you can't say a function is onto, only that is onto some set. – Thomas Andrews Mar 14 '13 at 05:00
  • -1. I would say that $\sin : \mathbb{R} \to \mathbb{R}$ is the same function as $\sin : \mathbb{R} \to [0,1]$. The $f : X \to Y$ is just a notation convention and serves only to help, it is not required. Moreover, there are better ways to $\color{red}{\text{emphasize}}$ words than ALL CAPS. – dtldarek Mar 14 '13 at 08:31
2

It can be any set containing the range of $f$. So, your example $g(x)=\pi$ is an $\mathbb{R}\to\mathbb{R}$ function.

If the range of a function $f:A\to B$ is exactly $B$, we call it surjective.

abc
  • 148
  • 5
-5

condensed from comments received :

$$f:X \to Y \equiv \forall x \in X \quad \exists y \in Y \text{ such that } f(x)=y$$ $$f:X \to Y \land f_\text{ onto/surjective} \equiv \forall y \in Y, \, \exists x \in X \text{ such that } f(x)=y$$ $$f:X \to Y \land f_\text{ 1-1/bijective} \equiv \forall x \in X \quad !\exists y \in Y \text{ such that } f(x)=y$$

jimjim
  • 9,675
  • 4
    Some (and not all) reals to all reals would *not* be signified by $\Bbb R\to\Bbb R$. – Cameron Buie Mar 14 '13 at 04:48
  • 1
    Yes, this is definitely wrong. It means that the set of values of $f(x)$ is in the reals, but the set of values that $x$ can take must be all the reals. – Thomas Andrews Mar 14 '13 at 04:51
  • @CameronBuie : then what would it be signified with? – jimjim Mar 14 '13 at 04:51
  • @ThomasAndrews : Then what would mean the others one? – jimjim Mar 14 '13 at 04:53
  • If you are signifying that $f$ is mapping of a subset $X\subsetneq R$ to all reals, then you'd say that $f:X\to\Bbb R$ is an onto (surjective) function. The $X$ tells you the domain. The onto (surjective) part together with the $\to\Bbb R$ part tells you that the map is to all the reals. – Cameron Buie Mar 14 '13 at 04:54
  • If we have a function on some subset of $X$ to $Y$, we sometimes call it a "partial function." – Thomas Andrews Mar 14 '13 at 04:57
  • 1
    $1-1$ is synonymous with injective, not bijective. Injective and surjective together means bijective. – Thomas Andrews Mar 14 '13 at 08:24
  • I'm also not clear what you mean by $!\exists$. – Thomas Andrews Mar 14 '13 at 08:26
  • This is still incorrect. If $f:X\to Y$ is bijective, then for all $y\in Y$, there is a unique $x\in X$ such that $f(x)=y$. You have it the other way around. (As noted by Thomas Andrews, 1-1 is not the same as bijective, but you did not accurately describe either.) If you have $f:X\to Y$, assuming no other properties of $f$, then this already means that for each $x\in X$ there is a unique $y\in Y$ such that $f(x)=y$. – Jonas Meyer May 22 '13 at 04:49