Modular Inverses: To find a−1modp, compute ap−2modp (since a⋅ap−2=ap−1≡1).
Fast Exponentiation: Computing anmodp becomes efficient: reduce nmod(p−1) first.
Primality Testing: If ap−1≡1(modp) for coprime a, then p is definitely composite (though the converse isn't always true—leads to Fermat pseudoprimes).
RSA Encryption: The security of RSA relies on a generalization of FLT (Euler's theorem).
Recall Explain to a 12-Year-Old
Imagine you have a special clock that only goes up to a prime number of hours—say 5 hours. Now, pick any number that doesn't land exactly on one of the hour marks when you divide evenly (like 3).
Fermat discovered something magical: if you keep multiplying your number by itself exactly (5−1)=4 times, and then see where you land on the clock, you'll always end up back at 1o'clock!
So 3×3×3×3=81. If we go around our5-hour clock, 81 hours later is the same as 1 o'clock (since 81=16×5+1).
This only works when your clock has a prime number of hours. If it's 4 hours (not prime), the magic breaks. That's why primes are special—they have this hidden pattern that regular numbers don't.
Euler's Totient Function - generalizes FLT to composite moduli via Euler's theorem
Wilson's Theorem - another special property of primes involving (p−1)!
Carmichael Numbers - composites that "fake" Fermat's theorem for all bases
Multiplicative Group Modulo Prime - the group theory foundation ((Z/pZ)∗ has order p−1)
Modular Exponentiation Algorithms - using FLT to speed up computations
RSA Cryptosystem - relies on generalizing FLT for security
#flashcards/maths
What does Fermat's Little Theorem state for a prime p and integer a where gcd(a,p)=1? :: ap−1≡1(modp)
What are the two conditions required for the classical form of Fermat's Little Theorem?
(1) p must be prime, (2) gcd(a,p)=1 (a is coprime to p)
What is the alternative form of Fermat's Little Theorem that works for all integers a?
ap≡a(modp) when p is prime
Why does Fermat's Little Theorem fail for composite moduli?
Because theorem relies on the multiplicative group modulo p having exactly p-1 elements, which only happens when p is prime; composite moduli don't have this structure
How can you use FLT to find the modular inverse of a modulo prime p?
a−1≡ap−2(modp), since a⋅ap−2=ap−1≡1(modp)
If you need to compute 7222mod11 using FLT, what is the first step?
Express 222 as 222=10⋅22+2 where 10 = p-1, then use 710≡1(mod11) to simplify to 72mod11
What mistake do students make when applying FLT to a=6, p=3?
They forget to check gcd(6,3)=3=1, so the condition gcd(a,p)=1 fails and FLT doesn't apply; 62≡0(mod3), not 1
Fermat's Little Theorem ek bahut hi powerful result hai number theory mein. Iska matlab simple hai:agar apke pas ek prime numberp hai aur koi bhi integer a hai jo p se divide nahi hota (matlab gcd(a,p)=1), to jab aap a ko (p−1) baar multiply karke power mein late ho aur phir p se divide karte ho, to remainder hamesha 1 ata hai. Formula yeh hai: ap−1≡1(modp).
Yeh theorem isliye important hai kyunki yeh humein bahut bade exponents ko simplify karne mein mad karta hai. For example, agar aapko 7222mod11 nikalna hai, to seedha calculate karna mushkil hai. Lekin FLT kehta hai ki 710≡1(mod11) (kyunki 11 prime hai aur 11−1=10). Ab222 ko 10×22+2 likh sakte ho, matlab 7222=(710)22⋅72≡122⋅49≡5(mod11). Kitna asaan ho gaya!
Yeh theorem cryptography (RSA jaise systems), primality testing (kya yeh number prime hai check karne ke liye), aur modular arithmetic problems mein extensively use hota hai.Ek important baat yad rakhni hai: yeh sirf prime modulus ke liye kaam karta hai.Agar aap composite number jaise 4 ya 6 pe apply karoge, to galat answer ayega. Aur dusri condition yeh hai ki a aur p coprime hone chahiye—yani unka GCD exactly 1 hona chahiye. Agar a already p ka multiple hai, to ap−1 zero hoga, ek nahi.