I understand much so that the image is a subset of the co-domain of a function. It is also my understanding that the co-domain of a function is arbitrary, which would by extension mean whether or not a function is surjective is also arbitrary (For $f:X \rightarrow Y$, if $im(f)=Y$, we say the function $f$ is surjective). As an author, this frustrates me. I wish to know the benefit of distinguishing between the image and co-domain of a function. It seems it would be far more clear to speak of a function as so: $$f(\mathbb{N})=A \text{ where } im(f)=A \text{ and } f:\mathbb{N} \rightarrow A$$ If one wished to speak of the value of a function at a particular value $n$ then you would see the traditional $f(n)=k \text{ where } k \in A \text{ and } n\in \mathbb{N}$.

Feelings, comments, suggestions?



  • $\begingroup$ As a reminder, $im(f)$ is the image of a function $f$. $\endgroup$ – Jordan Hess Jan 18 '16 at 21:44
  • $\begingroup$ It is often convenient to arrange that the domain and co-domain of a function are the same sets, particularly when you are dealing with a family of functions (such as when you are trying to solve for a function in some family like polynomials). Then the issue of whether a function is surjective (or injective) can be sensibly treated without arbitrary choices. $\endgroup$ – hardmath Jan 18 '16 at 21:45

One practical reason for making the distinction between range and codomain is that one doesn't always know the range of a function in advance of defining it. For example, what's the range of $f(x) = {\rm sin}(x) + {\rm cos}^2(x) + e^{-x^2} + \pi$? Off hand, I have no idea, but I certainly know it's a subset of $\mathbb{R}$.

I tend to think of the codomain as the "natural target" of the function, and the range as the set of realizable outputs within that target.

  • $\begingroup$ The issue yet is that it is claimed different co-domains, all else the same, specify different functions. This to me is unsettling as a single variable function has but only one image. $\endgroup$ – Jordan Hess Jan 18 '16 at 22:29

A function is not defined just by the rule of assignment. You must also specify the domain and the codomain (also commonly called range). Neither of these is arbitrary. In particular, you must have in mind a specific codomain before you can tell if a function is surjective.

So "$f(x)=x$ for $x\in[0,1]$" does not completely define a function. one must also say, for example, that $f:[0,1]\to [0,1]$, or (say) that $f:[0,1]\to\mathbb R$; the first function would be surjective, the second not. But be assured that they are different functions. The codomain is just as important as the domain in defining a function.

  • 1
    $\begingroup$ I think he is actually asking WHY mathematicians make a difference between co-domain and image. You're just repeating that they make the difference. $\endgroup$ – Paul K Jan 18 '16 at 21:56
  • $\begingroup$ "the codomain (also commonly called range)" No. Why not check any source on this? $\endgroup$ – Did Oct 16 '17 at 17:35
  • $\begingroup$ @Did : In fact, Yes. See Munkres, Topology, for example. It's purely a matter of usage and to try to state otherwise is simply ignorant. I'm not just making up terminology to suit myself. Perhaps your instructors or texts never used the term? So what? If you think that means my usage is incorrect, then you can keep thinking that. But thinking it doesn't mean it is right. $\endgroup$ – MPW Oct 16 '17 at 19:21
  • $\begingroup$ Deliberately confusing the OP? Not nice... $\endgroup$ – Did Oct 16 '17 at 20:28

The best answer is that you should spend a couple of hours reading the first 20 pages or so of Sets for Mathematics. This should clarify everything enormously, and I can only sketch the story here. But anyway, that story goes something like this:

There's two different paradigms at work here. In one paradigm (called "material set theory"), functions do not have unique codomains, because codomains are weird and artificial in that framework. In the other paradigm (called "structural set theory"), functions do have unique codomains, because codomains are built very deeply into the foundations of that framework and there's simply no way to get rid of them.

Let me elaborate a bit.

From the perspective of material set theory, sets can overlap in all sorts of complicated ways, e.g. we have $\mathbb{C} \supseteq\mathbb{R}$. This means, for example, that whether we have $\cos_{\mathbb{R}} : \mathbb{R} \leftarrow \mathbb{R}$ or $\cos_{\mathbb{R}} : \mathbb{C} \leftarrow \mathbb{R}$ is (forgive the pun) immaterial and irrelevant, and we can safely ignore the distinction. So in this framework, the whole concept of a codomain can be safely ignored.

However, from the perspective of structural set theory and/or category theory, sets "float free" in the universe, and they don't have apriori inclusions; so for example, its not really correct to say "it holds that $\mathbb{C} \supseteq \mathbb{R}$," because $\mathbb{C} \supseteq \mathbb{R}$ is not a boolean (truthvalue). What's really going on, under this view, is that there's a unique homomorphism of $\mathbb{R}$-algebras of type $\mathbb{C} \leftarrow \mathbb{R},$ call it $\mathbb{C} \supseteq \mathbb{R}.$ Hence, we have:

$$\cos_{\mathbb{R}} : \mathbb{R} \leftarrow \mathbb{R}, \qquad (\mathbb{C} \supseteq \mathbb{R}) \circ \mathrm{cos}_\mathbb{R} : \mathbb{C} \leftarrow \mathbb{R}$$

By an abuse of notation, we sometimes omit the $(\mathbb{C} \supseteq \mathbb{R})$ and wind up with a situation where $\mathrm{cos}_\mathbb{R}$ appears to have two different codomains, but strictly speaking, these are different functions.

Anyway, like I said, you really have to run off and read the first 20 pages or so of Sets for Mathematics (or a similar book) for this to all make sense.

  • $\begingroup$ I will do just that and then get back with you. Thank you. $\endgroup$ – Jordan Hess Jan 19 '16 at 20:41
  • $\begingroup$ @JordanHess, any luck? Codomains should be making a bit more sense now. $\endgroup$ – goblin Jan 20 '16 at 16:55
  • $\begingroup$ Just getting into the text. "This justifies the phrase “the value”; the value of f at x is usually denoted by f (x); it is an element of B. Thus, a mapping is single-valued and everywhere defined (everywhere on its domain) as in analysis, but it also has a definite codomain (usually bigger than its set of actual values)." I am very interested to continue this reading and evaluate the authors justifications for their claim a co-domain is definite. Will be getting back with you soon! $\endgroup$ – Jordan Hess Jan 21 '16 at 0:00
  • $\begingroup$ It appears the authors of "Set for Mathematics" never justify their claim that a co-domain is definite. $\endgroup$ – Jordan Hess Jan 21 '16 at 2:22
  • $\begingroup$ Look @JordanHess, my very first question here was about codomains. So I've been where you are, and I've asked exactly the same questions that you're currently asking. Eventually, a day came when I finally understood enough mathematics that codomains suddenly made sense. So I know the path you have to take. Its not an easy path. But if you want to understand what codomains are and why they're inescapable, you have to run off and learn some things, just as I did. $\endgroup$ – goblin Jan 21 '16 at 4:13

There are some situations in which a function $f:X\to Y$ has certain properties, but the function $g:X\to Y'$ (where $Y\subset Y'$) for which $f(x)=g(x)$ for all $x\in X$ has different properties. Examples: (1) Suppose a $S\subset T$. Then $i_x:S\to S$ is the identity function and the "same" function with specified codomain $T$ is the inclusion function. If you allow the codomain to be unspecified, then the identity function and the inclusion function are the "same function". It makes more sense to say they are different functions and to point out that these two functions have the same $graph$. (2) The function $t\mapsto \sin^2 t+cos^2 t:R\to R\times R$ has the unit circle as image. The complement of the image is disconnected. If you specify the codomain to be the complex numbers, the complement of the image is connected. (3) Addition of real numbers is a binary operation on the reals. It is not a binary operation on the complex numbers.

Now, it must be admitted that in a great many situations in math, it doesn't make any difference what the codomain is, for example in a first-year calculus text. In that case, you can talk about a function without saying what its codomain is and nothing bad will happen. Then the distinction can remain in the background.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.