Quadratic Residue Calculator
Work out quadratic residue instantly with clear inputs, formula shown and shareable results.
About Quadratic Residue Calculator
A quadratic residue modulo m is a value congruent to some perfect square. Unlike ordinary square roots, a modular square root may have zero, one, two or more solutions depending on the factorisation of m.
Formula
Quadratic residue
a is a residue mod m if x² ≡ a (mod m) has a solution
Worked example
With the default values below, Quadratic Residue Calculator returns Result of 9 is a quadratic residue mod 23. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Value a
- 9
- Modulus mminimum 2
- 23
Results
- Result
- 9 is a quadratic residue mod 23
- Modular square roots
- 3, 20
- How many roots
- 2
- Distinct quadratic residues mod m
- 12
Step by step
- 1Values used
- 2Quadratic residue
- 3Result= 9 is a quadratic residue mod 23
- 4Modular square roots= 3, 20
- 5How many roots= 2
- 6Distinct quadratic residues mod m= 12
Assumptions and limits
- The result is derived only from the 2 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to whole numbers, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
Is 9 a residue mod 23?
Yes, with roots 3 and 20, since 20 ≡ −3 and (−3)² = 9.
Why can there be more than two roots?
For composite moduli the Chinese remainder theorem multiplies the root counts of each prime power factor.
Related Calculators
You might also need
- Discrete Logarithm CalculatorAlso in Discrete Math, Logic & Number Theory
- Adjacency Matrix CalculatorAlso in Discrete Math, Logic & Number Theory
- Base 64 Value CalculatorAlso in Discrete Math, Logic & Number Theory
- Bell Number CalculatorAlso in Discrete Math, Logic & Number Theory
- Binary To Decimal CalculatorAlso in Discrete Math, Logic & Number Theory
- Binary To Hexadecimal CalculatorAlso in Discrete Math, Logic & Number Theory
