I found the following statement from the textbook accompanying MIT's course Mathematics for Computer Science. The pdf can be found here, on page 8.
I can't see how the first implies the second, but I don't know what to learn in order to better understand this. Can anyone point me in the right direction?
$a = q(sa + tb) + r$ so $r = (1-qs)a + (-qt)b$
I can see that the terms are the same, but where does the 1 come from here? My understanding of algebra is fairly limited, but here I don't even know where to start. Any help is appreciated!