Quadratic Residue definition
A quadratic residue modulo n is a residue class that can be obtained by squaring an integer modulo n.
Quadratic Residue in a picture
How it works
To test whether a is a square residue, ask if x² ≡ a (mod n) has an integer solution. Under the convention that includes zero, 0 is a square residue because 0² = 0. In treatments restricted to nonzero classes modulo a prime, 0 is listed separately.
Worked examples
Is 2 a square residue modulo 5?
No. The only square remainders are 0, 1, and 4.
Show that 4 is a square residue modulo 7.
Use 2² = 4, so x = 2 is a solution.
List all square remainders modulo 4.
They are 0 and 1, because even squares leave 0 and odd squares leave 1.
Common mistake
Square the input first, then reduce modulo n. A number that is not an ordinary integer square can still be congruent to a square.
Quick check
Must an integer itself be a square to represent a square residue?
Show answer
No. It only needs to have the same remainder as a square.
What equation expresses the test?
Show answer
x² ≡ a (mod n) for some integer x.
Sources
Flashcard
Quadratic Residue
Reveal the definition
A quadratic residue modulo n is a residue class that can be obtained by squaring an integer modulo n.
Effortless Math. “Quadratic Residue.” Math Dictionary.



