# Confusion regarding surjective function

I am a high school student, today our teacher taught us about onto function, explain only thing that I understand What I have understand -- that is two values of $$x$$ have same value of $$y$$ mean $$y=1$$ is a onto function but how find the function is onto for the given different equations.

Edit - i have one more doubt regarding the same function what my teacher told me that for every value of x there is value in set y am if i am right suppose set x contain 4 element and set y contain 3 element one one function is not possible if my above statement is right please correct me if i am wrong

Is parabola is always a onto function

• – Lord Shark the Unknown Aug 10 at 10:33
• Are you confusing injective with surjective? – Lord Shark the Unknown Aug 10 at 10:34
• Yes little a bit because it injective function say function is one one that is function is not onto ,what my teacher told me that for every value of x there is value in set y am if i am right suppose set x contain 4 element and set y contain 3 element one one function is not possible if my above statement is right – yuvraj singh Aug 10 at 10:41
• You really need to learn to use punctuation. Your texts are extremely hard to read, because they just run on. – Henrik Aug 10 at 10:45
• Sorry i improving my grammar as well as my english hopefully in future i will improve it if you can clear my edit doubt. – yuvraj singh Aug 10 at 10:47

Surjective is another word for onto.

A function $$f:A\to B$$ is onto if for every $$y\in B$$ the exists at least one $$x\in A$$ such that $$f(x)=y$$

For example $$f(x)=x^2$$ is an onto function from $$(-\infty, \infty)$$ onto $$[0, \infty)$$

Because for every non negative real number $$y$$ we have $$f(\sqrt x)=y$$

• Sir given function should be onto from minus infinity to infinity why you have written from 0 to infinity because not two value from 0 to infinity have same value of y – yuvraj singh Aug 10 at 10:50
• Squaring only yields non-zero real numbers, such that the function cannot be onto if you allow negative real numbers in your codomain. – ThorWittich Aug 10 at 11:02
• The codomain is $[0,\infty)$ which makes the function onto. If you expand the codomain to the whole real line then it is not onto. In any case the function is not one to one. – Mohammad Riazi-Kermani Aug 10 at 11:11

I think that if you can understand this picture, then you can understand why a function from a set of four elements to a set of 3 elements cannot possibly be one-to-one (i.e injective).

https://img.yumpu.com/35419243/1/500x640/non-regular-languages-pigeonhole-principle-the-pigeonhole-.jpg

**

If you can understand these pictures, I think you will understand the definition of one-to-one (injective) functions, onto (surjective) functions, etc..

https://www.mathsisfun.com/sets/images/function-mapping.svg

**

Also, a remark to the other people who posted: I answered this question because I think it is quite mean for people to downvote a highschool student's sincere question. If you do not like the grammar, edit it rather than downvoting.

• A big thank you sir i got my point – yuvraj singh Aug 10 at 11:55
• Sir if you can provide me the way through i can find the functions to be onto – yuvraj singh Aug 10 at 12:54
• you need to take an arbitrary element of the range, and show that there is something in the domain that goes there. For example, consider the function $f:{0,1,2} -> {100,101}$ given by $f(0) = f(1) = 100$ and $f(2) = 101$. If we want to show $f$ is onto then, we need to find something which goes to 100 and something that goes to $101$. Since $f(1) = 100$, $1$ goes to $100$. Since $f(2) = 101$, $2$ goes to $101$. That is all! So $f$ is onto - it is simple! Try showing for yourself that $f(x) = x^3$ is onto as a function from $\mathbb{R} \to \mathbb{R}$. – Maithreya Sitaraman Aug 10 at 14:32
• (and note that the example $f(x) = x^2$ has been explained in the other answer) – Maithreya Sitaraman Aug 10 at 14:34
• I have an example The mapping f:R→R defined by f(x)=x3+1 is injective. Proof. Let x1,x2∈R and suppose f(x1)=f(x2). Then f(x1)=f(x2)x31+1=x32+1x31=x3 x1=x2 mean there are two element in set A let say x1,x2 who have common y value and if x1 not equal x2 then function will be onto am i right sir – yuvraj singh Aug 10 at 15:05