# Elementary function and injection

I am a bit confused on the definition of a function and an injection. I can't seem to distinguish the two.

The definition of a function is: if $(x_1,y_1)\in f, (x_1,y_2)\in f$ then $y_1 = y_2$, whereas an injection is: if $(a,b)$ and $(a,',b)$ are elements of $F$, then $a=a'$; which in other words just means the domain of $f$ maps into distinct elements of $b$.

My question is, isn't the two definitions very similar? For example: $D = \{(x,y):|x|+|y| = 1\}$, is not a function because $y_1 \ne y_2$, but doesn't that mean it is not an injection because it doesn't map the domain into distinct elements which seems to me to be the precise definition of what it is to be a function? What is the difference between being a function and being injective?

-

## 1 Answer

The relation between people and names is a function, because every person has a name, but it's not injective, because two different people can have the same name.

The relation between names and people is not a function, because one name can correspond to more than one person.

-
Thanks Gerry! So, essentially I should concentrate on the range to tell if it is an injection? And similarly, I should concentrate on the domain to tell if it is a function? –  Q.matin Feb 7 '13 at 5:25
Pretty much. Note that if it's not a function, it doesn't make sense to ask whether it's an injection. –  Gerry Myerson Feb 7 '13 at 5:55
Thanks a lot !! –  Q.matin Feb 7 '13 at 6:02