0

Let $a,b$ be given integers and $gcd(a,b)|n$, which implies by a theorem that I have that there are some integers $x_0,y_0$ such that $n=ax_0+by_0$. Moreover, suppose that $x,y$ are two other integers such that $n=ax+by$.

I need to show that $x$ has the form $x_0+\frac{tb}{gcd(a,b)}$ and $y$ has the form $y_0-\frac{ta}{gcd(a,b)}$ for some appropriate choice of integer $t$. I was given the hint to prove this by contradiction but I saw absolutely no path forward using that.

Since $n=ax_0+by_0=ax+by$ I can infer $a(x-x_0)=-b(y-y_0)$. I can also see that my goal amounts to proving the existence of an integer $t$ such that

$$(x-x_0)\cdot gcd(a,b) = tb\\ (y-y_0)\cdot gcd(a,b)=-ta$$

This vaguely resembles the statement that $b$ divides the left-hand side of the first equation, and likewise for $a$, although it's a little more than that. One thing that comes to mind is that $|ab| = gcd(a,b)lcm(a,b)$ but I'm not seeing how I could use that. Thought about maybe arguing that since $a(x-x_0)=-b(y-y_0)$ then either $b|a$ or $b|x-x_0$ but that only holds for prime $b$.

Any help would be appreciated.

Bill Dubuque
  • 272,048
Addem
  • 5,656

3 Answers3

1

We know $a(x-x_0) = -b(y-y_0), a = gcd(a,b)\times c, b = gcd(a,b)\times d$, and $gcd(c,d) = 1$, so $$gcd(a,b)\times c (x-x_0)= -b(y-y_0) \Rightarrow x -x_0 = \frac{-(y-y_0)}{c}b \times \frac{1}{gcd(a,b)}$$

Therefore: $$x = x_0 + \frac{tb}{gcd(a,b)}$$ Which is $t = \frac{y_0 - y}{c}$. So we should show $\frac{y-y_0}{c}$ is an integer number. To show this:

$a(x-x_0) = -b(y-y_0) \Rightarrow gcd(a,b) \times c (x-x_0) = -gcd(a,b) \times d (y-y_0)\Rightarrow x-x_0 = d(y-y_0)/c$

as we know $x-x_0$ is integer, and $gcd(c,d) = 1$, so $\frac{y-y_0}{c}$ is an integer.

OmG
  • 3,138
1

It's clearer if we bring to the fore the innate linear structure. Since $\,ax+by\,$ is linear in $\,x,y,\,$ the general solution of $\ ax+by=n\ $ is the sum of any particular solution $\,(x_0,y_0)\,$ plus the general solution solution of the associated homogeneous equation $\,ax+by = 0\iff x/y = -b/a,\,$ which is $\,(x,y)= n(-\bar b,\bar a),\,$ where $\,\bar a/\bar b\,$ is the lowest terms rep of $\,a/b,\,$ i.e. where $\,\bar a,\bar b\,$ are coprime. Summing these two components gives the general solution

$$\,(x,y)\, =\, (x_0,y_0)+n(-\bar b,\bar a)\, =\, (x_0-n\bar b,\,y_0 + n\bar a)$$

Bill Dubuque
  • 272,048
0

This is a different way of doing what @OMG did.

$a(x-x_0) = -b(y-y_0) \implies \dfrac{a}{\gcd(a,b)}(x-x_0) = -\dfrac{b}{\gcd(a,b)}(y-y_0)$

Hence $\dfrac{a}{\gcd(a,b)} \bigg | \dfrac{b}{\gcd(a,b)}(y-y_0)$.

But $\gcd\left( \dfrac{a}{\gcd(a,b)}, \dfrac{b}{\gcd(a,b)} \right) = 1$.

Thus we must have $\dfrac{a}{\gcd(a,b)} \bigg | (y-y_0)$.

So, for some integer $t$, we must have $y-y_0 = t\dfrac{a}{\gcd(a,b)}$. The rest follows.