Britannica
Sources used in this answer
Why is division by 2 possible modulo 5 but impossible modulo 4?
Created from Britannica articles
using AI.
AI can make mistakes, so verify using Britannica articles.
In modular arithmetic, division by a number modulo is defined as finding a value such that .
Division by 2 is possible modulo 5 because 2 and 5 are relatively prime—meaning their only common factor is 1. Specifically, , and since , the value 3 acts as the multiplicative inverse of 2, making .
Conversely, division by 2 is impossible modulo 4 because 2 and 4 are not relatively prime; they share a common factor of 2. For any integer , the product will always be an even number. In modulo 4, the possible values for are , , , and . Because none of these products result in 1, there is no solution for in the equation .1