Find the number of non-zero squares in the field $Zp$
Find the number of non-zero elements in the field $Z_p$, where $p$ is an odd prime number, which are squares, i.e. of the form $m^2$; $m \in Z_p$; $m \neq 0$.
please help how can i solve this problem? the number of nonzero element is $p-1$ here
Solution 1:
Let $G$ be the set of non-zero elements of $\mathbb{Z}_p$. $G$ is a commutative group of order $p-1$. Let $f\colon G \rightarrow G^2$ be the map such that $f(m) = m^2$. $f$ is a surjective homomorphism. Hence $G^2$ is isomorphic to $G/\ker(f)$. Since $\ker(f) = \{1, -1\}$ and $p$ is odd, $|ker(f)| = 2$. Hence $|G^2| = (p-1)/2$.
Solution 2:
Hint $\ $ The nonzero elements of $\rm\,\Bbb Z_p\,$ form a cylic group $\rm\:G\:$ of order $\rm\,p-1 = 2n.\:$ Written additively, $\rm\:G\,\cong\, \Bbb Z_{2n},\:$ where squares $\rm\,x^2\in G\,$ become doubles $\rm\:2\,\hat x\,\in Z_{2n}.\:$ Hence the question reduces to counting the number of even classes in $\rm\,\Bbb Z_{2n},\:$ which is clearly $\rm\:n,\:$ viz. $\rm\,0,2,4,\ldots,2n.$