An intermediate step in a problem I'm trying to solve is to find $gcd(1, 4)$. Using the Euclidean algorithm, this is $1$:
$$ 1 = 0\times4 + 1 \\ 4 = 4\times1 + 0 $$
Bezout's identity tells us that the $gcd$ of two numbers $a$ and $b$ can be written as a linear combination of some integers $x$ and $y$:
$$ ax + by = d $$
In our case:
$$ 1x + 4y = 1 $$
To find values of $x$ and $y$, I learned that we can use the Euclidean algorithm and back-substitution. But while I'm able to perform this successfully for other types of problems, I'm stuck on this particular one.
If we have these steps:
$$ 1 = 0\times4 + 1 \\ 4 = 4\times1 + 0 $$
Then working backwards to solve for $1$:
$$ 1 = 1 - 0\times4 = 1 - (4-4\times1)\times4 $$
And I feel like I'm not really making any meaningful progress. My book claims that the answer is $x = -3$ and $y = 1$ but does not clarify how it arrived at this solution. I understand that this solution works, but I don't understand how to derive it using the Euclidean algorithm. What am I missing?