TITLE: Division with Gaussian integers
QUESTION [6 upvotes]: If we are given $A = 7 - 3i, B = 4 + 3i$ and suppose we need to find Gaussian integers $Q, R$ such that $A = QB + R$ with $N(R) < N(B)$ and $N(a + bi) = a^2 + b^2$.
OK, so I did the division normally the same way as we do in complex numbers and got $\frac{A}{B} = \frac{19}{25} - \frac{33}{25}i$ now I rounded up the $\frac{19}{25}$ to 1 and I also rounded up $\frac{-33}{25}i$ to $-i$ and so $Q = 1 - i$ and then I got $R = -2i$ which indeed is a Gaussian integer and $N(R) < N(B)$ is satisfied.
However those are not unique $(Q, R)$; my question is how many different $Q, R$ can we get? I assume it is 4, because we can round (up, up), (down, down), (up, down), (down, up). Is that true?

REPLY [5 votes]: You can have up to 4 $Q$, and hence 4 $(Q,R)$. The Gaussian integers constitute a lattice and  $Q$ is one of the 4 four points of the lattice nearest to $\frac A B$ (which belongs to the square whose vertices are these 4 points). Moreover the condition $N(R)<N(B)$ translates to $N(A/B-Q)<1$.
In the present case, the solution $Q=2i$ doesn't satisfy $N(A/B-Q)<1$. So you have only 3 possibilities:

$Q=-i,\enspace R=4+i$,
$Q=1-i,\enspace  R=-2i$,
$Q=2-i, \enspace R=-3+3i$.