$f: \mathbb{Z}\rightarrow\mathbb{Z}$ and $f(x)= x^2-1$. Is $f$ one-to-one? onto?

Define $f: \mathbb{Z}\rightarrow\mathbb{Z}$ by $f(x)= x^2-1$. Then $f$ is a one to one function.

I think it is false because if you put $3$, then $9-1=8$ which you can get it by $2\times 4$ and $1\times 8$.

Could you tell me if I'm wrong or right?

thanks

sincerely

-
No, your idea is not right. $2 \times 4$ and $1 \times 8$ have nothing to do with the function $f$. – Chris Eagle Jun 4 '13 at 21:55
I'm curious to know what functions you think are one-to-one by this logic? – Erick Wong Jun 5 '13 at 2:40

To prove a function $f$ is not one-to-one, one needs to show that it is NOT the case that for every $x_1, x_2$ in the function's domain,

$f(x_1) = f(x_2) \implies x_1 = x_2$

Put differently, to prove a function $f$ is NOT one-to-one, we need to show there exist $x_1, x_2$ in the function's domain such that $x_1 \neq x_2$, but $f(x_1) =f(x_2)$.

$$f(x) = x^2 - 1$$

$$x_1 = 2: f(2) = 2^2 - 1 = 4 - 1 = 3$$

$$x_2 = -2: f(-2) = (-2)^2 - 1 = 4 - 1 = 3$$

$$f(2) = f(-2) = 3,\;\;\text{but}\;\;x_1 = 2 \neq x_2 = -2$$

Therefore, $f:\mathbb Z \to \mathbb Z$, with $f(x) = x^2 - 1\;$ is NOT a one-to-one function.

-
i have another question. a quick question. – amie Jun 4 '13 at 21:58
the set (x E Q l 1<x<2 ) is countable. isnt this false?? – amie Jun 4 '13 at 21:59
No, that's true. One question at a time ;-) – amWhy Jun 4 '13 at 22:00
lol thanks love. but why is it true?? i dont understand – amie Jun 4 '13 at 22:02
amie: that's a separate question. Why don't you post it as a question?: and ask why it's true that it's countable. – amWhy Jun 4 '13 at 22:05