Bootstrap
  E.E.A. .com
It doesn't have to be difficult if someone just explains it right.

Calculator

For the Euclidean Algorithm, Extended Euclidean Algorithm and multiplicative inverse.

Before you use this calculator

If you're used to a different notation, the output of the calculator might confuse you at first.
Even though this is basically the same as the notation you expect. If that happens, don't panic.
Just make sure to have a look the following pages first and then it will all make sense:


Input

Algorithm

Choose which algorithm you would like to use.

Numbers

Enter the input numbers. Note that you need to enter n before b.
E.g. if you want to know the multiplicative inverse of 26 mod 11, then use n=11 and b=26.

n=
b=


Output

This is the calculation for finding the multiplicative inverse of 2499 mod 971 using the Extended Euclidean Algorithm:
nbqr t1t2t3
97124990971010
24999712557101
971557141401-1
55741411431-12
4141432128-12-5
1431281152-57
1281588-57-61
158177-6168
8711-6168-129
717068-129971
Answer

So t = -129. Now we still have to apply mod n to that number:
-129 mod 971 ≡ 842
So the multiplicative inverse of 2499 modulo 971 is 842.

Verification

Let i be the answer we just found, so i=842. We also have b=2499 and n=971.
If our answer is correct, then i × b (mod n) ≡ 1 (mod n).
Let's see if that's indeed the case.
i × b (mod n) ≡
842 × 2499 (mod 971) ≡
2104158 (mod 971) ≡
1 (mod 971)