Quadratic Congruence
There is a general question whether an integer a has a square root (modn) and if so, how many are there and how one can find them.
We know that the solution of the quadratic equation can be found by
x=−b±√b2−4ac2a
If we want to apply this to the case where a,b,c∈Zn, then 2a to be unit in (modn), so that we can divide by 2a.
We can write the equation in the form
If we can find all the square roots s of b2−4ac in Zn, we can then find all the solutions x∈Zn of the quadratic equation of the form 2ax+b=s, or equivalently x=(s−b)/2a.
If we look at the square roots at Z15, then 1 and 4 have four square roots each(±1,±4 and ±2,±7 respectively, while the other units have none.
Example:
Find all the solutions of x2−3x+2≡0(mod15)
given a=1,b=−3 and c=2, we have:
b2−4ac=(−3)2−4(1)(2)=9−8=1
So, b2−4ac=1.
Now, we need to find the square roots of 1 modulo 15. The solutions to x2≡1(mod15) are x≡±1(mod15).
Using the quadratic formula:
For x1:
x1=(−(−3)+√1)/2=(3+1)/2=2
For
x2:
x2=(−(−3)−√1)/2=(3−1)/2=1
So, the solutions modulo 15 are
x≡1(mod15)and
x≡2(mod15)Example:Solve the quadratic congruence 3x2−4x+7≡0(mod13)
Lets apply (2ax+b)2=b2−4ac
(6x−4)2≡10(mod13)
let y=6x−4.then y2≡10(mod13). This congruence has exactly two solutions y≡6,7(mod13)
Therefore the solutions of the congruence are given by those of linear congruences 6x−4≡6(mod13) and 6x−4≡7(mod13) namely x≡6,4(mod13)
Note that the quadratic congruence in this example has exactly two solutions.But the next example shows that not every quadratic congruence has a solution.
Example: Solve 3x2+7x+5≡0(mod13).This congruence yields (6x+7)2≡2(mod13).But square of none of the least residues modulo 13 yields 2.So this is not solvable.
Now the question arise when the congruence x2≡a(modp) is solvable? when solvable how many solutions does it have.
if p|a then x2≡0(modp), so x≡0(modp) is the only solution. Now assume p∤a. The congruence has exactly two solutions.
lemma: Let p be an odd prime and a an integer such that p∤a. Then the congruence x2≡a(modp) has either no solutions or exactly two incongruent solutions.
Quadratic Residue and The Group of Quadratic Residue
An element a∈Un is a quadratic residue (modn) if a=s2 for some s∈Un.The set of such quadratic residues is denoted by Qn.For small n one can determine Qn by squaring all elements s∈Un
Example:
Consider the positive integers less than 10. We'll calculate their squares modulo 10 to identify quadratic residues.
02=0(mod10)-0 is a quadratic residue modulo 10.
12≡1(mod10)- 1 is a quadratic residue
22≡4(mod10) - 4 is a quadratic residue.
32≡9(mod10) - 9 is a quadratic residue.
42≡6(mod10) - 6 is a quadratic residue.
52≡5(mod10) - 5 is a quadratic residue.
62≡6(mod10) - 6 is a quadratic residue.
72≡9(mod10) - 9 is a quadratic residue.
82≡4(mod10)- 4 is a quadratic residue.
92≡1(mod10) - 1 is a quadratic residue.
So, the quadratic residues modulo 10 are 1, 4, 5, 6, and 9.If we consider units Q10={1,9}⊂U10
Q7={1,2,4}⊂U7
Q8={1}⊂U8
Python Code
list all quadratic residues
from sympy.ntheory import quadratic_residues
print(quadratic_residues(10))
[0,1,4,5,6,9]
check whether an element is a quadratic residue
from sympy.ntheory import is_quad_residue
print(is_quad_residue(4,10))
True
print(is_quad_residue(7,10))
False
Example:Find the quadratic residue and nonresidues of p=13
12≡1≡122(mod13)22≡4≡112(mod13)
32≡9≡102(mod13)42≡3≡92(mod13)
52≡12≡82(mod13)62≡10≡72(mod13)
Accordingly 13 has exactly six quadratic residues namely 1,3,4,9,10 and 12, and it has six quadratic non residues also, namely 2,5,6,7,8 and 11.
This example provides us with two interesting bonuses
- The prime 13 has the same number of quadratic residues and non residues(6 each)
- They form the partitioning of the set of positive residues of 13.
Theorem: every odd prime p has exactly (p−1)/2 quadratic residues and (p−1)/2 quadratic non residues.
We can determine how many square roots an element a∈Qn can have
Note : Qn is a subgroup of Un
Lemma: Let n>2 and suppose that there is a primitive root g(modn), then Qn is a cyclic group of order ϕ(n)/2, generated by g2 consisting of the even powers of g.
Example: If n=7 then we can take g=3 as primitive root. The powers of g in U7 are g=3,g2=2,g3=6,g4=4,g5=5 and g6=1; of these the quadratic residues a=1,2 and 4 corresponds to the even powers of g. Thus Q7 is the cyclic group of order 3 generated by g2=2
Legendre Symbol ( Adrein-marie Legendre 1978)
The Legendre symbol is a mathematical concept used in number theory to determine whether a given integer is a quadratic residue modulo a prime number. It is denoted as (ap), where a is an integer and p is an odd prime number.
The Legendre symbol is defined as follows:
This shows that
x2≡a(modp) is solvable if and only if
(ap=1)
Python Code
from sympy.ntheory import legendre_symbol
ls=[legendre_symbol(i, 7) for i in range(7)]
print(ls)
[0, 1, 1, -1, 1, -1, -1]
The following theorem shows three fundamental properties of the symbol
Theorem: Let p be an odd prime and a and b be any integers with p∤ab. Then
- if a≡b(modp) then (ap)=(bp)
- (abp)=(ap)(bp)
- (a2p)=1
Corollary:If p is an odd prime and g is a primitive root (modp) then
\mlegendre{x}{y}
Reference: https://www.physicsforums.com/threads/latex-frustration-defining-commands-with-arguments.277730/
(xy)
Reference: https://www.physicsforums.com/threads/latex-frustration-defining-commands-with-arguments.277730/
Note: when i is even gi generates a quadratic residue.
Corollary: If p be an odd prime, q a prime such that p∤q, and i is a positive integer. Then (qip)=(qp)i
Example:Using the fact that (517)=−1, compute (12517)
(12517)=(5317)
Multiplicativity
if p is an odd prime, then
for all integers a and b.
Example:
The set Q13={1,3,4,9,10,12}.So (613)=−1. This can be verified (213)(313)=−1×1=−1
For all integers a1,a2,…,ak we have
(a1,…,akp)=(a1p)⋯(akp)
Example: Using the fact that (223)=1 and (523)=−1 , compute (500023)
Notice that 5000=23.54. So
(500023)=(223)3(523)4
(500023)=(1)3.(−1)4=1
So 5000 is a quadratic residue in (mod23)
Theorem:Euler's Criterion
Let p be an odd prime. then a positive integer a with p∤a is a quadratic residue of p if and only if a(p−1)/2≡1(modp)
if p is an odd prime, then for all integers a we have
a(p−1)/2=(ap)
Example:
Consider a=5 and p=13. We want to determine whether 5 is a quadratic residue modulo 13, that is, we want to find (513)
According to Euler's criteria
56=52.52.52=−1.−1.−1=−1(mod13). So 5 is not a quadratic residue in Z13
Example:
Determine if 10 and 7 are quadratic residues of 13.
notice that 10(13−1)/2=106≡(−3)6≡1(mod13). So by Euler's criterion 10 is a quadratic residue of 13.
7(13−1)/2≡76≡(73)2≡562≡−1(mod13). Since 76≢1(mod13), by Euler's criterion 7 is a quadratic non residue of 13.
Note:If p is an odd prime. Then a positive integer a, where p∤a is a quadratic nonresidue if and only if a(p−1)/2≡−1(modp)
corollary: If p is an odd prime. Then −1∈Qp if and only if p≡1(mod4)
Proof: if we take a=−1 in Euler's criteria
So −1∈Qp only if (p−1)/2 is even that is p≡1(mod4)
Example:
We have −1=22(mod5) and −1=52(mod13) .But -1 is not a quadratic residue in Z7 or Z3.
Example:
Let
p=17 , then −1≡42. So (−117)=1.This shows that
(a17)=(−a17) for all a∈U17. That is a∈Q17 if and only if −a∈Q17. For instance 13∈Q17
since −13≡22∈Q17
This can be used to evaluate the Legendre Equations
Example: evaluate (−441)
(−441)=(441)(−141)
(−441)=1.1=1
So -4 is a quadratic residue in (mod41)
Note:There are infinitely many primes of the form 4n+1
Gauss' Lemma
Let
p be an odd prime.We can partition the set
Up into two sets
P={1,2,…,(p−1)/2}⊂UpandN={−1,−2,…,−(p−1)/2}⊂Up
represented as shown by positive and negative integers.For each a∈Up, we define
Gauss Lemma says that
If p is an odd prime and a∈Up, then (ap)=(−1)μ, where μ=|aP∩N|
Example:
Let p=19.So P={1,2,3,4,5,6,7,8,9}.If we multiply each element of P by 11 and represent it by an element of P∪N, we get
aP=11P={−8,3,−5,6,−2,9,1,−7,4}
This contains four elements of N, (terms with minus sign).So μ=4, which is even.Thus 119=1, So 11∈Q19. In fact 11≡72(mod19)
Example:
Evaluate (1013) using Gauss lemma
Here P={1,2,3,4,5,6} and N={−1,−2,−3,−4,−5,−6}
10P={−3,−6,4,1,−2,−5}
here μ=4
So (1013)=(−1)4=1
Example:
Evaluate (213) using Gauss lemma
Here P={1,2,3,4,5,6} and N={−1,−2,−3,−4,−5,−6}
2P={2,4,6,−5,−3,−1}
here μ=3
So (213)=(−1)3=−1
Corollary:
If p is an odd prime. Then
thus 2∈Qp if and only if p≡±1(mod8)
2∉Qp if and only if p≡±3(mod8)
Example:
2 is a quadratic residue (modp) for p=7,17,23,31,… with square roots ±3,±6,±5,±8,…,however, 2 is not a quadratic residue (modp) for p=3,5,11,13,…
Example: solve (1331)
(1331)=(−1831)
=(931).(231).(−131)
Note:31≡−1(mod8) and also 31≡−1(mod4)
=1.1.−1=−1
So 13∉Q31
Quadratic Reciprocity
To determine whether or not an integer a is a quadratic residue (modp),we need to evaluate (ap).For the prime factorization of a, we can evaluate (qp) for the q′s dividing a.The following table shows the evaluation of (qp) for small values of p and q.
Theorem:
If p and q are distinct odd primes, then
except when p≡q≡3(mod4) , in which case
Note:An equivalent form of this is the elegant result by Legendre is that
(qp).(pq)=(−1)(p−1)(q−1)/4
for all distinct odd primes p and q. This is the generalized Law of Quadratic Reciprocity.
Proof: if p≡1(mod4) then (p−1)/2 is even, so (p−1)(q−1)/4 is even. Therefore by the law of quadratic reciprocity (p/q)(q/p)=1.But (p/q)±1=(q/p), so (q/p)=(p/q).
On the other hand assume that p≡q≡3(mod4).Then (p−1)/2,(q−1)/2 and hence (p−1)(q−1)/4 are odd.Therefore , again by the law of quadratic reciprocity (p/q).(q/p)=−1.Thus (p/q)=−(q/p)
Example:Since 17≡1(mod4),(1729)=(2917) and since 23≡3(mod4) and 47≡3(mod4),(2347)=−(4723)
Example:
Compute (15243)
(15243)=(2343)
Note that 23 and 43 are primes of form 4n+3 so
(2343)=−(4323)
=−(2023)
=−(423).(523)
=−1.(523)
=−1.(235)
=−1.(35)
=−1.−1=1
Consequently the congruence x2≡152(mod53) is solvable.
Example:
Compute (37977297)
(37977297)=(72973797)
=(35003797)
=(22.53.73797)
Note (23797)2=1
(53797)3=(25)=(−1)3=−1
(73797)=(37)=−1
therefore
=(22.53.73797)
=1.−1.−1=1
thus the congruence x2≡3797(mod7297) is solvable
Jacobi Symbol
Jacobi symbol is the generalization of the Legendre Symbol, which was introduced in 1846 by the German Mathematician Karl G J Jacobi.In the Jacobi symbol (am), the modulus m need not be prime, but must be odd and relatively prime to a.
Let m be an odd positive integer with the canonical decomposition m=∏ki=1Peii and a any integer with gcd(a,m)=1. Then the Jacobi symbol (am) is defined by
(am)=(a∏ki=1Peii)=k∏i=1(aPeii)
where (aPi) denotes the familiar Legendre symbol.Although we use the same notation, bear in mind that the symbol (am) is the Legendre symbol if and only if m is prime.
Thus if x2≡a(modm) is solvable , then the Jacobi symbol (ap)=1.How ever this does not imply that x2≡a(modm) is solvable when (am)=1.For example (233)=(23.11)=(23)(211)=−1.−1=1.but x2≡2(mod33) has no solutions.
Example: evaluate the jacobi Symbol (55273)
Note 273=3.7.13, So by the definition of the Jacobi symbol
(55273)=(553).(557).(5513)=(13)(−17).(313)=1.−1.(133)=−(13)=−1
Python Code
from sympy.ntheory import jacobi_symbol
from sympy import S
print(S(273).factors())
print(jacobi_symbol(55,273))
{3: 1, 7: 1, 13: 1}
-1
Theorem:
let m be an odd positive integer, and a and b be any integers with gcd(a,m,)=1=gcd(b,m). then
- if a≡b(modm),, then (am)=(bm)
- (abm)=(am)(bm)
- (a2m)=1
Theorem:
Let m be an odd positive integer.Then
- (−1m)=(−1)(m−1)/2
- (2m)=(−1)(m2−1)/8
Theorem:
The generalized law of Quadratic Reciprocity
let m and n be relatively prime odd positive integers. Then
(mn)(nm)=(−1)(m−1)/2.(n−1)/2
Example:Compute the jacobi Symbol (221/399)
(221/399)=(−1)(221−1)/2.(399−1)/2(399/221)
=(178/221)=(2/221)(89/221)
(2/221)=(−1)(2212−1)/8=−1
(89/221)=(−1)(89−1)/2.(221−1)/2(221/89)
=(221/89)=(43/89)
=(−1)(43−1)/2.(89−1)/2(89/43)
=(89/43)=(3/43)
=(−1)(43−1)/2.(3−1)/2(43/3)
=−(43/3)=−(1/3)
=−1
So (221/399)=(−1)(−1)=1
Example:Solve the congruence x2≡15(mod187)
First notice that 187=11.17 and (15/11)=(15/17)=1. So the congruences x2≡15(mod11) and x2≡15(mod17) are solvable.Thus x2≡15(mod187) is also solvable.
You may note that the two incongruent solutions of x2≡15(mod11) are x≡±2(mod11) and those of x2≡15(mod17) are x≡±7(mod17). Therefore by CRT(Chinese Remainder Theorem), the given congruence has four incongruent solutions.So the solutions are x≡±24,±75(mod187) ie; x=24,75,112,163(mod187).
\mlegendre{x}{y}
Reference: https://www.physicsforums.com/threads/latex-frustration-defining-commands-with-arguments.277730/
Comments
Post a Comment