For any pair of positive integers $a$ and $b$, there exist $x,y\in\mathbb{Z}$
so that $ax + by = \gcd(a,b)$.
Proof:
Consider the set
$$
K = \{ ax + by\ |\ x,y\in\mathbb{Z}\}\tag{1}
$$
Let $k$ be the smallest positive element of $K$. Since $k\in K$, there are $x,y\in\mathbb{Z}$ so that
$$
k = ax + by\tag{2}
$$
Because $\mathbb{Z}$ is a Euclidean Domain, we can write
$$
a = qk + r\text{ with }0\le r < k\tag{3}
$$
Therefore, we can write
$$
\begin{align}
r
&= a - qk\\
&= a - q(ax+by)\\
&= a(1-qx)+b(-qy)\\
&\in K\tag{4}
\end{align}
$$
Since $k$ is the smallest positive element in $K$, $(3)$ and $(4)$ imply that $r$ must be $0$. Thus, $a = qk$, and therefore, $k$ divides $a$. Similarly, $k$ divides $b$. Thus, $k$ is a common divisor of $a$ and $b$, and therefore, $k\le\gcd(a,b)$.
Since $\gcd(a,b)$ divides both $a$ and $b$, and $k = ax + by$, $\gcd(a,b)$ divides $k$.
Since $\gcd(a,b)$ divides $k$ and $k\le\gcd(a,b)$, we get that $k=\gcd(a,b)$. Thus, $(2)$ becomes
$$
\gcd(a,b)=ax+by\tag{5}
$$
Futhermore, in this answer, the following are shown for $\gcd(a,b)=1$:
If $c\ge(a-1)(b-1)$, then $ax+by=c$ has a non-negative solution, that is, one in which both $x$ and $y$ are non-negative integers.
Suppose that $0 < c < ab$ and neither $a|c$ nor $b|c$. Then one and only one of
$$
ax+by=c\tag{6}
$$
and
$$
ax+by=ab-c\tag{7}
$$
has a non-negative solution.
Well, if you strip the sign of $a$ and $b$, and instead run the Euclidean algorithm for $|a|$ and $|b|$, then if your result is $|a|x+|b|y=1$, you can still get a solution of what you want because
$$a(\text{sign}(a)\cdot x)+b(\text{sign}(b)\cdot y)=1.$$
Assuming $a$ and $b$ are positive and $a>b$, by definition, $r$ is less than $b$. Then $b<a$ and $r<b$, so you have smaller numbers than you started with. If $a<b$, then just switch $a$ and $b$. If $a=b$, then $\gcd(a,\,b)=a=b$. Since $b$ and $r$ are still non-negative (also by definition), the only possibility is to go to zero. The numbers are getting smaller and remaining non-negative.
Best Answer
Bezout's Identity says that
For any pair of positive integers $a$ and $b$, there exist $x,y\in\mathbb{Z}$ so that $ax + by = \gcd(a,b)$.
Proof:
Consider the set $$ K = \{ ax + by\ |\ x,y\in\mathbb{Z}\}\tag{1} $$ Let $k$ be the smallest positive element of $K$. Since $k\in K$, there are $x,y\in\mathbb{Z}$ so that $$ k = ax + by\tag{2} $$ Because $\mathbb{Z}$ is a Euclidean Domain, we can write $$ a = qk + r\text{ with }0\le r < k\tag{3} $$ Therefore, we can write $$ \begin{align} r &= a - qk\\ &= a - q(ax+by)\\ &= a(1-qx)+b(-qy)\\ &\in K\tag{4} \end{align} $$ Since $k$ is the smallest positive element in $K$, $(3)$ and $(4)$ imply that $r$ must be $0$. Thus, $a = qk$, and therefore, $k$ divides $a$. Similarly, $k$ divides $b$. Thus, $k$ is a common divisor of $a$ and $b$, and therefore, $k\le\gcd(a,b)$.
Since $\gcd(a,b)$ divides both $a$ and $b$, and $k = ax + by$, $\gcd(a,b)$ divides $k$.
Since $\gcd(a,b)$ divides $k$ and $k\le\gcd(a,b)$, we get that $k=\gcd(a,b)$. Thus, $(2)$ becomes $$ \gcd(a,b)=ax+by\tag{5} $$
Futhermore, in this answer, the following are shown for $\gcd(a,b)=1$:
If $c\ge(a-1)(b-1)$, then $ax+by=c$ has a non-negative solution, that is, one in which both $x$ and $y$ are non-negative integers.
Suppose that $0 < c < ab$ and neither $a|c$ nor $b|c$. Then one and only one of $$ ax+by=c\tag{6} $$ and $$ ax+by=ab-c\tag{7} $$ has a non-negative solution.