I'm having a mind blank on the definition of a UFD. Obviously I've gone horrendously wrong somewhere in my reasoning. My question is: how can we possibly have an irreducible element in a UFD?
Say $r \in R$ is irreducible, with $R$ a UFD. Then by the definition of a UFD, $r \neq 0$ can be expressed as the product of irreducible elements up to order and units, let's say two.
Then $r=xy$ where $x$ and $y$ are irreducible. But then if $r$ is irreducible, by the definition of irreducibility, either $x$ or $y$ must be a unit. Let's say it's $x$. But then how can $x$ be irreducible if it is a unit?
EDIT: I was totally forgetting that a product can mean just one piece, i.e. the "product" in this case is $x$.