Euclidean Domain/Euclidean Algorithm/Examples/5 i and 3 + i in Gaussian Integers

Examples of Use of Euclidean Algorithm in Euclidean Domain
The GCD of $5 i$ and $3 + 1$ in the ring of Gaussian integers is found to be:


 * $\gcd \set {5 i, 3 + 1} = 1 + 2 i$

and its associates $-1 - 2 i$, $-2 + i$ and $2 - i$.

Proof
Let $x = 5 i$ and $y = 3 + i$.

We need to find $q$ and $r$ such that:
 * $x = y q + r$

with:
 * $\map \nu r < \map \nu y$

where $\map \nu x := \cmod x^2$

Thus we calculate:

$q$ is to be set to one of the Gaussian integers nearest to it.

Thus let $q = i$.

Hence:

Then:

Thus a GCD of $5 i$ and $3 + i$ is $1 + 2 i$.

From Elements of Euclidean Domain have Greatest Common Divisor, its associates are also GCDs of $5 i$ and $3 + i$.

Hence the result.