High School Mathematics Extensions/Further Modular Arithmetic/Project/Finding the Square Root

From testwiki
Jump to navigation Jump to search

Template:High School Mathematics Extensions/TOC Template:High School Mathematics Extensions/Further Modular Arithmetic/TOC


*Finding the square root*

Legendre Symbol

.. to be expanded There is actually a simple way to determine whether a is square

Let g be a generator of G where G is the multiplicative group mod p. Since all the squares form a group therefore, if a is a square, then

ap121

and if a is not a square then

ap121

we shall use these facts in the next section. .. to be expanded

*Finding the square root*

We aim to describe a way to find a square root in mod m. Let's start with the simplest case, where p is prime. In fact, for square root finding, the simplest case also happens to be the hardest.

If p ≡ 3 (mod 4) then it is easy to find a square root. Just note that if a has a square root then

(ap+14)2ap+12ap12aa

So let us consider primes equivalent to 1 mod 4. Suppose we can find the square root of a mod p, and let

x02a(modp)

With the above information, we can find the square of a mod p2. We let

x=x0+x1p

we want x2 ≡ a (mod p2), so

x2=x02+2x0x1p+x12p2
x2=a+kp+2x0x1p(modp2)

for some k as x02a(modp) so x02=a+kp, we see that

x2=a+p(k+2x0x1)(modp2)

so if we need to find x1 such that k+2x0x10(modp), we simply need to make x1 the subject

x1k(2x0)1(modp).

..generalisation ..example

..method for finding a sqr root mod p