Does a positive and negative integer pair of Bezout coefficients always exist

elementary-number-theory

For nonzero integers $x$ and $y$, does there always exist $a$ and $b$ of opposite signs such that $ax+by=\gcd(x,y)$? The property is true for $x,y>0$, due to the gcd being less than or equal to $x$ or $y$, and also for $x,y<0$ since $\gcd(x,y)=\gcd(-x,-y)$. I'm wondering about the cases where either $x$ or $y$ is negative and the other one is positive. I'm aware that countably infinite solutions exist but I don't know if that guarantees $a$ and $b$ of opposite signs. From manually testing some values, I don't believe it is actually possible. Here is what I attempted:

Assume wlog that $x>0$ and $y<0$. Then the solutions $(a,b)=(a_0-k{y\over d},b_0+k{x\over d})$ where $d=\gcd(x,y)$. The solutions only occur for integer $k$ but I'm considering $k$ to be real. Then $a(k)$ and $b(k)$ against $k$ can be plotted on a graph. Let $c$ be the intersection value of $a(k)$ and $b(k)$ and $k_0$ the value of $k$ at which it occurs. It can be seen that the gradients of $a(k)$ and $b(k)$ will have the same sign. This restricts the possible situations where their signs are opposite. Namely if $|c|\leq1$ and $|k_0|\leq1$ then $a(k)$ and $b(k)$ will never have opposite signs for integer $k$ (feels true intuitively, I don't have rigorous argument for this). Solving for $k_0$ gives $k_0=\frac{d(a_0-b_0)}{x+y}$. From there
$$\begin{align}|k_0|&\leq1\\\left|\frac{d(a_0-b_0)}{x+y}\right|&\leq 1\\d|(a_0-b_0)|&\leq|x+y|\end{align}$$

From there I got stuck as $a_0$ and $b_0$ are found through an algorithmic process so I can't think of how to manipulate them to prove that inequality. $|c|\leq1$ seems even harder to arrive at.

I'd appreciate if anyone can help prove or disprove my question. I'd also like to know if my method can be continued to find the answer.

Best Answer

Hint: apply below to ($\rm\color{#0a0}{discrete}$) line $\,\overbrace{b = f(a) = d/y \color{#c00}{- (x/y)}\,a}^{\textstyle ax + by = d},\ d\!=\!\gcd(x,y)\!>\! 0,\,\ \color{#c00}{x\!>\!0\!>\!y}$

If $f$ is ${\rm\color{#c00}{strictly\ increasing}}\ \&\ f(0)\!\ge\! -1$ then $a\!>\!0\color{#c00} \Rightarrow f(a)\!>\!f(0)\!\ge\! \color{#0a0}{\bf -1},\,$ so $f(a)\!\ge\! \color{#0a0}{\bf 0}\,$ if $f(a)\color{#0a0}{\!\in\! \Bbb Z}.\,$ Thus $a,b$ have same sign if $a>0;\,$ ditto if $\,a\!<\!0\,$ & $f(0)\le 0,\,$ by $f(a)\!<\!f(0)\le 0.\,$

Related Question