# Greatest common divisor of $2 + 3i$ and $1-i$ in $\mathbb{Z}[i]$

Greatest common divisor of $2 + 3i$ and $1-i$ in $\mathbb{Z}[i]$

Here is my attempt at solving this using a generalized Euclid's Algorithm. Does it look alright?

Step 1

$2 + 3i = M(1-i) + N$

$$\frac{2 + 3i}{1-i} = \frac{2 + 3i}{1-i}\frac{1 + i}{1 + i}$$

$$= \frac{-1 + 5i}{2} = -\frac{1}{2} + \frac{5i}{2}$$

Now, this point in the complex plane is equidistant from the nearest four $a + bi \in \mathbb{Z}[i]$, so we can pick any of them to be $M$, I will pick $2i$ for the sake of simplcitiy.

$N = 2 + 3i - M(1 - i) = 2 + 3i - (2i)(1 - i) = 2 + i - 2 = i$

So at the conclusion of step 1 we have $$2 + 3i = 2i(1-i) + i$$

Step 2

$1 - i = M(i) + N$

$\implies M=-1$ and $N = 1$

So at the conclusion of step 1 we have $$1 - i = (-1)(i) + 1$$

Step 3

$i = i(1) + 0$

A remainder of $0$ means we conclude the algorithm. The last non-vanishing remainder was $1$, so that means the GCD of $2 + 3i$ and $1-i$ is $1$?

• Yes, this is exactly right and it is how I would do it. Nov 26 '13 at 16:06

I would solve this be looking at the modulus square of each number and taking the common divisor of that. in this case $|2+3i|^2 = 4+9=13$ and $|1-i|^2=1+1=2$ the modulus square of any common divisor must therefore divide 2 and 13 so it must be 1. Therefore the only common divisors are i,-1,i,-i

• Agreed - but I would use the term "norm" instead of "modulus square". (+1) Nov 26 '13 at 16:27
• In fact, you have shown that $2+3i$ and $1-i$ are both irreducible elements of $\mathbb{Z}[i]$ Nov 26 '13 at 16:53
• So, in general when specifying the GCD of a pair of gaussian integers should I also metntion the associates of whatever GCD I find from Euclid's Algorithm? Are they equally as valid?
– csss
Nov 26 '13 at 22:07
• Both methods are valid but it would be interesting to spell out both methods for the general case and then consider which works best. My method looks like it has less computation initially because dividing integers is easier than dividing Gaussian integers, but at the end I have an integer and need to find the complex solution from it. Nov 27 '13 at 9:10
• in this answer with $$u=\frac{1 + \sqrt{3}i}{2}$$ there are two pairs considered; $A=6+5u, \ B=5+3u$ and $A=5+6u, \ B=5+3u$. The application of Euclid's Algorithm there shows the first pair shares a common divisor (though I don't yet know what it is) but the second pair does not, yet both have the same modulus squares of 91 and 49 which are divisible by 7. Am I wrong to try to apply this answer to that problem?
– uhoh
Dec 1 '20 at 8:45

Converting to an answer: Yes, this is exactly right and it is how I would do it.