# Why are irreducible elements prime in Euclidean domain?

I am trying to understand some notes from my algebra course, one of which says (it's basically a proof of that all irreducibles are prime in Euclidean domain) :

......Suppose $x = ab$ and $x$ does not divide $a$. Let $d$ be a highest common factor for $x$ and $a$. Then $d$ is not $xu$ for any unit $u$. But x is irreducible, and so d is a unit. So, in fact, $1$-element is a highest common factor for x and a. By Bézout's Lemma, $\exists s, t \in \mathbf{R}$ with $xs + at = 1$ ......

I am confused with the bolded step and you can take it for granted that I understand other sentences in this proof. Why does 'x is irreducible' imply 'd is a unit'? I know that it would be necessary to find an appropriate inverse for d in order to identify it as a unit. But I can hardly find any conditions here to convince me.

I've read other answers for this proof but I think it would be constructive if I also knew this method. Many thanks if any expert can help me.

• If $d$ is not a unit, then $x=dq$ with $N(d)<N(x)$ and $N(q)<N(x)$ forcing $x$ to be reducible. – David Hill Apr 12 '18 at 17:30

$x$ is irreducible means: If $x=de$ then one of $d,e$ is a unit. So if $d$ were not a unit, $e$ would be, makeing $a$, which is a multiple of $d$, also a multiple of $de^{-1}=x$, contrary to assumption.
By definition of $d$, $d|x$, so $dr=x$ for some $r$. By definition of an irreducible, either $d$ or $r$ is a unit. But the line previous to that prevents $r$ from being a unit. Therefore $d$ is a unit.