Assume $a$ and $b$ are positive integers. Consider the following set of positive integers $$X =\{xa + yb > 0\,|\,x,y ∈ \mathbb{Z}\}$$ (where $x$ or $y$ can be negative or $0$). $X$ is non-empty since it contains both $a$ and $b$. Therefore it contains a smallest element $d$. Prove that $d = \gcd(a, b)$
I have to solve the question above, but I'm not sure how to do it. I think it has to do with Bézout’s theorem, but I have have no idea how to apply it in this particular question. Any help?