5

I see lots of reasons provided for distinguishing between codomain and image. But it seems to me I can take all those reasons and make them into reasons for making a similar distinction on the input side (e.g. to discriminate between a 'domain of discourse' and 'domain of definition'). For example, here are some quotes from a discussion on the need to distinguish between 'image' and 'codomain' Why is it important to have a discrepancy between image and codomain? :

for many functions it's not particularly important what its image is, while at the same time it would be tricky to figure this out. The codomain however is easy, it describes the type of value one can get. Is it a real number, a complex number, a fraction?

For some functions, the same is true for the input side. That is, when dealing with a function I want to describe the type of input values (real numbers, or complex numbers, or?) that I would like that function to deal with, but the function may be a really hairy function for which its actual domain is tricky (if not impossible, if I define some function over Turing-machines and have their halting behavior be an essential aspect as to whether the output value is defined) to figure out.

Codomain and Image of a function are two completely different concepts. The codomain of a function often has a structure, like being a topological space or something like this. It will be very inconvenient to put all that structure in the image, which is only a set, and often not such a nice one.

Again, I think the same could be said on the input side ... for some functions it will be very inconvenient to describe its domain, as it's not a nice one, and as it's just a set, rather than a structure. I would like two similar concepts on the input side as well.

You cannot speak about surjectivity (that is, whether it is onto) otherwise. If we would define the codomain of every function to be its image, then every function would be surjective.

I can likewise say: "You cannot speak of totality if you don't distinguish between 'domain of discourse' and 'domain of definition'. If we would define the 'domain of discourse' to be its 'domain of definition', then every function would be total."

What is a function? Informally, it is a process, or an assignment, from an input set to an output set. It is not just the process or assignment that forms a function, but specifying the input and output is part of what it is.

Right ... so that would suggest we define a 'domain of discourse' before we figure out for which values the function is actually defined.

I need to define a co-domain before the image makes sense.

Same for the input: if you give me something like $f(x) = 1/x$, I would first need to know the domain of discourse (real numbers? Complex numbers?) before I can figure out its actual domain of definition.

Finally, if it is so important for functions to have a codomain in addition to an image, why is it that when I take the inverse of a function (assuming it has one), its codomain will always be the same as its image, namely the domain of the original function? It seems to me that if you do make a distinction between 'domain of discourse' and 'domain of definition', then right there you have your 'codomain' and 'image' of the inverse that actually can be different and serve their respective purposes for the inverse.

So, my question is this: why then don't we typically make a similar discrepancy on the input as we do on the output? (and yes, I believe some mathematical texts do make this distinction, but my question is why don't we typically make this distinction?) Why don't we have two terms on the input side that are the conceptual counterparts of 'co-domain' vs 'image' on the output side? Is this mere historical 'accident' and mostly a matter of 'well, we've always done things this way', or are there actual good practical reasons for this?

Bram28
  • 100,612
  • 6
  • 70
  • 118
  • We consider functions restricted to subsets all the time. In topology we are often concerned with extending maps from subsets to the whole set. Is that the kind of thing you are asking? – J126 Oct 17 '16 at 13:21
  • 1
    "Partial function" is a term sometimes used to capture exactly what you are talking about. And there are terms for the domain versus domain of definition for a given partial function. – Hugh Denoncourt Oct 17 '16 at 13:37
  • @JoeJohnson126 I realize that we sometimes do make the distinction. But my question iss why we don't typically make this distinction. For example, any high school discussion of functions mentions domain, image, and codomain ... and that's it. But it would make sense to distinguish between the two different conceptual notions of domain analogous to how we separate between image and codomain. For example, when asked to graph a function, the 'domain of discourse' or 'maximal domain' would tell students what the axes should be like, after which they can worry about actual input and output. – Bram28 Oct 17 '16 at 13:54
  • @HughDenoncourt Correct ... but why is the idea that functions can be total or partial just as common as the idea that functions can be surjective or non-surjective? Why are functions typically assumed to be total? – Bram28 Oct 17 '16 at 13:57
  • What are you asking is "standard" in e.g. Computability theory : "a partial function from X to Y is a function $f : X' \to Y$, for some subset $X'$ of $X$. It generalizes the concept of a function $f : X \to Y$ by not forcing $f$ to map every element of $X$ to an element of $Y$. If $X' = X$, then $f$ is called a total function and is equivalent to a function." – Mauro ALLEGRANZA Oct 17 '16 at 14:01
  • @MauroALLEGRANZA But why isn't it 'standard' in high school? Wouldn't it be just as useful to have two concepts on the input analagous to image and codomain on the output? Then, if students are asked to graph a typical $y=f(x)$ function, the 'domain of discourse' would tell the students what the X-axis is, just as the codomain would tell them what the Y-axis is, after which students can worry about what actual values would go in and come out of this function. – Bram28 Oct 17 '16 at 14:16
  • @Bram28: I don't know, hence the comment instead of answer. With collections of functions, all continuous functions from [0,1] to R, for example, we often are really interested in the total functions. Analagous partial function collections exist but perhaps they don't arise as frequently as their total function counterparts. I'm inclined to speculate the preference is nothing more than historical accident and popularity. – Hugh Denoncourt Oct 17 '16 at 14:17
  • At the end is only a matter of convention (and tradition); we can simply say that every function is defined on a subset of the "Universe", where Universe is the collection of all objects whatever... – Mauro ALLEGRANZA Oct 17 '16 at 14:28
  • @HughDenoncourt But it is somewhat unfortunate historical accident and popularity, wouldn't you say? I mean, many high school students get really confused about 'domain', 'codomain', and 'image', and my hypothesis is that when the 'domain' is said to be the 'actual input values', the 'image' the 'actual out[put values', and the 'codomain' the 'possible output values', it seems as if the 'domain' should 'go with' (or is the 'counterpart of') the 'image', and yet the 'co-' in 'co-domain' suggests that the codomain should 'go with' the domain. – Bram28 Oct 17 '16 at 14:38
  • @HughDenoncourt And so I bet that if we were to have two terms on the input, that would be the natural counterparts of what we do on the output, high school students would be a lot less confused about terminology ... though you would have to make sure that a word like 'domain' goes with 'co-domain', and ??? with 'image' ... which is a definite change from current practice. – Bram28 Oct 17 '16 at 14:41
  • @MauroALLEGRANZA Well, it would indeed be pretty pointless to say that the domain of discourse is the universe of all objects. That's why I suggest to have a domain of discourse that provides some initial focus as to what we're talking about: is this a function dealing with real numbers, natural numbers, complex numbers, apples, Turing machines, or what? And then we can worry about actual input and output values. – Bram28 Oct 17 '16 at 14:52
  • @Bram28: Can you provide an example at the high school level where you think such a concept would clarify ideas? I don't see how introducing a superfluous notion would help students; it's just one more thing to learn, which is at least as abstract as the other things. And the notion seems certainly superfluous; if it were not then it would have been introduced already. – Will R Oct 17 '16 at 15:10
  • @WillR Sure. Take the function $f(x)=1/x$. The first thing I need to tell the students is whteher I am proposing this to be a function over the natural numbers, real numbers, complex numbers, or whatever have you. So there I would say: I want this to be about complex numbers (if that is indeed what I wanted), and since they all map to othe complex numbers, we have a function from complex numbers to complex numbers. So those I would call the domain and codomain of discourse. And then I point out the 0 case, and removing the 0 gives me the domain and codomain of definition. – Bram28 Oct 17 '16 at 16:54
  • @WillR I think this is much easier to remember than the current terminology. Yes, it is 4 terms rather than 3, but they come in nicely logical pairs, so cognitive scientists will point out that really you only remember 2 chunks of information, rather than 4, while with the current terminology it is still 3, since there is no natural connection between the modern 'domain' and 'codomain' as I pointed out earlier. Finally, the argument that 'we would have done this if it was useful' is merely circumstantial. I still see no actual reason not to have two different notions of 'domain'. – Bram28 Oct 17 '16 at 16:58
  • @Bram28: I'm curious what ed or math-ed focused groups would have to say about that idea. My understanding of high school math (in the US) is that we don't even teach image versus co-domain. It's just called "range". And there are these "find the domain" questions that really mean "find a non-extendable domain that makes this operation well-defined". Once we hit "intro to proof" courses and higher in undergraduate math, we then get precise about domain, co-domain, and image. I agree that, in principle, we could have uniform terminology throughout with the generalization. – Hugh Denoncourt Oct 17 '16 at 17:01
  • @Bram28: So what you're doing is saying "the domain (of definition) of my function is a subset of $X$", and then later on your specifying the actual domain. In practice, when I have a function, I just specify the domain from the get-go. I think it's better to get students to adopt the more streamlined mindset because in their later work that's what they will find most useful. Moreover, the phrase "wherever the function is defined" exists for a reason (not that I advocate such language); it seems to encapsulate exactly what you are describing. – Will R Oct 17 '16 at 17:14
  • @WillR But if streamlining is the goal, and thus go straight to the domain on the input side, then why not go straight to the image on the output as well? Why then bring up the codomain at all? Again, why treat things on the input side differently the way we treat things on the output side? – Bram28 Oct 18 '16 at 01:31
  • @Bram28: I guess one reason is that we often define explicit examples of functions by way of some formula (from your talk of Turing machines, I assume you are well-aware of how rarely such a description of a function is actually available in general, but it's useful for the working mathematician, or at least the student). Then you most certainly know what it allowed into your function, but it may not be so immediately apparent what can come out. The fact that the image of $\tan$ is $\mathbb{R}$ is a theorem to be proved; the fact that it can't take certain inputs is true by definition. – Will R Oct 18 '16 at 06:59
  • @WillR So that is the first reason that I listed in my original post for having a codomain in addition to an image, and my response was, and still is, that the same can be said on the input side. For some functions, it is just as tricky to figure out its domain, so why not have a similar split there as well between the structured input set, i.e. the kinds of objects that I would like the function to restrict itself in the first place, and the subset of objects from that initial structure that the function can actually work on. – Bram28 Oct 18 '16 at 11:45

3 Answers3

1

I have a couple of answers.

$1.$ This is the same as my comment. Whenever you introduce sets, you introduce the notion of a subset. If you are writing out the definition for what a function is, the only data that are required are domain and codomain. You usually then talk about what the image is. In my experience, any class that bothers to define a function will also have defined subset at one point. I would say it is standard practice to both talk about image and restriction to subset after you've defined a function.

$2.$ Whenever we are using a function, we usually have a domain in mind. As in vadim123's answer, there is usually an obvious codomain to ensure we have a well-defined function. Sometimes it's interesting to see what the image is. This sometimes takes work. So, you end up saying "This function is from said domain to said codomain. We will now prove that the image is blank." We care less about the occurring in the domain, because, we would've just restricted the domain to the subset we cared about in the first place. You usually don't say "I have a function $f:X \to Y$, but I'll restrict it to $f:A \to Y$. You would just start with a function $f:A \to Y$ in the first place, if that's all you cared about. I do admit there are exceptions to this rule. But, I would say they are less common.

J126
  • 17,451
  • On 1. If you talk about what is 'required', then I could question why we have a notion of a 'codomain' in addition to the 'image'. It seems to me that we add the notion of the codomain because it provides an important conceptual role: it tells us what kinds of objects we are talking about. I would like something that serves that same purpose on the input side: indicate the set of kinds of objects that the function is supposed to work with, and then we can restrict using subset if needed. – Bram28 Oct 17 '16 at 17:08
  • On 2. Yes, we have a domain in mind ... But in my eyes that domain we have in mind (e.g natural numbers or real numbers, or some other 'nice' set of objects) is different from what we find out the function will actually work on (e.g we may need to throw out some objects from this inital domain). But I wouldn't change the notation ... I would say use $f(x): A \rightarrow B$ to indicate the domain and codomain of discourse and keep it that way; this notation would be a great way to indicate the initial 'here is what we have in mind'. – Bram28 Oct 17 '16 at 17:14
0

Why do not do this at the input side of a function?

We do it!

Two examples come to mind:

  1. Convex analysis. Here you consider convex real valued functions $f$ defined on normed real vector spaces $X$. You define these functions (for example) by the inequality $$ f(\lambda x + (1-\lambda) y)\leq \lambda f(x) + (1-\lambda)f(y) $$ which should hold for all $x,y\in X$ and $\lambda\in [0,1]$. However, many interesting functions are not defined on the whole space (e.g. the entropy on euclidean space) so it is very convenient to let the functions take on the value $+\infty$ (and note that this keeps the definition intact since we can compare $\infty$ to every other real number - no other operations with $\infty$ are needed here). So you deal with functions $$ f:X\to\mathbb{R}\cup\{+\infty\}. $$ But then you often want to talk about the set on which $f$ takes finite values and this has an extra name and notion. You set $\operatorname{dom}(f) = \{x\mid f(x)<+\infty\}$ and call the the domain or effective domain of $f$. Moreover, one says that a convex function is proper if its domain is not empty.
  2. Unbounded operators. When we want to describe differential operators like the Laplace operator $\Delta$ on function spaces like $L^2(\Omega)$ for some subset $\Omega\subset\mathbb{R}^d$ we note that we do not get well defined mappings. One could try to figure out subsets of $L^2$ where the domain could be (which leads to things like Sobolev spaces), but this is often cumbersome and prevents one from getting started in the first place. An idea, due to von Neumann, I guess, is to define unbounded operators $T:X\to Y$ between two Banach spaces to be defined as linear mapping defined on a subspace $D(T)\subset X$. We still write $T:X\to Y$ but usually use the domain $D(T)$ to write $T:D(T)\subset X\to Y$…

Probably there are more examples I don't know, but what is true, that the distinction between "possible arguments" and "actual arguments" is not that present in undergraduate courses than the distiction between "possible outcomes" and "actual outcomes".

Dirk
  • 11,680
  • Yes, what you say at the end there is what bothers me: why is this distinction not made as a matter of standard practice? I would think it would be a very useful distinction, and as I indicated in my original post, all the conceptual and practical reasons for separating between image and codomain, I think can be applied to the input side as well. – Bram28 Oct 17 '16 at 14:08
0

Well, how to answer that...

First of all: are you familiar with the term "maximal domain"? Given a rule like your $f(x) = 1/x$ and a "nice" set (e.g. $\mathbb{R}$), the maximal domain is the largest subset of this set on which the given rule gives a function.

So why don't we just write $f : \mathbb{R} \to \mathbb{R}, x \mapsto 1/x$ and let everyone figure out the maximal domain?

That has multiple reasons:

  • A function should always be well defined, i.e. for every x in the domain we want to know that $f(x)$ exists; even if we don't know how to compute it.

  • Important properties of the function (injective, surjective,...) may change depending on the domain.

  • For numerical purposes (e.g. approximate a function at a certain point) the domain is very important. For example given the rule $f(x) = 1/x$ it makes quite a difference if we say $x \in \mathbb{R} \backslash \{0\}$ or if we say $x \in \mathbb{R}$ and $|x| > 1$.

There are many more reasons depending on what you want to do with the function, but the base line is that the same rule can behave totally different depending on the domain it is defined on.

edit: Look here for a great example on why not giving a domain can cause problems: Differentiability of $x/x$

Dirk
  • 6,359
  • OK, but why not have those two different concepts of 'domain' then? You list several important things we want to be true for the domain ... I say: yes, for its 'domain of definition'. But in addition to that I think it is quite natural to have a 'maximal domain' or 'domain of discourse' to specify what kinds of things I am talking about: something that would serve the same purpose as what the codomain does on the output. I am still not clear why we don't typically make this conceptual distinction. – Bram28 Oct 17 '16 at 14:04
  • It is done, but only if needed. The basics we need to consider the function as a black box is "what goes in and what comes out?" So we need a domain and we need a codomain. Everything else are just extras that we add in case that we need them. E.g. the maximal domain is important in the question if a function has a continuous extension at some point. The question for the image is important if we are interested in computing preimages or inverses. I suppose the image is used more often because it is often easier to understand and compute. – Dirk Oct 18 '16 at 14:18
  • But if you take this approach, why even bring up the codomain? Why not say that the input is the domain and the output is the image and leave it at that? To get the inverse all we need is the image. – Bram28 Oct 18 '16 at 21:18
  • OK, so here is my issue: I can understand it if people take the more 'practical' route like you say, and just consider inputs and outputs, i.e. 'domain' and 'image' (or 'range') and leave it at that. And I also understand that there are good reasons to consider objects beyond this ... but why do we typically only do that on the output side? It just strikes me as a major source of conceptual confusion, especially as we now have a notion of a 'codomain' that is not at all what you would expect the 'co-' of the 'domain' to be (if anything is the 'co-' of the domain, it would be the 'range'). – Bram28 Oct 18 '16 at 21:23