# $f(x)=3x+4$ - Injective and Surjective?

As a follow-up to Understanding why $f(x)=2x$ is injective, I'm working on proving/disproving that $$f(x)=3x+4,$$ where inputs/outputs live on real numbers, is injective and surjective.

Supposing that $$f(a)=f(b),$$ then $$3a+4=3b+4.$$

Solve for $0$:

$$3a+4-4-3b=0$$ $$3(a-b)=0$$

So, $a$ must equal $b$. Therefore, $f$ is injective.

With respect to whether it's surjective, I looked at its graph:

Since $$3x + 4$$ is linear, then it's continuous, I believe. As a result, is that proof enough that it's surjective, i.e. for all $x$ in $$f(x),$$ the output will cover all real numbers?

• Don't forget to also format for latex in your titles. And don't forget to put your punctuation inside the dollar signs when you use double dollars, otherwise it formats the punctuation by itself on the following line. – Gregory Grant May 15 '15 at 16:37
• Understood, thank you. I'll be more careful in future posts. – Kevin Meredith May 15 '15 at 16:52
• No one says 'Solve for $0$'. 'Solve for' is only used for when you want to find a variable in an equation. You can say, given an equation with $x$ as a variable, 'solve for $x$', which would mean 'find $x$ expressed as an expression independent of $x$'. – user26486 May 15 '15 at 17:24

## 4 Answers

I would structure your proofs like so.

Claim: The mapping $f\colon\mathbb{R}\to\mathbb{R}$ defined by $f(x)=3x+4$ is injective.

Proof. Let $x_1,x_2\in\mathbb{R}$ and suppose $f(x_1)=f(x_2)$. Then $$f(x_1) = f(x_2)\\[0.5em] 3x_1+4 = 3x_2+4\\[0.5em] 3x_1=3x_2\\[0.5em] x_1=x_2.$$ Thus, the mapping is injective. $\blacksquare$

Claim: The mapping $f\colon\mathbb{R}\to\mathbb{R}$ defined by $f(x)=3x+4$ is surjective.

Proof. Suppose $y\in\mathbb{R}$. Then let $x=\frac{y-4}{3}$. We have the following: \begin{align} f(x) &= 3x+4\\[0.5em] &= 3\left(\frac{y-4}{3}\right)+4\\[1em] &= (y-4)+4\\[0.5em] &= y. \end{align} Thus, the mapping is surjective. $\blacksquare$

You can prove directly that $f$ is surjective.

Suppose $y\in\mathbb R$. Can we find an $x\in\mathbb R$ with $f(x)=y$?

$$3x+4 = y \iff 3x = y-4 \iff x = \tfrac13 y - \tfrac43$$

and that's certainly a real number if $x$ is, so we're done.

• @Adayah: Yes, I'm not sure how continuity alone helps, as It is neither necessary nor sufficient to show surjectivity without additional hypotheses. – MPW May 15 '15 at 16:54
• OP probably wanted to connect it with the fact that $f[ \mathbb{R} ]$ is unbounded from below and above and use Darboux property, which makes for some proof. – Adayah May 15 '15 at 16:57

To show surjectivity, reason as follows:

Suppose $f(x)$ is some arbitrary number $y$. Is there an $x$ I can plug in to $f$ that will produce that number $y$ ?

In your case this amounts to solving $y=3x+4$ for $x$, which will show that the answer is yes.

Since $y$ was an arbitrary number, you have shown that any real number will be hit by $f$, which means it is surjective.

Suppose to the contrary that some real number $r$ was not in its image.

But $x = \frac{r-4}{3}$ is equal to that number $r$.

• Could you please say what iage means? – Kevin Meredith May 15 '15 at 16:53
• @KevinMeredith It was a typo. It was meant to say image. – MCT May 15 '15 at 20:59