# Surjections, injections and bijections

I have $f :${$−2, −1, 0, 1, 2$}$→${$−2, 0, 2, 6$}$, f(x) = x^2−x$

And I want to change the function domain/co-domain so that it's

a) surjective b) injective c) bijective

Now, isn't the definition as is, surjective, since given the function, all the values of the domain are within the co-domain?

Will it be injective if I remove $-1$ and $1$ from the domain?

It will be bijective if co-domain -> domain with $f^{-1}$ is true, but is the only way to achieve this by actually generating the inverse function and making sure the rules are met, or are there better ways?

• How do you get $-2$ from the co-domain. – kingW3 Apr 3 '17 at 18:59
• My mistake, I guess. :P – Grak Apr 3 '17 at 19:14
• No problem,just wanted to help :) – kingW3 Apr 3 '17 at 19:37

A hint to start: put all the elements in the domain in the function $f$ so calculate for all elements in {-2, -1, 0, 1, 2} the function value. This gives the set {6, 3, 0, 0, 2}. ($f(-2) = 6$; $f(-1) = 3$;...).

a) In order for the function to be surjective, all y-values from the co-domain must have a x-value so that $y=f(x)$. We can see that no x-value in the domain exists so that $f(x)=-2$, so if we discard -2 from the co-domain, the function becomes injective. The new co-domain is {0, 2, 6}. We have $f:\{-2, -1, 0, 1, 2\}\to\{0, 2, 6\}$.

b) In order for the function to be injective, for each y-value there can be at most 1 x-value so that $f(x) = y$. We see that $f(0) = f(1)$, so we must either discard 0 or 1 from the domain to have an injective function. We get {-2, -1, 1, 2} or {-2, -1, 0, 2} for the domain. We have $f:\{-2, -1, 1, 2\}\to\{-2, 0, 2, 6\}$ or $f:\{-2, -1, 0, 2\}\to\{-2, 0, 2, 6\}$.

c) In order for the function to be bijective, it must be injective and surjective, so the bijective domain is the domain in b and the co-domain is the co-domain in a. We have $f:\{-2, -1, 1, 2\}\to\{0, 2, 6\}$ or $f:\{-2, -1, 0, 2\}\to\{0, 2, 6\}$.

Note: You might want to remove -1 from each domain, to make a surjection, injection and bijection. (This means that each element in the domain maps to an element in the co-domain, or put in other words, for each x in the domain is $f(x)$ defined.

Surjectivity means that every element in the codomain is the image of an element in the domain. As there is no element whose image is $-2$, the function is not surjective. To make the function surjective, one has to remove $-2$ from the codomain.

Notice that $f(0) = 0 = f(1)$ and $f(-1) = f(2) = 2$. Hence, the function is not injective. To make it injective, we can remove, for example, $0,-1$ from the domain (there are other possibilities here, for example $1,-1$ as you deduced correctly).

To make it bijective, we must have that it is both injective and surjective. I'm sure you can handle this yourself now.