Proving that f(x,y) is "one-to-one" and "onto" depends upon the range space!
Since f(x,y)= 2x+ y is, for numbers x and y, a single number, the "default" assumption would be that f maps R2 to R.
And to prove, one way or the other, use the definitions!
A function, f, from set U to set V, is said to be "one to one" if and only if two different values, p and q, in U cannot give the same point in V.
Here, U is R2 so we can write p= (x_1, y_1) and q= (x_2, y_2)
. V is R so any point in V is a single number, z. Now, if f= 2x+ y were not one to one, then there would exist p= (x_1, y_1) and q= (x_2, y_2) such that f(p)= 2x_1+ y_1= 2x_2+ y_2= f(q). That would mean 2(x_1- x_2)= -(y_1- y_2)= 0 Well, take x_1= 3, x_2= 2, y_1= 1, y_2= 3. Then x_1- x_2= 3- 2= 1 so 2(x_1- x_2)= 2 and y_1- y_2= -2 so -(y_1- y_2)= 2 also.
That is, f(3, 1)= 2(3)+ 1= 7 and f(2, 3)= 2(2)+ 3= 7. No, f(x, y)=2x+ y is NOT "one to one".
A function, f, from set U to set V, is "onto" (the set V) if and only if, for any point q in V, there exist at least one point p, in U so that f(p)= q. To show that f(x,y)= 2x+ y is "onto" R, let z be any real number (any point in R) and look for (x, y) (a point in R2) such that 2x+y= z. In fact (exactly because this function is not "one to one") there are many such points. Take, for example, y to be z- 2 and x to be 1.
Yes, f(x, y)= 2x+ y is "onto" the set of real numbers.