# prove a function is injective/surjective

(This is in the set of real numbers) g(x) = Sinx prove this is either surjective(onto), injective(one to one), or both

i understand that f(x) = x^2 is not injective because f(x)f=f(-x) and we would have to set a restriction on the set of real numbers to make it injective. The textbook does not explain injective or surjective clearly. If someone could maybe explain injective and surjective, and how to prove them for a given function, that would be fantastic.

(discrete mathematics)

• "injective" means that $f(x)=f(y)\implies x=y$. "surjective" for a function $f:A\to B$ means that, given any value $b\in B$ the equation $f(a)=b$ has at least one solution. Thus $x^2$, viewed a function $f:\mathbb R\to \mathbb R$ is neither...$f(1)=f(-1)$ so it isn't injective, and $f(x)=-1$ has no real solution so it isn't surjective. – lulu Oct 7 '16 at 16:42

Note that $f(x)=\sin(x)$, viewed as a function $f:\mathbb{R}\to\mathbb{R}$, is neither injective nor surjective. It can't be injective because $\sin(0)=\sin(2\pi)=0$. It can't be surjective because $-1\leq \sin(x)\leq 1$, so for instance $\sin(x)=2$ does not have a solution.