I was trying to convert a simple linear combination (and gcd):
$$\gcd(a,b) = ax + by$$
To have positive coefficients.
I did read the following here but didn't really understand it and was looking for a much simpler solution/answer.
In particular I had the example where:
$$1=-(-8)50 - 19(21)$$
but I wanted to make the (-8) positive and also the -19 positive. I was told to subtract 21 from 8 and add 50 to -19 but didn't really know how to do this in general or why that was right.
In particular, if the equation is of the form:
$$(-c)n + jk =1$$
but I want $c$ and $j$ to be positive, is there any processing I can do to make them both positive?
I guess what I am trying to understand more deeply, what is special about:
$$1=-(-8)50 - 19(21)$$
that is not special about other ways of expressing the gcd as a linear combination?
Assuming that I understand what is special about $1=-(-8)50 - 19(21)$, can we make a more general argument about $(-c)n + jk =1$, or even better, about:
$$(-c)n + jk =d$$
does the sign of d even matter?
Let $a$ and $b$ be positive integers. Then we cannot find integers $x$ and $y$, both positive, such that $\gcd(a,b)=ax+by$.
For if $x$ and $y$ are positive, then $ax+by\ge a+b\gt\gcd(a,b)$.
Remark: If the gcd of $a$ and $b$ is $1$, and $c$ is large enough (greater than $ab-a-b$) then we can find non-negative $x$ and $y$ such that $ax+by=c$. You can find proofs in various places. I wrote one recently on MSE. Similarly, whatever the gcd is, if $c$ is large enough and divisible by the gcd, then there exist non-negative $x$ and $y$ such that $ax+by=c$.