Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store

Wilson’s Theorem

Reviewed by:
ffImage
hightlight icon
highlight icon
highlight icon
share icon
copy icon
SearchIcon

An Introduction to Wilson's Theorem

Wilson's Theorem is a classical theorem in Number Theory. It has also an interesting fact associated with it that the theorem is stated by a teacher and student pair, i.e., Ibn al-Hayatam and John Wilson, respectively. However, it was proved later on by Lagrange. Wilson’s Theorem is of great importance in Number Theory. The applications of Wilson’s Theorem, its limitations, and Wilson’s Theorem examples will be discussed here in detail for a clear understanding of the theorem. So, let us discuss the theorem.


History of John Wilson


John Wilson


John Wilson


  • Name: John Wilson

  • Born: 6 August 1741

  • Died: 18 October 1793

  • Field: Mathematics

  • Nationality: British


Wilson's Theorem Statement

Wilson Theorem states that if $p$ is any natural number greater than 1, then $p$ is said to be a prime number if and only if the product of all the positive integers less than $p$ is one less than a multiple of number $p$.


Mathematically, according to Wilson's Theorem, let $p>1$. The number $p$ is prime if and only if

$(p-1) !=-1(\bmod p)$

or,

$(p-1) !=(p-1)(\bmod p)$


Wilson's Theorem Proof

A natural number p > 1 is a prime number if and only if the product of all the positive integers less than p is one less than a multiple of p.

Suppose $p$ is prime. If $k \in\{1, \ldots, p-1\}$, then $k$ is relatively prime to $p$. So, there are integers $a$ and $b$ in the way that

$\Rightarrow a k+b p=1, \text { or } a k=1(\bmod p) \text {. }$

Reducing $a \bmod p$,

We may assume $a \in\{1, \ldots, p-1\}$. Thus, every element of $\{1, \ldots, p-1\}$ has a reciprocal $\bmod p$ in this set. We know that only 1 and $p-1$ are their reciprocals. Thus, the elements $2, \ldots, p-2$ must pair up into pairs $\left\{x, x^{-1}\right\}$. It is obvious that their product is 1.

Hence,

\[\Rightarrow 1 \cdot(p-1)=p-1 \]

\[ \Rightarrow-1(\bmod p)\]

$\Rightarrow(p-1) !=1 \cdot 2 \cdots(p-2) \cdot(p-1)$

Now suppose $(p-1) !=-1(\bmod p)$

We want to show that $p$ is prime.

Begin by rewriting the equation as $(p-1) !+1=k p$.

Suppose $p=a b$. We may take $1 \leq a, b \leq p$. If $a=p$, then the factorization is trivial, so suppose $a<p$. Then, $a \mid(p-1)$ ! (since it's one of $\{1, \ldots, p-1\})$ and $a \mid p$,

So,

\[\Rightarrow(p-1) !+1=k p\] shows \[a \mid 1.\]

Therefore, $a=1$.


Limitations of Wilson's Theorem

Wilson's theorem is not applicable in the case of composite number 4 because by applying Wilson's Theorem in the case of 4, we get the remainder 2 instead of 1.


Applications of Wilson's Theorem

Wilson’s Theorem has a wide range of applications in the changing world. As the world is shifting to digitization, security is the key concern.

  • Wilson’s Theorem is used in cryptography for coding-decoding.

  • Wilson's Theorem is applicable in the case of both prime and composite numbers. Hence, widens the base of its applications.


Wilson’s Theorem Examples

1. What will be the remainder when 568! is divided by 569?

Ans: According to Wilson's theorem, we have,

For prime number ' $p$ ', we have

$\Rightarrow(p-1) ! \bmod p=(p-1)$

In this case, 569 is a prime number.

Thus,

$\Rightarrow 568 ! \bmod 569=568 \text {. }$

Hence, when 568 ! is divided by 569,

$\Rightarrow$ we get 568 as the remainder.


2. What will be the remainder when 225! is divided by 227?

Ans: We know that for prime number ' $p$ ', we have

$\Rightarrow(p-2) ! \bmod p=1 \text {. }$

In this case, 227 is a prime number.

Thus, $225 ! \bmod 227$ will be equal to 1.

In other words,

when 225! Is divided by 227,

$\Rightarrow$ we get the remainder as 1.


Important Formulas to Remember

  • For $p>1$ and $p$ is prime number: $(p-1) !=-1(\bmod p)$


Important Points to Remember

  • Wilson’s Theorem is applicable only in the case of a prime number.

  • A number is said to be prime if it is divisible by 1 and itself only.


Conclusion

In the article, we have discussed the proof of Classical Wilson's Theorem in detail and its applications in the real world. Wilson’s Theorem forms a fundamental tool of Number Theory. It reduces our calculation work, which would even have taken hours without this theorem. Finally, we can say that Wilson's Theorem is a gem of Mathematics.

Competitive Exams after 12th Science
tp-imag
bottom-arrow
tp-imag
bottom-arrow
tp-imag
bottom-arrow
tp-imag
bottom-arrow
tp-imag
bottom-arrow
tp-imag
bottom-arrow

FAQs on Wilson’s Theorem

1. What is Wilson's Theorem and its mathematical formula?

Wilson's Theorem provides a necessary and sufficient condition for a number to be prime. It states that a natural number p > 1 is a prime number if and only if the factorial of the number preceding it, (p-1)!, leaves a remainder of -1 when divided by p. The mathematical formula is expressed using modular arithmetic as: (p - 1)! ≡ -1 (mod p).

2. Can you provide a simple example of how to apply Wilson's Theorem?

Certainly. Let's test if the number p = 5 is prime using Wilson's Theorem. According to the formula, we need to check if (5-1)! ≡ -1 (mod 5).

  • First, calculate the factorial: (5-1)! = 4! = 4 × 3 × 2 × 1 = 24.
  • Next, we divide 24 by 5. The result is 4 with a remainder of 4.
  • In modular arithmetic, a remainder of 4 (mod 5) is equivalent to -1 (mod 5), since 5 - 1 = 4.
  • Because the condition is met, Wilson's Theorem confirms that 5 is a prime number.

3. What happens if you apply Wilson's Theorem to a composite number?

If you apply Wilson's Theorem to a composite number n > 4, the result of (n-1)! will always be congruent to 0 (mod n). This is because all the prime factors of n are smaller than n and will be included in the product 1 × 2 × ... × (n-1), making the factorial divisible by n. For the special case of n=4, (4-1)! = 6, and 6 ≡ 2 (mod 4). In all cases, the condition of being congruent to -1 is not met, which is why the theorem is a test for primality.

4. Is the converse of Wilson's Theorem also true?

Yes, the converse of Wilson's Theorem is also true, which is a key aspect of its mathematical importance. The converse states that if the condition (n - 1)! ≡ -1 (mod n) holds for an integer n > 1, then n must be a prime number. This 'if and only if' property makes the theorem a complete theoretical criterion for primality.

5. How does Wilson's Theorem relate to or differ from Fermat's Little Theorem?

Both Wilson's Theorem and Fermat's Little Theorem are fundamental results in number theory concerning prime numbers, but they differ in key ways:

  • Nature of the Test: Wilson's Theorem is an 'if and only if' condition, making it a definitive test for primality. Fermat's Little Theorem is an 'if' condition, meaning its converse is not always true (some composite numbers can pass the test).
  • Computational Practicality: The factorial in Wilson's Theorem makes it computationally intensive and impractical for testing large numbers. Fermat's Little Theorem, based on modular exponentiation, is far more efficient and forms the basis for many modern primality tests.

6. What is the importance of Wilson's Theorem in mathematics?

While it is not practical for large-scale primality testing, the importance of Wilson's Theorem is mainly theoretical. It is used to prove other results in number theory and abstract algebra. The concepts central to its proof, such as multiplicative inverses in modular arithmetic, are foundational in fields like cryptography and coding theory, even if the theorem itself is not directly used in applications.

7. What is the core idea behind the proof of Wilson's Theorem?

The core idea behind the proof of Wilson's Theorem is the concept of pairing elements with their unique multiplicative inverses modulo p. For any prime number p, every integer in the set {1, 2, ..., p-1} has a unique inverse within that set. The proof shows that only 1 and p-1 are their own inverses. All other elements (from 2 to p-2) can be paired up such that the product of each pair is 1 (mod p). Consequently, the entire factorial product (p-1)! simplifies to 1 × (product of all pairs) × (p-1), which becomes 1 × 1 × (p-1) ≡ -1 (mod p).