33

So as far as I understand, a function $f\colon A \to B$ is surjective if and only if for every $b\in B$ there exists $a\in A$ such that $f(a) = b$.

My question is when is this actually relevant? Couldn't you arbitrarily define the set $B$ so that any elements never "used" are removed from the set, leaving you with a surjective function?

  • 22
    It's not the same function then. – Bernard Jun 16 '17 at 00:03
  • 1
    I've seen the use of surjectivity in order to establish that a function is bijective. (If a function is surjective and injective, it is bijective). And bijective functions are quite useful. – Anthony D'Arienzo Jun 16 '17 at 00:03
  • 1
    Sometimes that is exactly what's done @Calvin. See, for example, topological embeddings. However, even with embeddings, we don't completely disregard $B$. Instead, we recognized that an isomorphic copy of $A$ exists inside of $B$. It is true that "every function is surjective onto its image". However, for instance, if we have a function $f:A \rightarrow B$, it isn't always clear what the image of $A$ actually is. – Kaj Hansen Jun 16 '17 at 00:09
  • 8
    @Bernard It's not the same arrow in the category of sets, say, but it is indeed exactly the same set of ordered pairs. – Derek Elkins left SE Jun 16 '17 at 05:20
  • 1
    You could think of surjectivity of $f: A \rightarrow B$ as more of a property of the set $B$ then the function $f$: it means that $B$ is the image of $f$. And characterizing the image of a function is frequently useful. – Jair Taylor Jun 16 '17 at 07:05
  • 2
    This, by the way, is a very good question, showing the right level of skepticism that is necessary for a deeper understanding of math. It's not enough to accept what your book or teacher tells you - you have to fight with it a bit to really appreciate it. – Jair Taylor Jun 16 '17 at 07:09
  • 3
    @Bernard Changing the codomain of a function may or may not result in a different function - it depends on whose definition you're using. If a function is just a set of ordered pairs then a codomain need not be specified. – Jair Taylor Jun 16 '17 at 07:15
  • 1
    $f$ is a TV channel that airs monochrome shows. $g$ is a color TV, that can display monochrome and color shows. The composition $g o f$ is a color TV that always displays monochrome images, but that does not make the TV a monochrome TV. It's a relevant case, which deserves study. Maps that don't commit to cover their whole codomain allow to define inclusion maps, from a set $A$ to a superset $B$. And if you have inclusion maps, composing with the map you suggest that covers its whole codomain trivially creates all the maps that you suggest ignoring. – Laurent LA RIZZA Jun 16 '17 at 07:20
  • If you want to define a policy for displaying color TV shows on a monochrome TV, the $g$ you will define will be a surjection. But if you want to do the opposite, displaying monochrome TV shows on a color TV, the $g$ will (probably) be an injection. – Laurent LA RIZZA Jun 16 '17 at 07:25
  • 6
    @JairTaylor: I stick to Bourbaki's definition: it's a triple $(E, F,G)$ satisfying $G\subset E\times F$ and a uniqueness condition. – Bernard Jun 16 '17 at 08:17
  • Personally, I think that questions like this do not make too much sense. It's like asking "why do we need the word 'sentence'? We could just say 'a set of words' instead". You'll find that you use the notion 'sentence' so much when you use the English language in a natural way that it is justified to introduce this abbreviation, and with time it begins to feel like a useful concept. I've had this experience regularly during my math studies. – user159517 Jun 16 '17 at 19:10
  • It is sometimes useful to know the following fact, related to your observation about changing the codomain: any function $f: A \to B$ can be decomposed as the composition $i\circ g \circ j$, where $j: A \to A/f$ is the surjective map from $A$ to the quotient set $A/f$ of equivalence classes under the relation $f(a) = f(a')$; $g: A/f \to \mathrm{im}(f)$ is a bijection; $i:\mathrm{im}(f) \to B$ is the inclusion map (which is an injection). – Sasho Nikolov Jun 16 '17 at 20:18
  • You would be constantly throwing babies out with the bath. One of those babies is the the Schröder–Bernstein theorem. – Mike Jones Jun 21 '17 at 17:17

6 Answers6

40

Yes, we can arbitrarily only look at the range of functions, but this often misses the point. When we study a function, $f: A \rightarrow B$, often we're interested in the properties of $A$ and $B$ just as much as we are the properties of $f$. So, if we want to learn about $B$, and we know that we can do this somehow using surjective function $f$ from $A$ to $B$, just looking at the range of $f$ means we've given up looking at $B$, which is what we wanted to learn about in the first place.

Edit: Since this seems like we're just talking about very basic stuff, here's a very basic property. Let's say we want to know if $A$ and $B$ have the same cardinality. How do we know that? That there exists a bijective function $f: A \rightarrow B$. If we look at the range of $f$ instead of the codomain, we're no longer thinking about the cardinality of $B$, we're thinking about something else all together.

Duncan Ramage
  • 6,928
  • 1
  • 20
  • 38
  • 2
    Exactly, as my example in the comments illustrates, we note that a topological embedding $f:A \rightarrow f(A) \subseteq B$ is indeed surjective, but the point is that an isomorphic copy of $A$ exists as a subset of $B$. A similar thing can be / is done in every category. – Kaj Hansen Jun 16 '17 at 00:15
31

The other answers are good, but I'd like to add one thing. Suppose a function $f:\mathbb{R}\to\mathbb{R}$ is given. Is it possible to solve the equation $f(x)=b$, for some particular $b$?

If we know that $f$ is surjective, then we can be sure that a solution exists for any choice of $b$. If not, then we need to worry about whether $b$ is in the range of $f$ or not.

In linear algebra, this comes up a lot. The range of a linear function, given by a matrix $A$, so $f(x)=Ax$, is called the column space of $A$. Sometimes, the column space is the entire codomain, and sometimes it is a subspace. Whether or not a function like that is surjective becomes an interesting question, not only for solving equations, but for answering other questions about the structure of the function.

For example, what if the domain is $\mathbb{R}^4$, and the codomain is $\mathbb{R}^3$. Then what kind of subset of the domain solves the equation $f(x)=(0,0,0)$? If we know that $f$ is surjective, then we can answer that the set mapping to zero is a one-dimensional subspace. If $f$ is not surjective, then the set mapping to zero will have greater dimension.

G Tony Jacobs
  • 31,218
  • +1, I used to think like OP, and this is the sort of things that made the concept of surjectivity interesting. – Arnaud D. Jun 16 '17 at 08:25
  • As I recall, this is fundamental in group theory and provides a basis for equivalence relations in A. – rrogers Jun 21 '17 at 13:47
8

$\newcommand{\Reals}{\mathbf{R}}\newcommand{Ratls}{\mathbf{Q}}$Mathematical problems often come in the form of,

"Some value $y$ depends deterministically on data $x$; is every prospective value $y$ an actual value?"

Two common formulations are:

  • Let $Y$ be a set of prospective values (specified in advance by the context of an external question), $X$ the set of allowable inputs, and $f:X \to Y$ a mapping representing the dependence $y = f(x)$.

    The question above means Is $f$ surjective?

  • Let $Y \subset Z$ be a set of prospective values, $X$ the set of allowable inputs, and $f:X \to Z$ a mapping representing the dependence $y = f(x)$.

    The question above means Is $Y \subset f(X)$?

Here's a selection of five examples, four of them kind of the same:

  1. Is every real number the square of some real number?

    That is, if $f:\Reals \to \Reals$ is defined by $f(x) = x^{2}$, is $f$ surjective? (Answer: No. For instance, $-1$ is not in the image.)

  2. Is every non-negative real number the square of some real number?

    That is, if $f:\Reals \to \Reals$ is defined by $f(x) = x^{2}$, is $[0,\infty)$ contained in the image of $f$? (Answer: Yes, though proving this "existence of real square roots" requires non-trivial use of the completeness axiom for the real numbers, even though the result is usually introduced into the curriculum many years prior to a careful analysis course.)

  3. Is every positive rational number the square of some rational number?

    That is, if $f:\Ratls \to \Ratls$ is defined by $f(x) = x^{2}$, is $[0,\infty) \cap \Ratls$ contained in the image of $f$? (Answer: No. For instance, $2$ is not in the image.)

  4. If $y:\Reals \to \Reals$ is a continuous function, does there exist a differentiable function $x:\Reals \to \Reals$ such that $x' = y$?

    That is, if $X$ is the set of differentiable, real-valued functions on $\Reals$, and $Y$ is the space of continuous functions, and $Z$ the space of all functions, and if $f(x) = x'$, is $Y$ contained in the image of $X$? (Yes: One of the fundamental theorems of calculus guarantees that every continuous function on $\Reals$ is the derivative of some differentiable function.)

  5. Let $(M, g_{0})$ be a compact Kähler manifold. If $\rho$ is a smooth $(1, 1)$-form in the cohomology class $2\pi\, c_{1}(M)$, does there exist a Kähler metric $g$ whose Kähler form is cohomologous to the Kähler form of $g_{0}$ and whose Ricci form is $\rho$?

    Analogously to the preceding example, you can imagine that there is a partial differential equation of the abstract form $\rho = f(g)$, and the question amounts to surjectivity of the Ricci curvature operator $f$. The answer turns out to be "yes"; largely for this resolution of the Calabi conjecture, S. T. Yau was awarded the Fields Medal in 1982.

    The take-away is, not only is surjectivity interesting, but proving that a specific mapping is surjective can constitute a major work in a distinguished mathematical career.

4

To fully specify a function requires three things.

  • A domain $X$, a set of allowable inputs
  • A co-domain $Y$, a set of allowable outputs
  • A rule $f$ that, for each $x\in X$ specifies some $f(x) \in Y$.

Failure to include all three means you have failed to properly define a function. For a function to be onto, every element $y\in Y$ must have some $x\in X$ so that $f(x) = y$. A function is not just a rule; it is these three items.

ncmathsadist
  • 49,383
  • 1
    But this raises the OP's question: Why do we care if $f(X) \subsetneq Y$? Why specify $Y$ as the co-domain when we could just restrict the the codomain only to the image of $f$? – fleablood Jun 16 '17 at 00:22
  • Think about reflexivity of Banach Spaces. That is about the surjectivity of the evaluation map $j: V \rightarrow V^{**}$. – ncmathsadist Jun 16 '17 at 00:32
  • 1
    This is not illuminating. Of course, what you are presenting here is Bourbaki's definition of a function, but this is by no means the standard definition used in mathematical literature. Most mathematics texts identify a function with its Bourbabki graph. So your answer begs the question: why should we use Bourbaki's definition and not the standard definition? – Angel Nov 04 '21 at 13:52
3

The definition of a function is not just the rule $f$. Instead, a function is defined by a domain $A$ and a codomain $B$ together with a rule $f$ that takes every $x\in A$ and returns a unique element of $B$. So, if we were to change the set $B$ as you suggest, we are actually changing the function itself, so although the new function will indeed be surjective, it will not be the same function that you started with.

For example, $f(x)=x^2$, with $f:\mathbb{R}\rightarrow \mathbb{R}$ is not surjective, but $f(x)=x^2$, with $f:\mathbb{R}\rightarrow [0,\infty) $ is surjective. The rule and domain are the same for both functions, but the codomains differ, so the two functions are not the same.

As for why the concept of surjectivity is important, one example is that if a function is both surjective and injective (i.e. both 1-1 and onto), then the function is called bijective, and showing that a function is bijective is one of the most common tools in analysis. For example, one way to show that two sets have the same cardinality is to construct a bijection from one set to the other. As another example, a function is invertible if and only if it is bijective.

M_B
  • 475
  • In response to your first paragraph, define $f: \mathbb R\to \mathbb R$ given by $f(x)=x^2$, and $g: \mathbb R\to [0,\infty)$ given by $g(x)=x^2$. How are the sets $f$ and $g$ different? Both are equal to ${(x,y)\in\mathbb R^2,\vert, y=x^2}$. – florence Jun 16 '17 at 00:18
  • The difference, I think, is that while the first is equal to the set you describe, the second is equal to ${(x,y)\in \mathbb{R} \times [0,\infty) | \ y=x^2 }$ – M_B Jun 16 '17 at 00:25
  • It's easy to show that ${(x,y)\in \mathbb R^2 , \vert , y=x^2}={(x,y)\in \mathbb R\times [0,\infty) , \vert , y=x^2}$. In fact, $f=g$. A function $h$ is a set of ordered pairs with the property that $(x,y), (x,y)\in h \implies x=z$; it doesn't contain any information as to what its codomain is intended to be. – florence Jun 16 '17 at 00:28
  • I'm browsing some introductory analysis books, and most definitions say something like: a function from $A$ to $B$ is defined as a subset of the cross product $A\times B $. I see your reasoning, but perhaps the two definitions of function are valid for different purposes. Or perhaps I am mistaken. – M_B Jun 16 '17 at 00:36
  • That's the definition of a relation. A function $h: A\to B$ is a subset of $A\times B$ with the added requirement that for all $x\in A$ there exists unique $y\in B$ such that $(x,y)\in h$. The definition I gave in my previous comment for a function (with unspecified domain/codomain) is equivalent to there existing some sets $A,B$ such that $h:A\to B$ (according to the definition in this comment). Either way, the $f$ and $g$ from my first comment are definitely the same set. – florence Jun 16 '17 at 00:41
  • 2
    I see my mistake, thanks Florence, that is a nice explanation. I need to run out for a bit, but I will update my post tonight. – M_B Jun 16 '17 at 00:44
  • @florence I know it's too late to edit, but I think that in your second comment you meant $(x,y), (x,z)\in h \implies x=z$. – Arnaud D. Jun 16 '17 at 08:27
  • Or rather $y=z$... – Arnaud D. Jun 16 '17 at 20:43
  • @florence, as I've considered how to improve my post, I realized an odd consequence of what you said. If your definition of function is the correct one, then all functions must be surjective, since there is no way to distinguish between the codomain and the range. Am I understanding your definition correctly? Reading online about this topic, it seems like a common debate as to what the precise definition of a function ought to be. However, it seems to me that in order to say that a function is surjective, we must define a function as a relation so that we can distinguish codomain from range – M_B Jun 18 '17 at 00:53
  • 1
    Re: any debate about the definition of a function, the definition I'm referring to is the standard one. Second, functions (according to the definition I gave) are already relations. In general, a relation does not specify a "codomain". A relation has a range, and you can consider any superset of the range to be the codomain. As for surjectivity, strictly speaking you can't just stay a function $f$ is onto, rather, you need to specify that it is onto $X$, for some possible codomain $X$. But usually the $X$ you're talking about is implicit, and so this generally isn't an issue. – florence Jun 18 '17 at 01:26
1

What you write in your question suggests that you accept that domain $A$ and codomain $B$ are part of the data describing a function $f : A \to B$.

But why do we consider non-surjective functions? In fact, the image $\tilde B = f(A) = \{ f(a) \mid a \in A\}$ of $f$ is a subset of $B$ obtained by removing the elements of $B$ never "used" by $f$. The function $$\tilde f : A \to \tilde B, \tilde f(a) = f(a)$$ is surjective and seems to contain the same information as $f$.

But wait, is it really the same?

Of course both functions $f$ and $\tilde f$ have exactly the same output when applied to an element of $A$, and for many purposes the relationship between input elements and output elements is indeed the only relevant information. Taking this point of view one could argue that it suffices to consider only surjective functions $f : A \to B$; inflating $B$ to bigger sets $B' \supset B$ produces a multitude of functions $f_{B'} : A \to B', f_{B'}(a) = f(a)$, which seems to be completely arbitrary and useless.

Nevertheless it is not true that $f$ and $\tilde f$ contain the same information. Consider the following example:

Let $B$ be set of rooms in a hotel and $A$ be the set of hotel guests. Then you get a function $$f : A \to B, f(a) = \text{ hotel room in which guest } a \text{ stays }\} .$$ For the hotel it is an essential information whether $f$ is surjective ("fully booked") or not ("vacancies"). Thus the set $B \setminus f(A)$ of elements never "used" by $f$ is quite important.

Moreover, there are a lot of formal mathematical reasons speaking in favor of working with non-surjective functions. Here are a few examples.

  1. In calculus we consider functions $f : \mathbb R \to \mathbb R$ and define concepts like continuity, differentiability, etc. We do not know anything about $f$, it may be surjective or not. So what would be the definition of the above concepts if we only consider surjective functions? And even if $f$ is decribed via an explicit formula, it may be very hard to determine the image $f(\mathbb R)$. So what would be the correct representation of $f$ as a surjective function?

  2. Let $A$ be a fixed set of real polynomials and $B$ the set of finite subsets of $\mathbb R$. Define $$f : A \to B, f(p(x)) = \text{set of real roots of } p(x) .$$ Can you determine $f(A)$? Again, what would be the correct representation of $f$ as a surjective function?

  3. It is well-known that the power set $\mathcal P(A)$ of a set $A$ has bigger cardinality than $A$. Thus no function $f : A \to \mathcal P(A)$ can be surjective. How would you formulate this fact without allowing non-surjective functions?

Paul Frost
  • 76,394
  • 12
  • 43
  • 125