Suppose we have an equation of the form $ax+by=0$ with $a,b,c \in \mathbb{Z}$. For simplicity, $a \neq 0, b \neq 0$. Then, a single solution to this equation is $(x_0, y_0)=(-a, b)$. My book states that all solutions are of the form $(x_0, y_0)=(-na,nb)$ with $n \in \mathbb{Z}$. But why? How we really know that this are all solutions. I tried this: Let $(x_1, y_1)$ be an arbitrary solution to this problem. Then $(x_0+x_1, y_0+y_1)$ is also a solution, so, "probably" $(x_0+nx_1, y_0 + ny_1)$ is a solution. Can someone help me out?


First, it must be $\,(-b,a)\,$ is a solution to $\,ax+by=0\,\,,\,\,ab\neq 0\,$ , and not $\,(-a,b)\,$ .

Second, let us solve parametrically the equation:

$$ax+by=0\Longleftrightarrow y=-\frac{a}{b}x\Longrightarrow \text{the general solution is}$$

$$\left(x\,,\,-\frac{a}{b}x\right)\Longleftrightarrow (-bx\,,\,ax)\,\,,\,\,x\in\Bbb Z$$

Please do note the first option above may not be defined in the integers, since it could be $\,a/b\notin\Bbb Z\,$ , but the second one's already fine (if you insist in integer solutions. If you're fine with rational ones then the first form is ok), and it is of the required form (after the correction mentioned at the beginning of my answer)

  • $\begingroup$ Ok, I think I get it, but why you know for sure that you have all solutions with that statement? $\endgroup$ – www.data-blogger.com Sep 26 '12 at 11:36
  • $\begingroup$ Because the general solution is (i.e., all the solutions are) given by $\,y=-\frac{a}{b}x\,$ , when $\,x\,$ is taken from some nice set (a ring or a field, generally) , like $\,\Bbb Z\,,\,\Bbb Q\,$ , etc. $\endgroup$ – DonAntonio Sep 26 '12 at 11:43
  • $\begingroup$ But then not necesarilly $y \in \mathbb{Z}$? And when you multiply the solution by $b$ (or $-b$), then how you know you got all the solutions? $\endgroup$ – www.data-blogger.com Sep 26 '12 at 12:01
  • $\begingroup$ Given in the form $\,y=-\frac{a}{b}x\,$ then no: not necessarily $\,y\in\Bbb Z\,$, but after we multiply through by $\,b\,$ (and we can do this because we have a homogeneous linear equation!), then, if we want to restrict ourselves to integers, all the solution will be integers. If we want rationals, o reals or complex, one way or another will give the same answers (as then we're messing with fields) $\endgroup$ – DonAntonio Sep 26 '12 at 12:06
  • $\begingroup$ So, now you are saying, $(x_0, y_0)$ is a solution $\Leftrightarrow (m x_0, m y_0)$ is a solution. This is not true. For example, if... Ah, I see :p. Thanks! $\endgroup$ – www.data-blogger.com Sep 26 '12 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.