3
$\begingroup$

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)$"

$\endgroup$
3
  • 4
    $\begingroup$ ? $x_1=x_2\Longrightarrow f(x_1)=f(x_2)$ holds for any function... $\endgroup$ Mar 10, 2014 at 20:21
  • $\begingroup$ explain what you mean about this duality $\endgroup$
    – janmarqz
    Mar 10, 2014 at 20:23
  • 1
    $\begingroup$ If we are dealing with binary relations, the duality you mention is natural. But one is primarily interested in functions. $\endgroup$ Mar 10, 2014 at 20:23

5 Answers 5

7
$\begingroup$

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}}$.

$\endgroup$
1
  • $\begingroup$ 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.). $\endgroup$
    – k.stm
    Dec 30, 2014 at 10:17
7
$\begingroup$

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.

$\endgroup$
7
  • 1
    $\begingroup$ Isn't this something deeper? If $f(x)$ has a defined meaning, then $f(x)=f(y)$ automatically. $\endgroup$ Mar 10, 2014 at 20:24
  • $\begingroup$ @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. $\endgroup$
    – gt6989b
    Mar 10, 2014 at 20:26
  • 1
    $\begingroup$ @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. $\endgroup$ Mar 10, 2014 at 20:28
  • $\begingroup$ @user2345215 are you suggesting to rephrase this as a basic property of a relation or a map instead of a function? $\endgroup$
    – gt6989b
    Mar 10, 2014 at 20:32
  • 1
    $\begingroup$ @gt6989b: I'm not. It's just a basic property of anything. $\endgroup$ Mar 10, 2014 at 20:33
7
$\begingroup$

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.

$\endgroup$
1
$\begingroup$
  • 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))$$
$\endgroup$
1
$\begingroup$

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.

$\endgroup$

You must log in to answer this question.

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