Onto and one-to-one function

Hello yvonnehr Quote:

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 $\displaystyle x =z$ should be $\displaystyle x=0$), but I think you can simplify it a bit.

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

So I think all you really need to say is:

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

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

$\displaystyle \Rightarrow f$ is onto.

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

Grandad