# Thread:

1. ## quadratic nonresidues and residues

How can I show that the number of quadratic residues modulo m is equal to the number of quadratic nonresidues modulo m in the set of reduced residue system modulo m?

2. Note that $1^2\equiv (p-1)^2(\bmod.p)$, $2^2\equiv (p-2)^2(\bmod.p)$, ...
So that the only distinct quadratic residues are: $1^2(\bmod.p)...\left(\tfrac{p-1}{2}\right)^2(\bmod.p)$, but we have $p-1=|\mathbb{Z}_p^{\times}|$ hence the rest of them must be non-quadratic residues, that is we have $\tfrac{p-1}{2}$ quadratic residues and $\tfrac{p-1}{2}$ non-quadratic residues.

EDIT: Thought I'd clarify a bit: $x^2\equiv{y^2}(\bmod.p)$ if and only if $(x-y)\cdot (x+y)\equiv{0}(\bmod.p)$ since p is prime either $x \equiv{y}(\bmod.p)$ or $x \equiv{p-y}(\bmod.p)$
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 10, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.8423141241073608, "perplexity_flag": "head"}