3

I think injective and surjective is a dual concept. Injective: $f(x_1)=f(x_2) \Rightarrow x_1=x_2$ But the definition of surjective is so different. It's "for every $y$,there exist $x$ such that $f(x)=y$".

so why we define surjective by "for every $y$,there exist $x$ such that $f(x)=y$" instead of "$x_1=x_2 \Rightarrow f(x_1)=f(x_2)$"

amateur
  • 997

5 Answers5

7

If $x=y$ then $f(x)=f(y)$ is a basic property of a function. It is true for all functions whether injective, surjective or neither.

Mark Bennet
  • 100,194
  • 1
    Isn't this something deeper? If $f(x)$ has a defined meaning, then $f(x)=f(y)$ automatically. – user2345215 Mar 10 '14 at 20:24
  • @user2345215 formally, you can define such a monster with a relation on the set $D \times R$ where $D,R$ denote domain and range, respectively. – gt6989b Mar 10 '14 at 20:26
  • 1
    @gt6989b but even if $f$ is a relation and $f(x)={y\mid(x,y)\in f}$ the equality still holds, I edited my comment. – user2345215 Mar 10 '14 at 20:28
  • @user2345215 are you suggesting to rephrase this as a basic property of a relation or a map instead of a function? – gt6989b Mar 10 '14 at 20:32
  • 1
    @gt6989b: I'm not. It's just a basic property of anything. – user2345215 Mar 10 '14 at 20:33
  • +1 :-) I like a basic propoerty of anything, but still, you have to formally call this class of maps something... – gt6989b Mar 10 '14 at 20:35
  • Note there are things which look quite like functions which are "multi-valued" - for example the square root. There are various conventions for dealing with such cases. For example the graph of $x=y^2$ can be regarded as a function from $\mathbb R \to \mathbb R^2$ sending $y\to (y^2,y)$ - which fits the intuition that we have a smooth curve in the plane. Or we can choose the non-negative square root, as is the usual convention. – Mark Bennet Mar 10 '14 at 21:34
7

Let $X$ be the domain of the function $f$ and $Y$ be its codomain.

Injective function: A function for which to every $y$ in the codomain it exist MAXIMUM one $x \in X$ such that $f(x) = y$

Surjective function: A function for which to every $y$ in its codomain it exist AT LEAST one $x \in X$ such that $f(x) = y$

Bijectve function: A function that is both injective and surjective, in other words, to every $y$ in its codomain it exist precisely ONE $x \in X$ such that $f(x) = y$

I hope this helps.

7

You are correct that the concepts of injectivity and surjectivity are somehow dual. However, you are missing the "big picture" by only thinking on the level of elements.

We may think of injections and surjections in terms of left invertible and right invertible functions.

Definition 1. A function $f:A\to B$ of nonempty sets is injective if there exists a function $g:B\to A$ such that $g\circ f=\operatorname{id}_A$.

Definition 2. A function $f:A\to B$ of nonempty sets is surjective if there exists a function $g:B\to A$ such that $f\circ g=\operatorname{id}_B$.

By comparing these two definitions, we see that injectivity and surjectivity are (in some sense) dual. Injectivity means "left invertible" while surjectivity means "right invertible".

If you want to get fancy, you could rigorously formulate all of this using the language of category theory. Here, the statement is that a morphism $f$ is injective in $\mathsf{Set}$ if and only if it is surjective in $\mathsf{Set}^{\operatorname{op}}$. More generally, a morphism $f$ in a category $\mathsf{C}$ is monic if and only if $f$ is epic in $\mathsf{C}^{\operatorname{op}}$.

  • If you bring in categorical parlance, I think it’s better to define injective as left cancellable and surjective as right cancellable (instead of left invertible and right invertible). This still shows the duality of both notions while having three advantages: (1) It generalizes to functions $f: A → B$ where $A$ is empty. (2) It doesn’t require the axiom of choice to be compatible with the elementary set-theoretic definitions. (3) It’s more evident from the elementary set-theoretical definitions (e.g. $f$ being mono is “$fx = fy ⇒ x = y$”, only $x, y$ are arrows instead of elements.). – k.stm Dec 30 '14 at 10:17
1
  • Def.: let be $f:A \to B$ a function, $f$ is injective if $$\forall x,y \in A(f(x)=f(y)\to x=y)$$ You can prove$$f \mbox{ is injective} \Leftrightarrow \forall x,y \in A(x \neq y \to f(x) \neq f(y))$$
  • Def.: let be $f:A \to B$ a function, $f$ is surjective if $$f(A)=B$$ You can prove $$f \mbox{ is surjective} \Leftrightarrow \forall y \in B(\exists x \in A(f(x)=y))$$
mle
  • 2,287
1

You don't need to know anything about functions to see the problem.

As long as $f(x)$ is defined and it doesn't matter what it is then $$x=y\Longrightarrow f(x)=f(y)$$ simply by the rules of logic, $x=y$ lets you replace $x$ with $y$ anywhere you want.

user2345215
  • 16,422