Quadratic Equations and Residues Modulo N

Read · 1 min

QuadraticQuadratic Congruences!Congruences!

A quadratic congruence is of the form rx2+sx+t≡u(modm).rx^2 + sx + t \equiv u \pmod m.

Put ideas together

Contest problems often need this idea together with one or two others. That is where understanding goes deeper than memory. These are real problems from the AMC 12 and AIME, the national math competitions for middle and high school students, each with a worked solution on LIVE by Po-Shen Loh.

Read · 1 min

QuadraticQuadratic Residue!!!Residue!!!

A number which has a square root (modm)\pmod{m} is called a quadraticquadratic residueresidue (modm)\pmod {m}

How is this useful in problem solving? Well try finding quadratic residues in (mod4)\pmod {4} for example. The quadratic residues would be 12≡1(mod4),22≡0(mod4),32≡1(mod4),42≡0(mod4)1^2 \equiv 1 \pmod{4}, 2^2 \equiv 0 \pmod{4}, 3^2 \equiv 1 \pmod{4}, 4^2 \equiv 0 \pmod{4}

Thus the quadratic residues mod 4 are 00 and 11.

If that doesn't answer how quadratic residues can be useful let me give you an example from the jmo. This is usajmo 2011 #1:

Find, with proof, all integers nn such that 2n+12n+2011n2^n + 12^n+2011^n is a perfect square.

Notice that 2n+12n+2011n≡(−1)n+1n(mod3)2^n + 12^n + 2011^n \equiv (-1)^n + 1^n \pmod{3}

Let's take a look at quadratic residues mod 3. 12≡1(mod3),22≡1(mod3),32≡0(mod3)1^2 \equiv 1 \pmod{3}, 2^2 \equiv 1 \pmod{3}, 3^2 \equiv 0 \pmod{3}

Thus in order for 2n+12n+2011n2^n + 12^n + 2011^n to be a square integer it must be 00 or 1(mod3)1 \pmod{3}

Thus (−1)n+1n≡0,1(mod3)(-1)^n + 1^n \equiv 0,1 \pmod{3}. If nn is even, then (−1)n+1n≡2(mod3)(-1)^n + 1^n \equiv 2 \pmod{3} which is impossible.

Thus nn is odd.

We are inspired to try (mod4)\pmod{4} and it would be convenient if 2n≡0(mod4)2^n \equiv 0 \pmod{4}. The only time this is not the case is when n=1n=1. When we check this we see that 2+12+2011=2025=4522+12+2011 = 2025 = 45^2 and is thus a solution.

Now we assume that n>1n > 1

We take (mod4)\pmod{4} and see that 2n+12n+2011n≡(−1)n(mod4)2^n + 12^n + 2011^n \equiv (-1)^n \pmod {4}

From before we deduced that nn must be odd. Thus (−1)n≡−1≡3(mod4)(-1)^n \equiv -1 \equiv 3 \pmod{4}

But recall how the quadratic residues mod 4 are 00 and 11. Thus, it is impossible for a square number to be 3(mod4)3 \pmod{4} meaning that for values n>1,2n+12n+2011nn>1, 2^n+12^n+2011^n cannot be a square integer.

Thus, the only solution is n=1n=1.

Interactive · 1 question

Quadratic Residues

We say kk is a quadratic residue modulo nn if and only if there exists aa such that a2≡k(modn)a^2\equiv k\pmod{n}. In other words, kk is a perfect square modulo nn.

We say kk is a quadratic non-residue if it is not a quadratic residue. (Why not just non quadratic residue?)

Let's see what we can do with this definition.

Solving Quadratics

Suppose that we have a quadratic ax2+bx+c≡0(modn)ax^2+bx+c\equiv 0\pmod{n}. By CRT, it suffices to solve it modulo its prime factors to their respective exponents. However, let's first look at it modulo a prime.

Let's suppose that pp is an odd prime, for convenience. If pp was 22, then there would only be two cases to check.

We can then proceed in a similar fashion to how we would in the real numbers. We have ax2+bx+c≡0(modp).ax^2+bx+c\equiv 0\pmod{p}. Since p∤ap\nmid a (otherwise a≡0a\equiv 0), multiply by 4a4a to get, 4a2x2+4abx+4ac≡0(modp).4a^2x^2+4abx+4ac\equiv 0\pmod{p}.

Now what would we do? (Think about how we would do it in the real numbers.)

Choose one answer

Type a concept, like “slope” or “photosynthesis”.

↑ ↓ to choose · Enter to openSearch explanations and problems