Christopher F. answered • 10/26/14

M.S. in Mathematics with specialization in proof-writing.

This function is surjective but not injective:

You can attain any z value in the codomain simply by letting x=0 and y=3z for z positive, by letting x,y=1 for when z=0, and by letting x=2 and y=-z for z negative; therefore surjective.

Now let (x1,y1)=(2,3) and (x2,y2)=(-2,3), then we have f(x1,y1)=f(x2,y2) and (x1,y1) not equal to (x2,y2); therefore not injective.