10
$\begingroup$

We know that Range of a function is a set off all values a function will output.
While Codomain is defined as "a set that includes all the possible values of a given function."

By knowing the the range we can gain some insights about the graph and shape of the functions. For example consider $$f(x)=e^x$$By knowing that the range of the function is $(0,\infty)$,we can conclude that the graph lies above the $X-axis$.

My Questions

Does knowing codomain of a function give any insight/information about the function?

Every function has a specific range and it is universal? Is it true for codomain also?

What I am trying to say is that range of $\sin x$ is $[-1,1]$.While as per my understanding codomain is $\mathbb R$ (Real Numbers).But defining codomain of $\sin x$ as say $(-2,2)$ is not going to change anything. So $(-2,2)$ is a valid codomain for $\sin x$. Am I right?

What compelled mathematicians to define codomain, why were they not happy with the concept of range only?

$\endgroup$
4
  • $\begingroup$ A sort of half-answer to your last question, which might not even make sense to you yet: one of the themes of modern mathematics is that we can learn a lot about an object (a set, group, whatever) by studying functions into or out of that object (contrast this with the way you posed your question -- learning about $f(x) = e^x$ by studying the possible domains/codomains). Framed in this way, talking about a function without talking about the objects involved would be pretty unproductive! $\endgroup$
    – fish
    Commented Jul 16, 2020 at 5:39
  • 3
    $\begingroup$ A related fact that many students find confusing is that the general definition of a function doesn't have to be a "formula". For example, you can have a (rather silly) function from the set $A = \{\text{cat, dog}\}$ into the set $B = \{\text{coffee, tea, orange juice}\}$ defined by $f(\text{cat}) = \text{coffee}$ and $f(\text{dog}) = \text{tea}$. In such a situation it would be completely meaningless to talk about the function without first defining its domain and codomain! $\endgroup$
    – fish
    Commented Jul 16, 2020 at 5:43
  • $\begingroup$ @fish "which might not even make sense to you yet:" yes it is true.But i could perfectly understand that dog anf tea example you gave.Thank you.Could you please recommend some books for further reading (self study) on this topic?So that it makes sence to me,I am a high schooler.. $\endgroup$ Commented Jul 16, 2020 at 5:54
  • $\begingroup$ Any introductory abstract algebra should do. I'm hesitant to recommend any specifically, though, so you should do some research. $\endgroup$
    – fish
    Commented Jul 17, 2020 at 5:45

3 Answers 3

8
$\begingroup$

What I am trying to say is that range of $\sin x$ is $(-1,1)$.

You made a mistake here. The range of sine is a closed interval, which we denote with $[-1, 1]$, not an open one $(-1,1)$.

While as per my understanding codomain is $\Re$(real numbers).

Yup, real numbers. But they are usualy denoted with $\mathbb R$ (LaTeX/MathJax \mathbb R), not $\Re$ (\Re).

But defining codomain of $\sin x$ as say $(-2,2)$ is not going to change anything.

You're wrong. Redefining the codomain may change properties of a function. Giving the sine function a codomain of $(-2,2)$ doesn't change it much, but giving it $[-1,1]$ changes a lot:

$$\sin : \mathbb R \to [-1,1]$$

is a surjection (a function "onto"), while

$$\sin : \mathbb R \to \mathbb R$$

is not.

Redefining a domain may change the function's properties, too:

$$\sin : \left[0, \tfrac\pi 2\right] \to \mathbb R$$

is an injection (a function "into"), while

$$\sin : \left[0, \pi\right] \to \mathbb R$$

is not.

To answer specifically the last sentence from the question:

What compelled mathematicians to define codomain why were they not happy with the concept of range only.

Here I copy what I previously added in the comment below:

we need codomains, because we sometimes need to consider functions, whose definition is known together with a codomain, but the range is unknown. Sometimes we do not even have the definition, only some properties are known and we are satisfied with knowing the codomain without narrowing it to the range ("suppose $f$ is a real-valued function such that...; show $f$ is constant" – we know the codomain is $\mathbb R$ and we just need to show the range is one-point, not necessarily which one).

Expansion:

Be also aware that the range of a function may be hard to describe. For continuous real functions we consider at schools the range is often an interval or a sum of intervals – but those are special cases. There are functions with much less regular ranges.
For example see this question at Math.SE: Show that the function f is continuous only at the irrational points for a function described also at Wikipedia: Thomae's function – it is defined on real numbers, but its range is a set of reciprocals of all natural numbers and zero: $$\mathbb R \to \{\tfrac 1n:n\in\mathbb N\}\cup\{0\}.$$ One can easily declare a function whose range is literally any predefined nonempty set $S\subseteq\mathbb R$ – just choose any $s\in S$ and define: $$f:x\mapsto \begin{cases}x&\text{if }x\in S,\\s&\text{otherwise.}\end{cases}$$

In more general approach the range can be even harder to describe analytically.

Consider a function, whose parameter is real and values are pairs of real numbers (or complex numbers, which is equivalent to latter thanks to the complex plane by Jean-Robert Argand). If the function is continuous, its range is a curve on a plane. For example if the function is a position of a projectile in terms of a height and a distance, we get a complete trajectory. It's not too likely one will need to compare such trajectories – we will usually be interested in the maximum height and a maximum distance reachable under some conditions, but not the whole shape. Anyway, it is possible. But how would you compare a curve of a ballistic trajectory to a simple square? ...to a Koch snowflake? ...to the Warsaw Circle? ...or to a Heighway dragon?

And how about non-continuous functions, or those defined on some subsets of $\mathbb R$, whose ranges may become any figure on the plane, for example a family of concentric circles intersected by a family of parallel lines? ...or the interior of an annulus?

Things get even more weird if the 'target space' of a function is some more complex set, like a space of integer sequences, a space of real matrices $5\times 5$, a space of real functions integrable over a unit interval, and so on. You don't always need to know the range of a function, often it's just enough to know what its codomain is.

$\endgroup$
5
  • $\begingroup$ I really liked the way you answered my question 0‿0.But into/onto are defined based on codomain. A function being into/onto does not add any more information about the function than range does nor has a prudential to exist.Maybe the answer i am looking for is given by @zkutch but i don't know enough math to understand his answer..... $\endgroup$ Commented Jul 16, 2020 at 3:38
  • $\begingroup$ You miss some important implications of the named properties. Being "into" tells us the function's domain is not greater than its codomain in the sense of cardinality. Being "onto" tells us the opposite – the domain is not less than the codomain. Being "onto" is also necessary (although not sufficient) for the function to have an inverse from its codomain. And having an inverse function is an important information about a function... $\endgroup$
    – CiaPan
    Commented Jul 16, 2020 at 7:13
  • 1
    $\begingroup$ And we need codomains, because we sometimes need to consider functions, whose definition is known together with a codomain, but the range is unknown. Sometimes only some properties are known and we are satisfied with knowing the codomain without narrowing it to the range ("suppose f is a real-valued function such that...; show f is constant" – we know the codomain is $\mathbb R$ and we just need to show the range is one-point, not necessarily which one). $\endgroup$
    – CiaPan
    Commented Jul 16, 2020 at 7:15
  • $\begingroup$ @Thulashitharan I have expanded my answer a bit, I hope you may find that somewhat interesting. $\endgroup$
    – CiaPan
    Commented Jul 21, 2020 at 12:58
  • $\begingroup$ Thank you.I found it really interesting,my doubt is fully cleared :) $\endgroup$ Commented Jul 25, 2020 at 5:06
2
$\begingroup$

Generally function $f=(F,A,B)$ is defined by triple, where $A$, $B$ are sets, $F$ is functional graph and domain $pr_1F=A$ as it is in "Theory of Sets" N. Bourbaki. So you can consider different triples and obtain different functions.

Let's denote, for example, by SIN graph for $\sin$. Then $$(\text{SIN},\mathbb{R}, [-1, 1])$$ $$(\text{SIN},\mathbb{R},[-2,2])$$ Are formally different functions.

$\endgroup$
2
  • $\begingroup$ Question: Why don't we just define a function to be an ordered pair $(F,A)$ such that $A$ is a set and there exists a set $B$ such that $F$ is a subset of $A \times B$ with the property that if $(a,b) \in F$ and $(a',b') \in F$ and $a = a'$ then $b = b'$? Is there a problem with this? Then we don't have to arbitrarily select a codomain when defining a function. $\endgroup$
    – littleO
    Commented Jul 15, 2020 at 14:06
  • $\begingroup$ You see you also come to third component B, so it is only logical to have 3 objects: 2 sets and then subset of Cartesian product i.e. graph. Such general approach gives us general, so called, correspondence. We can obtain some general properties for correspondences, but to investigate more definite behavior, was introduced some more restrictions. Property which you suggest is nothing else, then functionality of graph. And, finally: we can consider any more or less general objects, terms, in mathematics - the whole point is what we use it for and what we get from it. $\endgroup$
    – zkutch
    Commented Jul 15, 2020 at 14:38
1
$\begingroup$

Note: This is the informal, high-school to early college answer. The formal answer, given by @zkutch, is better for a thorough understanding.

The codomain is useful for bounding the range when the exact range is not computable or at least not easy to figure out. So it is the superset of the range.

Taking $\sin(x)$ as your example, the distinction isn't super relevant but only because we know so much about that function. First we know that it achieves an exact minimum (-1) and an exact maximum (+1) and that it is continuous. We have theorems (specifically the Intermediate Value Theorem) that tell us that the function must attain every value between those two, since it is continuous. As a result, the range is exactly specified.

Now, what about a more complicated function, or one where it is not clear whether it is continuous or not? Or one where it doesn't actually reach a particular value? A simple example might be:

$$f(x) = \frac{1}{x}$$

We know that $f(x) \ne 0$ for any $x$. So the range is not easy to specify. We'd need an open set. Perhaps we want to avoid that, so we'd specify the codomain as $x \in \mathbb{R} | x \ge 0$ and now we get a closed set. There are other examples that I can't immediately think of where figuring out the codomain is much easier than the range.

We might care because we may have a theorem that states "as long as the range doesn't go positive, we are OK". We may not know the exact range, but we do know that the codomain is the set of all negative real numbers, so we have no issues. (This is a very vague expression of a result from control theory, where the poles of a linear time invariant system must have negative real parts for system stability. The pole locations are based on factoring polynomials, which is hard or impossible, but we may be able to bound their locations quite easily).

The codomain, as you saw, was not unique, so no, there is no "universal" codomain for your function.

$\endgroup$
1
  • $\begingroup$ "There are other examples that I can't immediately think of where figuring out the codomain is much easier than the range." @Michael Stachowsky you dont have to think immediately,take your time and whenever you come across an example you can update it here $\endgroup$ Commented Jul 16, 2020 at 3:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .