# Math Help - Onto Proof

1. ## Onto Proof

Can someone give me some feedback, please?
********
f: Ζ⇒Ζ

f(x) = { x/2 if x is even, 0 if x is odd

Prove whether f is onto and one-to-one.
Here's my proof.
******
Proof. To show that f is onto, let b∈Ζ. Consider the 2 following cases:

1. If b=0, f(x)=0 implies x=z.
2. If b≠0, x/2=b gives x=2b which implies f(2b)=2b/b=b.

This shows that f has 2 pre-images which proves that f is onto. Since f(0)=0=f(1),
we have also proved that f is not one-to-one. ■

2. ## Onto and one-to-one function

Hello yvonnehr
Originally Posted by yvonnehr
Can someone give me some feedback, please?
********
f: Ζ⇒Ζ

f(x) = { x/2 if x is even, 0 if x is odd

Prove whether f is onto and one-to-one.
Here's my proof.
******
Proof. To show that f is onto, let b∈Ζ. Consider the 2 following cases:

1. If b=0, f(x)=0 implies x=z.
2. If b≠0, x/2=b gives x=2b which implies f(2b)=2b/b=b.

This shows that f has 2 pre-images which proves that f is onto. Since f(0)=0=f(1),
we have also proved that f is not one-to-one. ■
Your proof is fine (I take it $x =z$ should be $x=0$), but I think you can simplify it a bit.

You don't really need to say anything about $b = 0$ at all for the 'onto' proof. (You're not trying to divide anything by zero, are you? And $0 \div 2 = 0$, which is OK.)

So I think all you really need to say is:

$\forall b \in \mathbb{Z}, 2b$ is even and $2b \in \mathbb{Z}$

$\Rightarrow f(2b) =\frac{2b}{2}=b$

$\Rightarrow f$ is onto.

And your counterexample ( $f(0) =0= f(1)$) is all you need to prove that $f$ is not one-to-one.