[Math] Onto and One-to-One of a 2 variable function

functions

Pretty easy when its only a function of the form $y = ax + b$, however I'm trying to find if this function:

$f(x,y) = 2x + y$

is onto and one-to-one. Is there a procedure to follow to check this?
Thanks!

EDIT: My reasoning.

onto:

$z = 2x + y$

$x = (z-y)/ 2$

$y = z – 2x$

Seeing as both $x$ and $y$ can be represented in "safe" ways (no dividing by zero), I'm assuming that the function is onto.

One-to-One:

$2x_1 + y_1 = 2x_2 + y_2$

$2(x_1-x_2) = (y_2-y_1)$

Therefore if $y_2 = y_1$, $x_2 = x_1$.

I guess my reasoning is wrong :/

Best Answer

I'm assuming your function has domain all of $\mathbb{R}^2$. For the codomain, some subset of $\mathbb{R}$. But you should state them explicitly, especially when you are trying to figure out if the function is one-to-one and/or onto; those properties depend on the domain the codomain, not just on the formula.

To show the function is onto, given any $z$ you just need to produce a single pair $(x,y)$ that maps to $z$.

Your "argument" does not really work. You are defining $x$ in terms of both $z$ and $y$, and then defining $y$ in terms of both $z$ and $x$; you have a circular definition.

For instance, say I ask you to use your formula to produce a pair $(x,y)$ that maps to $z=1$. You say: "take $x = (z-y)/2 = (1-y)/2$, and then $y=z-2x = 1-2x$. So $x=(1-y)/2$, and $y=1-2x$."

Ehr... okay. But what are $x$ and $y$? If you plug in the value of $x$ into the formula for $y$, you get $y=y$; if you plug in the value of $y$ into the formula for $x$, you get $x=x$. You aren't giving any pair that maps to $1$.

So, instead, given $z$, produce a specific value of $x$ and of $y$ (that depends on $z$, of course, but not on $x$ or $y$) that will map to $z$.

For one-to-one, your reasoning breaks down. Once you get to $2(x_1-x_2) = (y_2-y_1)$, you have no warrant for the assertion that $y_1=y_2$ and $x_1=x_2$. If one of them holds, then the other holds; but what if neither holds? For instance, if $x_1=2$ and $x_2=1$, can you find $y_1$ and $y_2$ that will make the equality true anyway? If so, then you can simply exhibit the pairs $(2,y_1)$ and $(1,y_2)$ to show that the function is not one-to-one, since you can find two distinct pairs that map to the same thing.

Related Question