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

  • Thread starter Thread starter Math100
  • Start date Start date
Click For Summary
SUMMARY

The discussion confirms that for a prime number ## p ## and an integer ## a ## such that ## gcd(a, p) = 1 ##, the expression ## x \equiv a^{p-2}b \pmod{p} ## is indeed a solution to the linear congruence ## ax \equiv b \pmod{p} ##. This conclusion is derived using Fermat's theorem, which states that ## a^{p-1} \equiv 1 \pmod{p} ##. The participants agree that the proof is correct but suggest removing an unnecessary line for clarity. The final proof succinctly establishes that ## x := a^{p-2}b \pmod{p} ## solves the congruence.

PREREQUISITES
  • Understanding of linear congruences
  • Familiarity with Fermat's Little Theorem
  • Basic knowledge of modular arithmetic
  • Concept of greatest common divisor (gcd)
NEXT STEPS
  • Study Fermat's Little Theorem in depth
  • Explore applications of linear congruences in number theory
  • Learn about the Chinese Remainder Theorem
  • Investigate the properties of prime numbers and their role in modular arithmetic
USEFUL FOR

Mathematicians, students of number theory, and anyone interested in modular arithmetic and its applications in cryptography and algorithm design.

Math100
Messages
817
Reaction score
230
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   Reactions: 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   Reactions: 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   Reactions: Math100

Similar threads

  • · Replies 8 ·
Replies
8
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 6 ·
Replies
6
Views
1K