# Definition of injective function

From wikipedia I obtain the following definition of an injective function :

Let $f$ be a function whose domain is a set $A$. The function $f$ is injective if for all $a$ and $b$ in $A$, if $f(a) = f(b)$, then $a = b$; that is, $f(a) = f(b)$ implies $a = b$.

From this I conclude that a function $f$ is injective if the below statement is true for all $a,b \in A$:

$$f(a)=f(b) \implies a=b$$

My question is: Can I re-formulate the above statement as $f(a)=f(b) \iff a=b$ ?

-

4
$a = b \implies f(a) = f(b)$ is already part of the definition of a function since a function assigns exactly one output to each input. – user17762 Oct 26 '11 at 21:10
Thus: Yes, your reformulation will also work. – Henning Makholm Oct 26 '11 at 21:12

1
Sivaram: that's not really part of the definition of functions... If $a$ is equal to $b$, then how could possibly $f(a)$ be not equal to $f(b)$? That's waaaay below, in the rules of manipulation of equality. (notice that for all this to make sense one has to define what $f(a)$ is, but even with one-to-many 'functions' it is true that $a=b\implies f(a)=f(b)$!) – Mariano Suárez-Alvarez♦ Oct 26 '11 at 21:15
Part of the definition of a function is $(a,b) \in f$ and $(a,c) \in f$ then $b=c$. This is exactly the condition $a=b$ implies $f(a)=f(b)$. – Bill Cook Oct 26 '11 at 21:27

1
@Arturo: but that is a different statement alltogether! :D The meaning of the notation $f(a)$ cannot depend on whether the relation $f$ is or not a function, if the implication $a=b\implies f(a)=f(b)$ is to have sense as part of the definition of what it means for a relation to be a function. I claim that for any definition of what the notation $f(a)$ means for a relation $f$ and an element $a$, the implication will hold for all relations. – Mariano Suárez-Alvarez♦ Oct 26 '11 at 21:31
show 12 more comments

## 4 Answers

Yes, but the implication $a=b\Rightarrow f(a)=f(b)$ holds because you have a function. So in a sense it is redundant.

That is, "$f$ is a function" implies "$a=b\Rightarrow f(a)=f(b)$". So $$\begin{align*} f\text{ is an injective function} &\text{is equivalent to } f\text{ is a function and f is injective}\\ &\text{is equivalent to } f\text{ is a function and } f(a)=f(b)\Rightarrow a=b\\ &\text{implies }\Bigl( (a=b\Rightarrow f(a)=f(b))\text{ and }(f(a)=f(b)\Rightarrow a=b)\Bigr)\\ &\text{is equivalent to } f(a)=f(b)\Leftrightarrow a=b. \end{align*}$$ Conversely, since "$f$ is a function and $a=b \Rightarrow f(a)=f(b)$" is equivalent to "$f$ is a function", you also have the implication going the other way provided you know that $f$ is a function.

-

Yes.

Let us see why:

$f$ is a function if:

1. $f\subseteq A\times B$ for some sets $A, B$. That is the elements of $f$ are ordered pairs.
2. For all $a\in A$ there exists $b\in B$ such that $(a,b)\in f$.
3. For every $a\in A$ if $b,c\in B$ such that $(a,b)\in f$ and $(a,c)\in f$ then $b=c$. We then denote this unique $b$ as $f(a)$.

This means that if $x=y$ then $f(x)=f(y)$ by the definition of a function.

Therefore for injective functions, it is enough to require $f(x)=f(y)\Rightarrow x=y$, since by the definition of $f$ as a function we have the other direction.

-

Yes, you can. You can formally prove that if a=b, then f(a)=f(b), where f denotes any unary predicate, as follows:

````1 |a=b hypothesis
2 |f(a)=f(a) equality (identity) introduction
3 |f(a)=f(b) equality elimination 1, 2, or replacing "a" on the right by "b"
4 If a=b, then f(a)=f(b) 1-3 conditional introduction
````

So, if f also denotes a function, then a=b implies f(a)=f(b). Thus, f(a)=f(b)⟹a=b can get reformulated as f(a)=f(b)⟺a=b

-

Yes. $a=b$ $\Longrightarrow$ $f(a)=f(b)$ means the function $f$ is well-defined.

By definition every function is well-defined.

Example: $f:\mathbb{Q} \to \mathbb{Z}$ "defined" by $f(a/b)=a$ (the numerator "function") is not well-defined since $4/2=6/3$ but $f(4/2)=4$ and $f(6/3)=6$. The same input gave two different outputs. Thus $f$ is not well-defined. It's not a function!

-
The sentence "$f$ is well-defined" makes no sense: if something is not well-defined, it cannot even be the subject of a sentence. What one really means is that "the relation $f$ which we have defined is a function". – Mariano Suárez-Alvarez♦ Oct 26 '11 at 21:18

1
And notice that if $f\subseteq X\times Y$ is a any relation whatsoever from $X$ to $Y$ and you define, as usual, for each $x\in X$ that $f(x)=\{y\in I:(x,y)\in R\}$, then it is also true that $x=x'\implies f(x)=f(x')$... so that implication is not characteristic of functions, really. – Mariano Suárez-Alvarez♦ Oct 26 '11 at 21:21
I stand behind the term "well-defined" -- this is common usage. $f$ and the relation defining $f$ are commonly identified. – Bill Cook Oct 26 '11 at 21:21
@MarianoSuárez-Alvarez I don't follow your second comment. Do you mean that the implication fails to make sure that $f$ is defined for all elements of the domain? I wasn't claiming that "well-defined" is synonymous with "$f$ is a function". It's just part of the definition. – Bill Cook Oct 26 '11 at 21:24
I am saying that for the implication $x=y\implies f(x)=f(y)$ to be part of the definition of a relation being a function, then the symbol $f(x)$ has to be defined for all relations, not just functions (for otherwise the definition wouldbe circular) I claim that for any definition you give of what $f(x)$ means for a relation $f\subseteq X\times Y$ and an element $x\in X$, the implication will hold independently of whether the relation is or not a function. – Mariano Suárez-Alvarez♦ Oct 26 '11 at 21:26
show 3 more comments
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 83, "mathjax_display_tex": 2, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9192168116569519, "perplexity_flag": "head"}