For any nonzero integers $ a $ and $ b $, there exist integers $ s $ and $ t $ such that $ \gcd(a,b) = as + bt $. Moreover, $ \gcd(a,b) $ is the smallest positive integer of the form $ as + bt $.
I know of one proof of this question, in which we consider $$ S = \{ am + bn ~|~ \text{$ m,n \in \mathbb{Z} $ and $ am + bn > 0 $} \}, $$ but I didn’t manage to get the proof. Can someone please explain this theorem?