Proving a function is surjective, what exactly should our assumption be? I don't fully understand surjective proofs.
Here is a baby example I worked on.
PROPOSITION: Let f $\mathbf{R} \rightarrow \mathbf{R}$ be the function defined as $f(n)= 2n+3$.
Proof f is surjective:
For $f$ to be surjective our range, must be in all of $\mathbf{R}$. Let's assume  y$ \in \mathbf{R}$, then let's take the inverse of your function to attain $n=(y-3)/2$. We can see $y, n \in \mathbf{R}$, but more importantly we can see $n$ in the domain. Note if we  plug this back into our function we would attain $$ 2(y-3)/2+3$$
$$ = (y-3)+3$$
$$ = y$$
This shows that $f$ is surjective.
I think my assumption is off. I know I have to prove directly. I believe that means we can attain a y for from a given n. Therefore we must assume y in $\mathbf{R}$ then.... I am a little lost. My guess is that we would use $f(n)=$ some way to find $f(n)=\mathbf{R}=y$, but there is something I missing.
Thank you for your response.
 A: Your assumption is not that off.
In order to prove that a function is surjective you can either prove this directly. Or you can find the inverse function proving that the function is bijective(just like you have done), thus proving the function is surjective.
Proving $\displaystyle f(x) =2+3$ is surjective directly:
Let $\displaystyle x\in \mathbb{R}$ We need to prove that there exists an $\displaystyle x$ S.T- $\displaystyle f( x) =y$
We choose $\displaystyle x=\frac{1}{2} y-\frac{3}{2}$
Which follows-
$\displaystyle \ \ \ \ \ f( x) =2x+3\rightarrow \ \ f\left(\frac{1}{2} y-\frac{3}{2}\right) =2\cdotp \left(\frac{1}{2} y-\frac{3}{2}\right) +3=y$
A: The reasonning you used here is known as "Analysis-Synthesis" , which means that, for example, if you want to prove that a cetain proposition $ P $ is true, you do it in two steps :
1)-Analysis
You begin by assuming that $ P $ is true and you find a necessary condition $ Q $, then


*Synthesis

You check that this necessary condition $ Q $ , is sufficient.
In your case : Given $ y\in \Bbb R$,
you want to prove that
$$P : (\exists x\in \Bbb R)\;:\; f(x)=y$$
You got the necessary condition
$$Q : x=\frac{y-3}{2}$$
