1
$\begingroup$

I know that a function is injective if every element of the domain maps onto at most one element of the co-domain, that is, if $f(x_{1}) = f(x_{2})$ implies $x_{1} = x_{2}$, or the contrapositive. However, is it allowable for an injective function to have some number of elements $n$ that don't map onto any values in the co-domain? It seems like, at most, there could be one unmapped element. Otherwise, with an unmapped $x_{1}$, $x_{2}$, $f(x_{1}) = f(x_{2}) = \varnothing$, implying that in fact $x_{1} = x_{2}$.

Am I missing something here?

$\endgroup$
2
  • 1
    $\begingroup$ The definition of the domain is that every element of it is mapped to something... $\endgroup$
    – Mushu Nrek
    Commented Jul 16, 2020 at 23:05
  • $\begingroup$ A function is a mapping... $\endgroup$ Commented Jul 16, 2020 at 23:12

1 Answer 1

3
$\begingroup$

It is possible to have what is called a partial function from a set $A$ to a set $B$: this is a subset $f$ of $A\times B$ such that for each $a\in A$ there is at most one $b\in B$ such that $\langle a,b\rangle\in f$. In other words, $f$ is a function from some subset $D$ of $A$ to $B$. However, the domain of $f$ is that subset $D$, not $A$ itself (unless, of course, $D=A$, in which case it is called a total function on $A$): by definition $a$ is in the domain of $f$ if and only if there is some $b\in B$ such that $\langle a,b\rangle\in f$.

A partial function can certainly be injective.

Your last sentence contains a significant misunderstanding: $f(x)$ is undefined does not mean that $f(x)=\varnothing$. If $f(x)$ is undefined for some particular $x$, then every statement of the form $f(x)=y$ is false.

$\endgroup$

You must log in to answer this question.

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