# Codomain and range of onto Functions

Is the codomain and range of an onto function the same? As far as I understand, if $$f:A\to B$$, range is all possible values in B. So if it's an onto function, then all values in B must be mapped to something in A right? Am I correct?

## 1 Answer

Is the codomain and range of an onto function the same?

Yes, by definition a function $$f:A\to B$$ is onto if the range ($$f(A)$$) equals the codomain ($$B$$).

So if it's an onto function, then all values in B must be mapped to something in A right? Am I correct?

I'm not sure you wrote what you meant to write. All values in $$B$$ must be mapped to by something in $$A$$, yes.

• thanks! sorry I didn't know onto functions were defined like that. I was taught only the definition that a function is onto if " All values in B must be mapped to by something in A" – Teerex Nov 8 at 20:44
• @Teerex ... but those two things are semantically identical. You were taught that definition. They are the same, just with different notation. It's worth thinking about a little. – rschwieb Nov 8 at 20:57