# Is $f(x, y) = 5x - 4y$ injective or surjective?

Define $f : \Bbb Z\times\Bbb Z \to\Bbb Z$ by $f(x, y) = 5x - 4y$.

Is $f$ injective or surjective?

How would I go about proving this?

Thanks

• Do you know the definitions of injectivity and surjectivity? – Dave Jun 21 '17 at 21:19
• Yeah, I just have trouble formally proving if its surjective – ivince95 Jun 21 '17 at 21:59
• A good thing to do is just write down the definitions of injectivity and surjectivity, and see if the function satisfies these conditions. – Dave Jun 21 '17 at 22:28

HINT

• A function is injective if it maps different inputs for different values. Can you find $x,y,v,w,a$ such that $f(x,y) = a = f(v,w)$ with $(x,y) \ne (v,w)$?
• A function is surjective if it completely covers the set it maps to. Let $a \in \mathbb{Z}$. Can you find such $x,y \in \mathbb{Z}$ so that $f(x,y)=a$?
• @ivince95 that you picked such an example shows it is not injective, since different inputs lead to the same outputs. It should be surjective, can you prove that any integer can be written as a linear combination of $4$ and $5$? For example, you can write $1$ that way, and then any number, e.g. $29 = 29 \cdot 1$... – gt6989b Jun 21 '17 at 21:29

Surjective: Fix a $z \in \mathbb{Z}$ and try to find an $x=(x1,x2) \in \mathbb{Z}\times\mathbb{Z}$ with $f(x1,x2)=z$. For Injectivity, show that for $(x1,x2) \neq (y1,y2) \in \mathbb{Z}\times\mathbb{Z}\implies f(x1,x2) \neq f(y1,y2)$.

• Can you show me an example for the surjective? – ivince95 Jun 21 '17 at 22:07

Hints:

$$5x-4y=5a-4b\iff 5(x-a)=4(y-b)\implies\begin{cases}x=a\pmod 4\\y=b\pmod 5\end{cases}$$

For example: $\;5\cdot3-4\cdot7=5\cdot7-4\cdot12\;$

Also, since $\;gcd(4,5)=1\;$ , there exist $\;m,n\in\Bbb Z\;$ s.t. $\;5m+4n=1\;$ , so for any $\;t\in\Bbb Z\;$ ...