"up to associates" in the Euclidean domain We know that the Euclidean Domain has the property of Unique Factorization.
More precisely, every nonzero element in a Euclidean ring $R$ can be uniquely written (up to associates) as a product of prime elements or is a unit in $R$.
The word "up to associates" confusing me a bit. 
P.S. Let's consider the example in the euclidean domain $\mathbb{Z}[i]$ and consider the following prime factorizations such as: $$(2+i)(1+i) \quad\text{and} \quad (-1+2i)(1-i)$$
Note that $2+i\sim -1+2i$ and $1+i\sim 1-i$.
Can anyone explain me the meaning of the phrase "up to associates" in the above example, please?
 A: This means the prime factors are determined only up to a unit factor. Indeed in the Gaussian integers, the group of units is $\;\{1,-1,i,-i\}$ and indeed
$$2+i=(-i)(-1+2i),\qquad 1+i=i(1-i).$$
We have the same situation in $\mathbf Z$, where $\mathbf Z^\times=\{1,-1\}$, and, for instance
$$6=2\cdot 3=(-2)\cdot(-3)$$
A: Uniqueness of factorization up to associates means that if $r\in R$, nonzero and not a unit, is written as
$$
r = p_1p_2\dots p_m = q_1q_2\dots q_n
$$
with $p_i$ and $q_j$ irreducible, then


*

*$m=n$

*there exists a permutation $\sigma$ of $\{1,2,\dots,m\}$ such that, for $i=1,2,\dots,m$, $p_i$ is associate to $q_{\sigma(i)}$.


Two elements $a$ and $b$ are associate if there is a unit $u$ with $b=ua$.
This happens also in the integers: for instance, $6=2\cdot3=(-3)(-2)$.
In your case, $2+i$ is associate to $-1+2i$ and $1+i$ is associate to $1-i$.
A: In the ordinary integers the factorizations
$$
6 = 2\times 3 = (-2) \times (-3)
$$
are equivalent up to associates because $2$ and $-2$ are associates because
$$
-2 = (-1) \times 2
$$
and $(-1)$ is a unit - it has a multiplicative inverse.
In the Gaussian integers $2+i$ and $-1 + 2i$ are associates because
$$
-1 + 2i = i \times (2 +i)
$$
and $(-i)$ is a unit because it has a multiplicative inverse, namely $i$.
In the integers you don't usually have to fuss with "up to associates" since there is a natural way to specify that primes should be positive. In the Gaussian integers there is no good way to distinguish among the associates
$$
2+i, -2 -i, -1 + 2i, 1 - 2i \ .
$$
