- #1
Math100
- 797
- 221
- Homework Statement
- Let ## p ## be a prime and ## gcd(a, p)=1 ##. Use Fermat's theorem to verify that ## x\equiv a^{p-2}b\pmod {p} ## is a solution of the linear congruence ## ax\equiv b\pmod {p} ##.
- Relevant Equations
- None.
Proof:
Suppose ## gcd(a, p)=1 ## where ## p ## is a prime.
Consider the linear congruence ## ax\equiv b\pmod {p} ##.
By Fermat's theorem, we have that ## a^{p-1}\equiv 1\pmod {p} ##.
Observe that ## a^{p-1}\equiv 1\pmod {p}\implies a^{p-1}b\equiv b\pmod {p}\implies a(a^{p-2}b)\equiv b\pmod {p} ##.
Thus ## ax\equiv b\pmod {p}\implies x\equiv a^{p-2}b\pmod {p} ##.
Therefore, ## x\equiv a^{p-2}b\pmod {p} ## is a solution of the linear congruence ## ax\equiv b\pmod {p} ##.
Suppose ## gcd(a, p)=1 ## where ## p ## is a prime.
Consider the linear congruence ## ax\equiv b\pmod {p} ##.
By Fermat's theorem, we have that ## a^{p-1}\equiv 1\pmod {p} ##.
Observe that ## a^{p-1}\equiv 1\pmod {p}\implies a^{p-1}b\equiv b\pmod {p}\implies a(a^{p-2}b)\equiv b\pmod {p} ##.
Thus ## ax\equiv b\pmod {p}\implies x\equiv a^{p-2}b\pmod {p} ##.
Therefore, ## x\equiv a^{p-2}b\pmod {p} ## is a solution of the linear congruence ## ax\equiv b\pmod {p} ##.