MCS013 – Assignment 8(d)
A function is onto if and only if for every yy in the codomain, there is an xx in the domain such that f(x)=yf(x)=y.
So in the example you give, f:R→R,f(x)=5x+2f:R→R,f(x)=5x+2, the domain and codomain are the same set: R.R. Since, for every real number y∈R,y∈R, there is an x∈Rx∈R such that f(x)=yf(x)=y, the function is onto. The example you include shows an explicit way to determine which xx maps to a particular yy, by solving for xx in terms of y.y. That way, we can pick any yy, solve for f′(y)=xf′(y)=x, and know the value of xx which the original function maps to that yy.
Side note:
Note that f′(y)=f−1(x)f′(y)=f−1(x) when we swap variables. We are guaranteed that every function ff that is onto and one-to-one has an inverse f−1f−1, a function such that f(f−1(x))=f−1(f(x))=xf(f−1(x))=f−1(f(x))=x.