If there is a need to distinguish between 'image' and 'codomain', why not do this on the input side of a function?

1k Views Asked by At

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?

3

There are 3 best solutions below

1
On

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".

4
On

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$

2
On

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.