Why is every irreducible element in UFD a prime element?

x is irreducible means if x =ab, then either a or b is unit.

x is prime means if x =ab, x|a or x|b.

Now, let x be irreducible, let x=ab, WLOG let a be a unit.

Since x is in UFD, let $\displaystyle x= u_{1} \cdot \cdot \cdot u_{r} $ where each u is irreducible.