Is the function $f:\mathbb{R}^2\to\mathbb{R}^2$, where $f(x,y)=(x+y,x)$, one-to-one, onto, both?

I have to determine whether the function $f:\mathbb{R}^2\to\mathbb{R}^2$ defined by $f(x,y)=(x+y,x)$ is one-to-one, onto, and if both then describe its inverse. I'm relatively new to mapping since I've only had Linear Algebra so I am not sure how to do this problem at all. I've asked others and they've included equations and stuff like that but didn't tell me where they got them from. So basically I need a step by step explanation of this problem. Thanks.


Solution 1:

One-to-one: Let $(x_1,y_1),(x_2,y_2)\in\mathbb{R}^2$ and assume that $f(x_1,y_1)=f(x_2,y_2)$. Then $$ (x_1+y_1,x_1)=(x_2+y_2,x_2) $$ or in other words $(x_1+y_1)=(x_2+y_2)$ and $x_1=x_2$. Is this enough to deduce that also $y_1=y_2$, and hence $(x_1,y_1)=(x_2,y_2)$?

Onto: Let $(x,y)\in\mathbb{R}^2$. The goal is to find $(a,b)\in\mathbb{R}^2$ such that $f(a,b)=(x,y)$. But this is just to find $(a,b)$ such that $$ (a+b,a)=(x,y). $$ Can you find $a$ and $b$ from here?

Inverse: Let $(x,y)\in\mathbb{R}^2$ and consider the point $f(x,y)=(x+y,x)$. What do we have to do to $(x+y,x)$ in order to get back to $(x,y)$? Clearly, the second coordinate $x$ should be mapped to the first coordinate. And if we take the first coordinate $x+y$, subtract the second coordinate $y$ and map the result into the second coordinate we obtain $(x,y)$. Mathematically, this is given by $$ f^{-1}(x,y)=(y,x-y),\quad (x,y)\in\mathbb{R}. $$

Check: Let us check our calculations by verifying that $f^{-1}(f(x,y))=(x,y)$: $$ f^{-1}(f(x,y))=f^{-1}(x+y,x)=(x,(x+y)-x)=(x,y),\quad (x,y)\in\mathbb{R}. $$