Verify that ## x\equiv a^{p-2}b\pmod {p} ## is a solution

  • Thread starter Thread starter Math100
  • Start date Start date
AI Thread Summary
The discussion centers on proving that ## x \equiv a^{p-2}b \pmod{p} ## is a solution to the linear congruence ## ax \equiv b \pmod{p} ##, given that ## gcd(a, p) = 1 ## and using Fermat's theorem. It is established that since ## a^{p-1} \equiv 1 \pmod{p} ##, it follows that ## a(a^{p-2}b) \equiv b \pmod{p} ##. The proof is deemed mostly correct but suggests removing a redundant line for clarity. The final conclusion confirms that ## x := a^{p-2}b \pmod{p} ## indeed solves the congruence, with acknowledgment that other solutions exist as well. The discussion emphasizes precision in mathematical proofs.
Math100
Messages
813
Reaction score
229
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} ##.
 
Physics news on Phys.org
Math100 said:
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} ##.
Nice and correct so far.
Math100 said:
Thus ## ax\equiv b\pmod {p}\implies x\equiv a^{p-2}b\pmod {p} ##.
This line is a bit confusing. You can simply remove this line.
You haven't solved for ##x##. You have shown what you wrote next:

Math100 said:
Therefore, ## x\equiv a^{p-2}b\pmod {p} ## is a solution of the linear congruence ## ax\equiv b\pmod {p} ##.
##x## set as ##x:=a^{p-2}b## solves the congruence, and this was all that had to be shown.
There are other numbers that solve it as well, namely all ##x\in a^{p-2}b+p\mathbb{Z}.##
 
  • Like
Likes Math100
Observe that
\begin{align*}
&ax\equiv b\pmod {p}\implies ax\cdot a^{p-2}\equiv b\cdot a^{p-2}\pmod {p}\\
&\implies a^{p-1}x\equiv a^{p-2}b\pmod {p}.\\
\end{align*}
By Fermat's theorem, we have ## a^{p-1}x\equiv x\pmod {p} ##.
Thus ## x\equiv xa^{p-1}\equiv a^{p-2}b\pmod {p} ##.
 
Should I insert that above in my proof and delete what I wrote in my previous proof?
 
Math100 said:
Should I insert that above in my proof and delete what I wrote in my previous proof?
Your first proof was perfect, just one line too many. You should remove the line before last. And if you want to be perfect then write:

...
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} ##.

Therefore, ## x:= a^{p-2}b\pmod {p} ## is a solution of the linear congruence ## ax\equiv b\pmod {p} ##.
 
  • Haha
Likes Math100
fresh_42 said:
Your first proof was perfect, just one line too many. You should remove the line before last. And if you want to be perfect then write:

...
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} ##.

Therefore, ## x:= a^{p-2}b\pmod {p} ## is a solution of the linear congruence ## ax\equiv b\pmod {p} ##.
When you were in college, did you pursue perfection as well?
 
Math100 said:
When you were in college, did you pursue perfection as well?
Not really. I was more a student than a studier. That changed after the first exams.
 
  • Wow
Likes Math100
Back
Top