# Thread: Come up with a bijection?

1. ## Come up with a bijection?

Hello,
I need some help with this problem:
Let S = {x
: x2
)
I need to come up with a bijection between S and Q.
Any help appreciated.
Thanks!

2. ## Re: Come up with a bijection?

Consider the mapping $f:S \to \mathbb{Q}$ given by:

$f(s) = s^2, s \geq 0$

$f(s) = -s^2, s < 0$.

Is this a bijection?

3. ## Re: Come up with a bijection?

for s≥0, if I took the inverse of f(s), which equals g(s),
and showed that f(g(s)) = g(f(s)) and did the same thing for s<0,
would that show the mapping you provided is a bijection?

4. ## Re: Come up with a bijection?

OK, for one thing the INVERSE of f (if it exists, which you have NOT shown) would be a function $g: \mathbb{Q} \to S$.

so you would need to show TWO things:

1) $f \circ g = 1_{\mathbb{Q}}$
2) $g \circ f = 1_S$

but you can't simply say "g exists" you have to DEFINE it.

Perhaps a more straight-forward method is to prove:

A) $f(s_1) = f(s_2) \implies s_1 = s_2$ (that is, f is injective)

B) for EVERY $q \in \mathbb{Q}$, there exists SOME $s \in S$ with: $f(s) = q$ (that is, f is surjective).