In a ring: If every non-zero and non-unit element factors into prime elements, is factorization over irreducible elements unique? Why (not)?
I came up with this question while trying to understand the definition of a UFD.
 A: I figured based on the above answer of jgon, I would talk a bit about what happens if $R$ is not a domain.  Maybe something more of an extended comment?
If $R$ has zero-divisors, then there are a lot of definitions of what irreducible means.  The standard one to take is that $a$ a non-unit is irreducible if $a=bc$ implies $(a)=(b)$ or $(a)=(c)$.  As you can see it is pretty clear that prime still implies irreducible.  If $p$ is prime and $p=bc$, then $p\mid b$ or $p\mid c$.  Without loss of generality suppose $p\mid b$, but we also know $b\mid p$ since $p=bc$.  Thus $(p)=(b)$ and $p$ is irreducible.  Clearly, the converse does not hold in general (since it doesn't even in domains see $\mathbb{Z}[\sqrt{-5}]$ for instance.)  
Another note, we don't really need to distinguish zero since $0$ is prime if and only if $0$ is irreducible if and only if $(0)$ is a prime ideal if and only if $R$ is an integral domain.  So in a domain, $0$ always is able to be factored into irreducibles or primes, itself.
It is interesting to see that prime is not actually strong enough to prove some of the stronger definitions of irreducible.  For instance, $a$, a non-unit, is strongly irreducible if $a=bc$ implies that $a=\lambda b$ or $a=\lambda c$ for some unit $\lambda \in U(R)$.  There are even stronger ones (1) m-irreducible is if $(a)$ is maximal among principal ideals and very strongly irreducible stronger still.  
I wrote a bit more about it over here if you are interested: https://mathoverflow.net/questions/101989/divisibility-and-factorization-in-rings-that-are-not-integral-domains/104795#104795
Also, here is a very nice paper which discusses more of these kinds of factorization questions for rings with zero-divisors: http://projecteuclid.org/download/pdf_1/euclid.rmjm/1181072068
A: I will assume we are working with a unital ring.
Now certainly if this is a commutative domain, then the ring is a UFD, since for a domain to be a UFD, it is enough to show that all the irreducibles are prime, and that every element factors into irreducibles. Many algebra books show this, see e.g. Artin. (Condition 5 here, or page 15 here for a proof).
This is immediate, given this condition, since an irreducible must factor into a product of prime elements, but then if $p$ is irreducible, $p=u\prod_i q_i$, where the $q_i$ are prime and hence nonunits, and $u$ is a unit. but then the product can only have one term by the definition of irreducible, so $p=uq_1$ is prime. Additionally since primes are always irreducible, every element of the ring except 0 factors into a product of irreducibles.
To be honest, I'm not sure how to approach the nondomain case, so I'll leave that for either future me or someone else to address.
For noncommutative rings, I don't know much as that is rather obscure, but see this question here.
