In mathematics, a unique factorization domain (UFD) is an integral domain (a non-zero commutative ring in which the product of non-zero elements is non-zero) in which every non-zero non-unit element can be written as a product of prime elements (or irreducible elements), uniquely up to order and units, analogous to the fundamental theorem of arithmetic for the integers. UFDs are sometimes called factorial rings, following the terminology of Bourbaki. In mathematics, a unique factorization domain (UFD) is an integral domain (a non-zero commutative ring in which the product of non-zero elements is non-zero) in which every non-zero non-unit element can be written as a product of prime elements (or irreducible elements), uniquely up to order and units, analogous to the fundamental theorem of arithmetic for the integers. UFDs are sometimes called factorial rings, following the terminology of Bourbaki. Unique factorization domains appear in the following chain of class inclusions: Formally, a unique factorization domain is defined to be an integral domain R in which every non-zero element x of R can be written as a product (an empty product if x is a unit) of irreducible elements pi of R and a unit u: and this representation is unique in the following sense:If q1, ..., qm are irreducible elements of R and w is a unit such that then m = n, and there exists a bijective map φ : {1, ..., n} → {1, ..., m} such that pi is associated to qφ(i) for i ∈ {1, ..., n}.