Ring Structure: Definition Let $R = \{a+bi\mid a,b \in \mathbb Z, i^2=-1\}$, with addition and multiplication defined by 
$(a+bi)+(c+di)=(a+c)+(b+d)i$ and $(a+bi)(c+di)=(ac-bd)+(bc+ad)i$, respectively.
(a) Verify that $R$ is an integral domain.
(b) Determine all units in $R$.
Let $R$ be a commutative ring with unity. Then $R$ is an integral domain if $R$ has no proper divisors of zero.
From this definition, I know that I must verify that $R$ has no proper divisors of zero, a nonzero element whose product is the zero element of the ring. But I first had a concern that how can this be a ring when $R$ has elements of complex numbers while $a$ and $b$ are elements of integers. Could it not be closed, and therefore not a ring at all? I may be confusing things. Also, it was defined where $a$ and $b$ belong to, but where did $c$ and $d$ come from?
I need help solving part (a).. 
For (b), the solution says $1,-1,i,-i$ but I don't know why.
Thanks.
 A: a) Clearly this is an integral domain, it's a subring of the field, $\mathbb{C}$ (checking this is direct, but should be done)
Edit:  An alternative means if you're using
$$R =\mathbb{Z}[x]/(x^2+1)$$
In this case you can see that $R$ is a ring immediately as it is defined as a quotient ring. To see it is an integral domain I would recommend appealing to the fact that $x^2+1$ is irreducible, so by lifting $a+b\bar{x}$ and $c+d\bar{x}$ to $\mathbb{Z}[x]$ to any $f(x), g(x)$ then if $a+b\bar{x}\ne 0$ we have that $f(x)=(x^2+1)q_f(x)+r_f(x)$ and $g(x)=(x^2+1)q_g(x)+r_g(x)$ with a non-zero remainder by assumption. But then by irreducibility (no roots) we end up with a non-zero remainder for the product, hence a non-zero residue product, proving you have an integral domain.
b) It is possible to show that $R$ is actually a Euclidean domain with the norming function $N(a+bi)=a^2+b^2$. From there it is straightforward to show that $N$ is multiplicative since $N(a+bi)=|a+bi|^2$ and the usual absolute value and squaring functions are multiplicative. Then if your element, $u$, is a unit, it must have an inverse, $x$, so $N(xu)=N(x)N(u)=\pm 1$ since $\pm 1$ are the only invertible integers. So $a^2+b^2=\pm 1$ if you have a unit. From there it follows from the definition of the ring that either $a=\pm 1$ or $b=\pm 1$, hence the result.
A: The things you're trying to find are equations: you can solve the problem by simply solving the equations.
To be an integral domain, for example, means that the only solution to
$$ (a+bi)(c+di) = 0 +0i$$
is $a=b=c=d=0$. What do you get if you try to solve this?
Note in particular that if $u+vi = x+yi$, then $u=x$ and $v=y$.
