# How to verify whether function is surjective or injective

I'm trying to learn how to verify whether a certain function is surjective / injective.

$$g:\mathbb{R}\rightarrow \mathbb{R}$$

$$g(x)= 2x^5 +9$$

How would I do so?

Thanks

• Welcome to Mathematics Stack Exchange. For injective, you may show that if $2x^5+9=2a^5+9$ then $x=a$ Oct 5 '19 at 19:01
• @J.W.Tanner So basically I have to start with $a=2x^5+9$ and do equivalent operations until boths sides are the same? Oct 5 '19 at 19:13
• You should start with $2a^5+9=2x^5+9$; also, consider what would happen if the function were $2x^{\color{red}2}+9$ instead Oct 5 '19 at 19:26

$$g:\mathbb{R}\to\mathbb{R}$$, $$g(x)=2x^5+9$$.

We want to check if $$g$$ is injective/surjective. You have several ways to do that. An analytic (more advanced) approach on surjectivity would to observe that:

$$\lim_{x\to\infty} g(x)=\infty$$ and

$$\lim_{x\to -\infty} g(x)=-\infty$$

By the mean-value theorem $$g$$ is surjective.

An analytic approach for injectivity would be to calculate

$$g'(x)=10x^4$$. We have that $$g'(x)>0$$ for every $$x\in\mathbb{R}$$. So $$g$$ is always increasing and thus injective.

As I said these methods are more advanced (but still pretty basic and are thought in a beginners analysis course). I assume that you are starting out.

So an other approach is straight by definition.

For injectivity we have to show that if $$g(a)=g(b)\Rightarrow a=b$$

We have $$g(a)=g(b)\Leftrightarrow 2a^5+9=2b^5+9\Leftrightarrow a^5-b^5=0\Leftrightarrow (a-b)(a^4+a^3b+a^2b^2+ab^3+b^4)=0$$

So either a-b=0 which implies a=b (what we had to show)

Or $$a^4+a^3b+a^2b^2+ab^3+b^4=0$$ but this is only $$0$$ iff $$a=b=0$$.

If $$a=b=0$$ there is nothing to show. So let $$a,b\neq 0$$. Then we can seperate 3 cases. $$a,b>0$$, $$a,b<0$$ and (without loss of generality) $$a>0$$ and $$b<0$$

Without loss of generality means that we can assume $$a>0$$ and $$b<0$$ and do not need to show the other case $$a<0$$ and $$b>0$$. Because there is symmetrie in the expression and if the inequalities are swapped, we could just swap a and b too.

If $$a,b>0$$ then $$a^4+a^3b+a^2b^2+ab^3+b^4>0$$.

If $$a,b<0$$ then $$a^4+a^3b+a^2b^2+ab^3+b^4>0$$. Since every summand is positive. You might want to check that for yourself, if it is not clear.

If $$a>0$$ and $$b<0$$, then $$\underbrace{a^4}_{>0}+\underbrace{a^3b}_{<0}+\underbrace{a^2b^2}_{>0}+\underbrace{ab^3}_{<0}+\underbrace{b^4}_{>0}$$

Why is this now positive? Well we have either $$|a|\geq |b|$$ or $$|a|\leq |b|$$.

If $$|a|\geq |b|$$. Then we have that $$a^4+a^3b>0$$. Since $$a^3(a+b)>0$$ since every factor is positiv. $$a^3$$ is positiv for sure, since $$a>0$$.

Why is $$a+b>0$$? Since $$|a|\geq |b|$$. Think about that.

Keep in mind that I am avoiding the use of the fifth root $$\sqrt[5]{\square}$$, because you might not know that concept yet in your class.

Else we could just use that here and deduce $$a=b$$ that way. The approach above is the most 'basic'.

After all we showed that $$g(a)=g(b)$$ implies $$a=b$$. So $$g$$ is injective.

$$g$$ is surjective is showed like this:

By definition we have to show that for every $$y\in\mathbb{R}$$ (value range) there is some $$x\in\mathbb{R}$$ (definition range) such that $$g(x)=y$$.

So we have to solve the equation $$2x^5+9=y$$ for $$x$$.

This is done easily with the use of the fifth root (which we avoided earlier, but unfortunatly can not(!) avoid here).

We get: $$x=\sqrt[5]{\frac{y-9}{2}}$$.

Indeed:

$$g(\sqrt[5]{\frac{y-9}{2}})=2\left(\sqrt[5]{\frac{y-9}{2}}\right)^5+9=2\frac{y-9}{2}+9=y$$.

Notice that we have shown more here. We jus calculated the inverse function of $$g$$. Which is given by $$g^{-1}:\mathbb{R}\to\mathbb{R}$$, $$g^{-1}(x)=\sqrt[5]{\frac{x-9}{2}}$$

We can check this by showing:

$$g(g^{-1}(y))=y$$ and $$g^{-1}(g(x))=x$$

Then $$g^{-1}$$ is indeed the inverse to $$g$$ and this shows immediatly that $$g$$ is not just surjective, but also injective!

• Wow, thanks for such a detailed answer. To verify if I understand correctly; function is injective if it's always increasing or decreasing, so I just have to verify that? Oct 5 '19 at 19:49
• In general you can not use every method (exept the proof by definition) to every function. Your function has some properties other functions do not have. It is differentiable and continuous. To talk about the derivate you need a differentiable function, but not every function is. Oct 5 '19 at 19:52
• @PeterF. Also it depends on what you have showed in your lecture, as I tried to emphazise. If you have shown that result, you can use it. If the method can be applied. Oct 5 '19 at 19:53
• We didn't establish the concepts of differentiability and continuity (yet) at our lecture. Oct 5 '19 at 19:56
• @PeterF. That is what I thought. So you have to use the approach by definition. I do not think that you have to avoid the use of the fifth root and can use that, because the part about surjectivity would not be possible then. At least I do not see a way to avoid the fifth root there. Oct 5 '19 at 19:58

Since $$f'(x)=10x^4$$ maintains a positive sign (except at finitely many points) for all real $$x,$$ it follows that the function $$f(x)$$ is monotonic on the real axis, and therefore injective there.

For surjectivity, note that as $$x\to\pm\infty,$$ we have that $$f(x)\to\pm\infty$$ too respectively. Since the function is continuous, it follows by IVT that it is surjective.

• And how would I prove that some function is injective or surjective in general? Oct 5 '19 at 19:23
• @PeterF. Check out my answer for a detailed insight in how to approach this. I showed several methods. Advanced and basic ones. Oct 5 '19 at 19:26
• @PeterF. In general, there is no recipe. However, the closest to being general is probably to try to apply the definitions first. Oct 5 '19 at 19:54
• @PeterF. For differentiable functions, you can always check the sign of the derivative for injectivity, as done above. Also, for functions continuous on their domain, you can always check the endpoints as done above to see if they're of different sign. Oct 5 '19 at 19:56

Since in $$\Bbb R$$, the following functions are bijective, so is their composition: $$x\mapsto x^5\\ x\mapsto 2x\\ x\mapsto x+9$$

• And how would I prove that some function is injective or surjective in general? Oct 5 '19 at 19:22
• Verify the definitions. Oct 5 '19 at 19:29

hint You can put

$$f(x)=x^5$$ and

$$h(x)=2x+9$$

with $$g = h \circ f$$.

it is easy to prove that $$f$$ and $$h$$ are bijectives.

• And how would I prove that some function is injective or surjective in general? Oct 5 '19 at 19:22