I was given following example in the book, however I am not sure how can the result of 27 be calculated. I realise that -13 + 40 gives 27, however how 27 ≡ −13 (mod 40) is the same as 3·(−13) ≡ 1 (mod 40) I dont really follow.
Moreover I don't really see how by Theorem ab≡cd(mod n) 3·27 ≡ 3·(−13) ≡ 1 (mod 40), I guess 3=a and c=3 by following example, ab≡cd. However it does not make much sense really.
find a linear combination of 3 and 40 that equals 1.
Step1: Divide 40 by 3 to obtain 40=3·13+1.This simples that 1=40−3·13. Step 2: Divide 3 by 1 to obtain 3 = 3·1 + 0. This implies that gcd(3, 40) = 1. Step 3: Use the result of step 1 to write
3·(−13) = 1 + (−1)40.
This result implies that −13 is an inverse for 3 modulo 40. In symbols, 3·(−13) ≡1 (mod 40). To find a positive inverse, compute 40 − 13. The result is 27, and 27 ≡ −13 (mod 40) because 27 − (−13) = 40. So, by Theorem ab≡cd(mod n) 3·27 ≡ 3·(−13) ≡ 1 (mod 40), and thus by the transitive property of congruence modulo n, 27 is a positive integer that is an inverse for 3 modulo 40. ■
Thank you for your help in advance