# Definitions of a function, a one-to-one function and an onto function

These are the definitions as I understand them... are they correct?

Function: for every element $x$ in the domain, there is one and only one corresponding element $f(x)$ in the codomain $\longrightarrow$ $f(x)$ is not unique

One-to-One Function: for every element $x$ in the domain, there is one and only one corresponding $f(x)$ in the codomain $\longrightarrow$ $f(x)$ is unique

Onto Function: for every element $f(x)$ in the codomain, there is one and only one corresponding element $x$ in the domain $\longrightarrow$ $x$ is unique

• That's not true for the onto function. – user63181 Aug 30 '13 at 14:14
• @Sami Ben Romdhane: Thanks, is $x$ not unique? – CuriousGeorge119 Aug 30 '13 at 14:17
• IN the first one, of course $f(x)$ is uniquely determined by $x$. In the second, you have not stated the key property of one-to-one correctly. And the third one is wrong too, uniqueness is not required. – André Nicolas Aug 30 '13 at 14:17
• I've upvoted this question. I don't see a reason why it should be downvoted. – user70962 Aug 30 '13 at 14:20
• I learned the basics of functions during precalculus, but the heart of it came from discrete mathematics. – Eleven-Eleven Aug 30 '13 at 14:39

For the definition of a function, you need $f(x)$ to be unique. Otherwise, it might be the case that $x$ is sent to more than one value and then what is $f(x)$?

For the definition of one-to-one, you need that for each $y$ in the codomain there is only one $x$ such that $y = f(x)$. For example, $f(x) = x^2$ is not one-to-one because $y = 1 = f(-1)=f(1)$.

For the definition of onto, we don't require uniqueness. It is permissible to have more than one value in the domain mapping to the same value in the codomain. However, be careful and pay attention to the existence part of this definition. For example, $f: \mathbb{R} \rightarrow \mathbb{R}$ defined by $f(x) = x^2$ is not onto because no value in the domain maps to negative numbers which are in the codomain.

Hope this helps!

• I think I see now that two different elements in the codomain cannot share the same value for x, so f(x) must be unique for the definition of a function. And the one-to-one statement I made is actually the correct definition of a function, I think... This really helped, thanks Bryan Urizar! – CuriousGeorge119 Aug 30 '13 at 16:31
• @CuriousGeorge119 Yes, you're right. You're welcome! – user70962 Aug 30 '13 at 17:21
• Oh and drawing pictures with this is very helpful! Draw what each one should look like and then draw examples that don't satisfy these three definitions and that will help even more. – user70962 Aug 30 '13 at 17:23

function - for every x in the domain, there exists a unique y in the codomain such that f(x)=y

1-1 function - a function such that every element in the codomain has no more than a single x element in the domain which maps to it.

onto function - a function such that for every element in the codomain, there exists at least 1 x element in the domain which maps to it.

• So onto means that the image of the domain is equal to the codomain... Which means every element in the codomain maps to an element in the domain? Which is desirable because all elements of the codomain are known? – CuriousGeorge119 Aug 30 '13 at 16:38
• Consider the two functions $f: \mathbb{R} \rightarrow \mathbb{R}$ with $f(x) = x^2$ and $g: \mathbb{R} \rightarrow \mathbb{R}_0^+$ with $g(x) = x^2$. The first is not onto because $f(\mathbb{R}) \neq \mathbb{R}$. The second is onto because $g(\mathbb{R}) = \mathbb{R}_0^+$. So essentially, a function is onto if every value in the codomain has a value in the domain which maps to it. In the first case, nothing in the domain maps to negative values in the codomain, but in the second, we've omitted these negative values from the codomain so we don't have to worry about them anymore. – user70962 Aug 30 '13 at 17:33
• @Bryan Urízar: You are very kind to answer this question of mine as well!!! – CuriousGeorge119 Aug 31 '13 at 19:16