You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/algebra/module-inverse.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ $$a \cdot x \equiv 1 \mod m.$$
16
16
We will also denote $x$ simply with $a^{-1}$.
17
17
18
18
We should note that the modular inverse does not always exist. For example, let $m = 4$, $a = 2$.
19
-
By checking all possible values modulo $m$ it should become clear that we cannot find $a^{-1}$ satisfying the above equation.
19
+
By checking all possible values modulo $m$, it should become clear that we cannot find $a^{-1}$ satisfying the above equation.
20
20
It can be proven that the modular inverse exists if and only if $a$ and $m$ are relatively prime (i.e. $\gcd(a, m) = 1$).
21
21
22
22
In this article, we present two methods for finding the modular inverse in case it exists, and one method for finding the modular inverse for all numbers in linear time.
0 commit comments