I'm trying to solve this problem:
A residue class ring mod $n$ is a field if n is prime. Let $\mathbb{Z}_p$ be a residue ring, p prime. Let $a \in \mathbb{Z}_p$.
What are all solutions $x \in \mathbb{Z}_p$ to the following equation?
$$\widetilde{x^2} = \widetilde{a²}$$
Here's what I've tried so far (note: $a^{\#}$ is the inverse of a, n is identity element):
$\widetilde{x^2} = \widetilde{a²}$
$\iff \widetilde{x^2} \cdot (\widetilde{a^{\#}})^2 = \widetilde{a²} \cdot (\widetilde{a^{\#}})^2$
$\iff \widetilde{x^2} \cdot (\widetilde{a^{\#}})^2 = \widetilde{a} \cdot \widetilde{a} \cdot \widetilde{a^{\#}} \cdot \widetilde{a^{\#}}$
$\iff \widetilde{x} \cdot \widetilde{x} \cdot \widetilde{a^{\#}} \cdot \widetilde{a^{\#}} = \widetilde{a} \cdot n \cdot \widetilde{a^{\#}}$
$\iff \widetilde{(xxa^{\#}a^{\#})} = \widetilde{a \cdot a^{\#}}$
$\iff \widetilde{(xxa^{\#}a^{\#})} = \widetilde{1}$
$\iff \widetilde{x \cdot a^{\#}} \widetilde{x\cdot a^{\#}} = \widetilde{1}$
$\iff (\widetilde{x \cdot a^{\#} })^{2} = \widetilde{1}$
This is where I'm stuck. Can anyone help me solve this?
Edit: For all of those unfamiliar with the tilde notation: It indicates the residue class of whatever is below. Another way of stating the problem would (I think) be: Solve for x in the following equation:
$$x^2 mod \space n = a^2 mod \space n$$
Let $K$ be a field. Let $a \in K$. Consider the equation $x^2 = a^2$. Since $x^2 - a^2 = (x - a)(x + a) = 0, x = \pm a$.