3.2 KiB
Handy Quadratic Congruences Facts
Number of Solutions
For congruences mod 2
Proposition 16.1. Let f(x) = ax^2 + bx + c
with a
odd, and let \Delta = b^2 - 4ac
be the discriminant of f(x)
. Then,
- If
\Delta \equiv 1
(mod8
), so thatb
is odd andc
is even, thenf(x) \equiv 0
(mod2
) has two solutions - If
\Delta \equiv 5
(mod8
), so thatb
andc
are odd, thenf(x) \equiv 0
(mod2
) has no solutions - If
4 | \Delta
, so thatb
is even, thenf(x) \equiv 0
(mod2
) has exactly one solution.
Proposition 16.2. Let p
be an odd prime and let a
be an integer. Then,
- If
p
does not dividea
, then the congruencex^2 \equiv a
(modp
) has either two solutions or no solutions. - If
p
dividesa
, thenx^2 \equiv a
(modp
) has exactly one solution, namelyx = 0
.
Legendre symbol definition. Let p
be an odd prime and a
any integer. Then the Legendre symbol, written as (\frac{a}{p})
is defined as
(\frac{a}{p}) = \begin{cases}
1, & \text{if
x^2 \equiv a
(mod p
) has exactly two solutions,} \
0, & \text{if x^2 \equiv a
(mod p
) has exactly one solution,} \
-1, & \text{if x^2 \equiv a
(mod p
) has no soultions.}
\end{cases}
Properties of Legendre symbol.
-
(\frac{a}{p}) = 0 \iff p
dividesa
-
(\frac{1}{p}) = 1
for every odd primep
-
a \equiv b
(modp
)\implies
(\frac{a}{p}) = (\frac{b}{p})
-
(\frac{ab}{p}) = (\frac{a}{p})(\frac{b}{p})
-
If
p
is an odd prime then,(\frac{-1}{p}) = \begin{cases} 1, & \text{if
p \equiv 1
(mod4
)} \ -1, & \text{ ifp \equiv 3
(mod4
)} \end{cases}
-
If
p
is an odd prime then,(\frac{2}{p}) = \begin{cases} 1, & \text{if
p \equiv 1
(mod8
) orp \equiv 7
(mod8
)} \ -1, & \text{ ifp \equiv 3
(mod8
) orp \equiv 5
(mod8
)} \end{cases}
-
Quadratic Reciprocity Theorem. Let
p
andq
be distinct odd primes. Then,(\frac{q}{p}) = \begin{cases} (\frac{p}{q}), & \text{if
p \equiv 1
(mod4
) orq \equiv 1
(mod4
)} \ -(\frac{p}{q}), & \text{ ifp \equiv 3
(mod4
) andq \equiv 3
(mod4
)} \end{cases}
Procedure
When p
is an odd prime, a quadratic congruence ax^2 + bx + c \equiv 0
(mod p
) can be transformed into a specialized form by completing the square.
\begin{align*}
ax^2 + bx + c \equiv 0 \text{ (mod p
)} &\iff 4a(ax^2 + bx + c) \equiv 0 \text{ (mod p
)} \\
&\iff 4a^2x^2 + 4abx + 4ac \equiv 0 \text{ (mod p
)} \\
&\iff 4a^2x^2 + 4abx + 4ac + (b^2 - 4ac) \equiv b^2 - 4ac \text{ (mod p
)} \\
&\iff 4a^2x^2 + 4abx + b^2 \equiv b^2 - 4ac \text{ (mod p
)} \\
&\iff (2ax+b)^2 \equiv b^2 - 4ac \text{ (mod p
)}
\end{align*}
Quadratic Congruences Modulo a prime power
Let a
be the solution to f(x) \equiv 0
(mod p
) where p
is an odd prime. Consider b = pt + a
. Then, f(b) \equiv 0
(mod p^2
) if f^\prime(a)t \equiv -\frac{f(a)}{p}
(mod p
).
In general, let a
be the solution to f(x) \equiv 0
(mod p^n
) where p
is an odd prime. Consider b = pt + a
. Then, f(b) \equiv 0
(mod p^{n + 1}
) if f^\prime(a)t \equiv -\frac{f(a)}{p^n}
(mod p
)