Prove that the following is a Field Let $p$ be a prime Let $n$ be an element in $Z_{p}^*$ where $n\not=\pm1$. Define a ring structure on $F = Z_p  \times Z_p$. We define the addition by 
$$
(a_1,b_1) + (a_2,b_2) = (a_1 + a_2, b_1 + b_2).
$$ 
And define multiplication by:
$$
(a_1,b_1) * (a_2,b_2) = (a_1 a_2 + b_1 b_2 n, a_1 b_2 + a_2 b_1).
$$ 
Prove that $F$ is a field. 
Okay, so our goal is to show that that both $<R,+>$ is an abelian group as well as $<R,*>$ is an abelian group with identity element not equal to 0. We also want the distributive laws to hold.
$Z_n\times Z_n$ is a cyclic group and is abelian under addition. So that is obvious. And the way the addition is done, our addition fulfills all requirements of a ring. I have on paper also proved communitivity for our multiplication and the distributive property holding. 
What I have trouble with proving the inverse element existing for multiplication and it being unique. I know that unity is (1,0) and the additive identity is (0,0). 
 A: The map $(a,b) \mapsto \overline{a+bX}$ gives an isomorphism of $F$ with $(\mathbb{Z}/p) [X] / (X^2 - n)$.
If $n$ is not a square modulo $p$, then this is a field of order $p^2$ because $X^2-n$ is irreducible.
But if $n$ is a square modulo $p$, then there are zero divisors: if $k^2 \equiv n\pmod{p}$, then $(k,1)\ast(-k,1) = (0,0)$, so $F$ is not a field.

One elementary way to see that $F$ is a field (and, more generally, which elements have inverses):
By symmetry, $(a,b)$ is invertible if and only if $(a,-b)$ is invertible.  But $(a,b)\ast (a,-b) = (a^2 - b^2 n,0)$, which is invertible if and only if $a^2 - b^2 n$ is invertible in $\mathbb{Z}/p$.
A: Regarding the multiplicative inverse:
$$
(1,0) = (a_1, b_1) * (a_2, b_2) =
\left(
\begin{matrix}
a_1 & b_1 n \\
b_1 & a_1
\end{matrix}
\right)
\left(
\begin{matrix}
a_2 \\
b_2
\end{matrix}
\right)
=
\left(
\begin{matrix}
1 \\
0
\end{matrix}
\right)
\iff \\
\left(
\begin{matrix}
a_2 \\
b_2
\end{matrix}
\right)
=
\left(
\begin{matrix}
a_1 & b_1 n \\
b_1 & a_1
\end{matrix}
\right)^{-1}
\left(
\begin{matrix}
1 \\
0
\end{matrix}
\right)
= 
\frac{1}{a_1^2 - b_1^2 n}
\left(
\begin{matrix}
a_1 & -b_1 n \\
-b_1 & a_1
\end{matrix}
\right)
\left(
\begin{matrix}
1 \\
0
\end{matrix}
\right)
=
\frac{1}{a_1^2 - b_1^2 n}
\left(
\begin{matrix}
a_1 \\
-b_1
\end{matrix}
\right)
$$
This gives
$$
(a_1, b_1)^{-1} = \left(\frac{a_1}{a_1^2 -b_1^2 n}, -\frac{b_1}{a_1^2 -b_1^2 n} \right)
$$
for $a_1^2 \ne b_1^2 n$.
So depending on the choice of $n$ and $p$ there might be elements of $F = \mathbb{Z}_p \times\mathbb{Z}_p$ that get no inverse this way.
If $n < 0$ then $a_1^2 - b_1^2 n = a_1^2 + b_1^2 (-n)$ only vanishes for $(a_1,b_1)=(0,0)$, which will not need one.
If $n > 0$ then $a_1^2 = b_1^2 n \iff a_1 = \pm b_1 \sqrt{n}$.
So for non-integer $\sqrt{n}$ everything ist fine.
