# one-, to-one, and onto functions

What determines a function as one-to-one, and onto?

And what would this function be classified as?

$A = B = \Bbb Z, f:A\to B$

$f(a) = a-1$

-
Juren Malinaeo, I edited your answer, can you check if this is correct ? – Kasper Apr 22 '13 at 10:29
"What determines a function as one-to-one, and onto?" Have you even bothered to check Wikipedia??? en.wikipedia.org/wiki/One-to-one_function, en.wikipedia.org/wiki/Surjective_function – Peter Smith Apr 22 '13 at 10:30

one-to-one means $f(x)=f(y)\rightarrow x=y$ for every $x,y\in A$. Onto means that for every $b\in B$ there exists $a\in A$ such that $f(a)=b$. Your function is actually a bijection (which means both injective and surjective). Indeed $a-1=c-1\rightarrow a=c$. For surjectivity, given $b\in \mathbb{Z}$ take $a=b+1$ and get $f(a)=(b+1)-1=b$

-

Hint $\;$To prove a function is onto, you need to show that:
For every $b \in B$, there exist and $a \in A$ such that $f(a)=b$.
To prove such a statement:

Let $b$ be an arbitrary element in the set $B$.
Choose $a=...\in A$ Then $f(a)=....=b$.

Can you fill in the $...$ ?

-