Modular Arithmetic - Find the Square Root

There are actually several different concepts here, so I'll try to address all of them. I'll get to the modular arithmetic in just a moment, but first a review:

SQUARE ROOTS

We should know that 25 has two square roots in ordinary arithmetic: 5 and -5.

MODULAR ARITHMETIC SQUARE ROOTS

IF the square root exists, there are 2 of them modulo a prime. To continue our example, 25 has the two square roots 5 and -5.

We can check this:

$$(-5)^2 = 25 \equiv 3\bmod 11$$ $$(5)^2 = 25 \equiv 3\bmod 11$$

To find the square roots sometimes takes a bit of trial and error. Often you have to go through each value $v$ and square it (to get $v^2$) to check if it's equivalent to $n \bmod p$, where $n$ is the number whose square root you want to find.

MULTIPLE PRIMES

Again, if a square root exists, there are two square roots modulo each prime. So if we are using multiple primes, there can be more square roots. For example, with two primes, there are 2 square roots modulo the first prime and two square roots modulo the second prime. This gives us $2 \cdot 2 = 4$ square roots.

In general, if we can find a square root modulo each prime, there are a total of $2^n$ square roots modulo $n$ primes.

RETURNING TO YOUR EXAMPLE

We can first calculate 3 modulo 11 and 13:

$$3 \equiv 3 (\bmod 11)$$ $$3 \equiv 3 (\bmod 13)$$

So, modulo 11, we are looking to find a number that, when squared, is equivalent to 3. If we find one, we know that there will be another. So we check the numbers: $1^2 \equiv 1$, $2^2 \equiv 4$, $3^2 \equiv 9, \dots$ and find that

$$5^2 = 25 \equiv 3 (\bmod 11)$$

...so we know that there will also be another square root modulo 11. Continuing on our quest, we check

$$6^2 = 36 \equiv 3 (\bmod 11)$$

...so we've found the square roots modulo 11. We then continue this modulo 13 to find that:

$$4^2 = 16 \equiv 3 (\bmod 13)$$ $$9^2 = 81 \equiv 3 (\bmod 13)$$

So we know that our square root is either 5 or 6 modulo 11, and either 4 or 9 modulo 13. This gives us 4 possibilities. We can then find that:

$$82 \equiv 5 (\bmod 11), 82 \equiv 4 (\bmod 13)$$ $$126 \equiv 5 (\bmod 11), 126 \equiv 9 (\bmod 13)$$ $$17 \equiv 6 (\bmod 11), 17 \equiv 4 (\bmod 13)$$ $$61 \equiv 6 (\bmod 11), 61 \equiv 9 (\bmod 13)$$


Consider: x≡√3(mod11); x²≡3(mod11); x²≡3+22(mod11); x²≡25(mod11); x≡±5(mod11); So, x=+-5 You can do something similar mod 13.

Let x≡5(mod11);
x≡-5(mod11);
x≡4(mod13);
x≡-4(mod13)

Then use the Chinese Remainder Theorem to find the four values of x (mod 143)