How To Find The Inverse of a Number ( mod n ) - Inverses of Modular Arithmetic - Example

  Рет қаралды 565,791

Learn Math Tutorials

Learn Math Tutorials

Күн бұрын

Пікірлер: 248
@trollerxoxox
@trollerxoxox 8 жыл бұрын
Thank you for explaining it so well. I hate it when some other mathematicians just show off by being cryptic, its so frustrating. Your tutorial was a tiny tad slower but made it so much easier to follow and learn. Thanks.
@nahiyanalamgir7056
@nahiyanalamgir7056 2 жыл бұрын
The thing is that mathematicians use symbolic representations and formulas to summarize stuff in a compact way - but that's terrible for explanation. They should refrain from doing that and instead explain things in a human-friendly way!
@logisec
@logisec Жыл бұрын
@@nahiyanalamgir7056 Suffering from this right now in my Cryptography class, absolutely soul-sucking explanations in this class
@sharvesh0369
@sharvesh0369 6 ай бұрын
Been searching all night for this to learn chinese remainder theorem for tomorrows network security exam. This one is a LIFESAVER
@c0wqu3u31at3r
@c0wqu3u31at3r 8 жыл бұрын
Can I just say thank you on behalf of everyone at QMUL taking the Algorithms and Complexity module. This has really come in useful with trying to understand RSA encryption!
@mathhacker4764
@mathhacker4764 11 ай бұрын
Same, had to learn this topic to understand RSA encryption!
@kingkevthebest3114
@kingkevthebest3114 6 ай бұрын
man rsa encryption is 8th grade math
@KitKatSam27
@KitKatSam27 6 жыл бұрын
This was amazing. Way better step by step explanation than my professor. THANK YOU!!
@ibejoseph19
@ibejoseph19 Жыл бұрын
I've been looking for a video like this for weeks. After another seemingly fruitless search, I prayed and just stumbled on your well explanatory video. Thank you very much.
@amandaniess7028
@amandaniess7028 6 жыл бұрын
Thank God! I have an exam tomorrow and I've never really understood how to use the algorithm to find aninverse. I like u.
@kaylaburrell4637
@kaylaburrell4637 5 жыл бұрын
This makes sense now! I decrypted an affine cipher, but afterwards, I couldn’t figure out how I got -5 as the inverse of 5 or how it worked. After watching this video, I worked it out and got -5 again. Apparently, I’m just the type of person to use actual math successfully by accident.
@bensosfrequents
@bensosfrequents 9 жыл бұрын
doing Bsc mathematics and computer science in pure maths section (number theory).... this tutorial has really really improved me.... i have not only understood linear congruence but also cryptology... nice and God bless you
@iamriotus
@iamriotus 9 жыл бұрын
Absolutely amazing tutorial! Preparing for my exam, I couldn't find a good explanation anywhere! You really saved my bacon!
@AndrewBaba
@AndrewBaba 9 жыл бұрын
The best explanation on the youtube I found so far. Thank you
@learnmathtutorials
@learnmathtutorials 11 жыл бұрын
If that is the case, I would guess that you simplified a little early. When doing this process, it is important to leave terms as multiples of two numbers, so that one of the numbers can be replaced by an equation above. I hope that helps. :)
@learnmathtutorials
@learnmathtutorials 11 жыл бұрын
Thank you. Not every number in a mod field will necessarily have an inverse. For example 2 (mod 4) does not have and inverse since 2*0 = 0 (mod 4) .... 2*1 = 2 (mod 4) ... 2*2 = 0 (mod 4) ...2*3 = 2 (mod 4) ... none of these results produce 1 (mod 4) and you have checked 2*0 , 2*1 ,..., 2*(n-2) , 2*(n-1) where n is the mod.
@CatherineWeeks
@CatherineWeeks 7 ай бұрын
Thank you so much for this! I have a discrete final coming up and it's the videos on niche topics like this that are really getting me through. You teach it so well too, thank you so much for putting your effort and time into videos like these.
@Arfii20
@Arfii20 8 ай бұрын
after 10 years. Thank you. Was going crazy :')
@Robertlavigne1
@Robertlavigne1 8 жыл бұрын
THANK-YOU!!! So intuitive when shown this way. My proff skipped a bunch of steps and it went right over my head. Much appreciated!
@HighFlyier11
@HighFlyier11 8 жыл бұрын
RESPEK! Every other KZbin tutorial should do future students of this a favor and take off their videos. Most clear and concise. Respek once again
@RobinsonGames
@RobinsonGames 5 жыл бұрын
This really helped a lot. Feeling much more prepared for my exam now
@anmaraljanabi7137
@anmaraljanabi7137 8 жыл бұрын
Thanks you very much sir, wish you continues success
@adangonzales8085
@adangonzales8085 10 жыл бұрын
5 Star rating for this video!
@shubhamchaudhari790
@shubhamchaudhari790 10 жыл бұрын
r u mad ..... :P :P
@PhamQuang
@PhamQuang 5 жыл бұрын
Having an exam coming next week. You saved me. HUGE THANKS
@MAGonzzManifesto
@MAGonzzManifesto 10 жыл бұрын
Thank you so much! I feel confident doing these kinds of problems now!
@evermoregwatiwa8001
@evermoregwatiwa8001 5 жыл бұрын
this is the best explanation ever. thumps up man.
@shaheershakeel6851
@shaheershakeel6851 3 жыл бұрын
Thank you! This was the best explanation of EA and EEA I've been through. I still have no idea why tf this thing exists though
@omberry7950
@omberry7950 2 жыл бұрын
very very thanks.. i am strugling with inverse. you solved the problem very efficiently .......
@sethmarcus1784
@sethmarcus1784 5 жыл бұрын
Excellent video clearly demonstrating how to calculate the inverse of a number(mod n). Very grateful for this video!
@TaylorCaRRtel
@TaylorCaRRtel 9 жыл бұрын
Studying for my final and couldn't figure this out for the life of me. Your explanation was great. Thank you
@josephcario2659
@josephcario2659 8 жыл бұрын
boss tnx now I can explain it very well to my students.there are lots of video related to this bt this clearly explains the topic.nice...
@CylenxswizinSim
@CylenxswizinSim 3 жыл бұрын
Thanks so much THIS IS EXACTLY WHAT WAS MISSING IN OTHER VIDEOS MUCH APPRECIATION!!!!
@Mazloum1000
@Mazloum1000 7 жыл бұрын
better than my indian lecturer will ever explain it with her annoying accent, thank you good sir, and this definitely warrants a subscribe
@sillupiiks
@sillupiiks 6 жыл бұрын
Thank You so much! I spent an hour with my teacher today and I think now I finally got the idea:)
@amarachiukor4016
@amarachiukor4016 3 жыл бұрын
Your explanations on this topic is so on point. Thanks alot
@declanallan885
@declanallan885 7 жыл бұрын
awesome video dude, love how you used the different colour schemes to segregrate some of the concepts behind what was going on!
@mahendrakotapati9970
@mahendrakotapati9970 5 жыл бұрын
you had explained in very clear manner thanks sir...
@p1q2r
@p1q2r 4 жыл бұрын
The best explanation for modular multiplicative inverse.. Thanks much!
@MultiDman2011
@MultiDman2011 2 жыл бұрын
Thank you so much for making this understandable and easy to follow. Life saver!!
@blacklotus5953
@blacklotus5953 5 жыл бұрын
Great explanation! Way better than my lecture at uni
@hafilahmustaffa
@hafilahmustaffa 3 жыл бұрын
thank you so much. I spend a day to find the solution for d equal to negative. Superb.
@HypnotizeCampPosse
@HypnotizeCampPosse 10 жыл бұрын
Learn Math Tutorials I like how you solved for the remainder values first in the video, then went and did the Reverse Eulcidean Algo (REA) This method is different from every other method I have seen demonstrated (where they do the REA and computer the replacement values on-the-fly). I think you way will keep me organized better, thanks for making the video.
@danielbuckley9651
@danielbuckley9651 7 жыл бұрын
Very nice video, good use of colours. Excellent explanation of the Euclidean algorithm leaving no steps out. Well done.
@ethansimmons82
@ethansimmons82 4 жыл бұрын
I should've found this video first! It was very clear, thank you.
@NandaAcademies
@NandaAcademies 3 жыл бұрын
Excellent explanation which is useful in understanding RSA algorithm.
@nadianoormohamed4432
@nadianoormohamed4432 7 жыл бұрын
great video!!!!! You explain it in a structured way which is essential for a topic as such. Thanks!
@TheGamerViewer
@TheGamerViewer 6 жыл бұрын
Thank you so much! best guy on youtube for this tutorial!
@greatgymdj
@greatgymdj 10 жыл бұрын
Very nice video, my lecturer just expected us to guess how to do this! Thanks :)
@gabrielsotolongo8407
@gabrielsotolongo8407 9 жыл бұрын
Great tutorial! All this can be avoided by using matrix multiplication which is a faster and easier route to get the multiplicative inverse of 27 mod 392. It is always good to know both ways of course, but like I said, great tutorial! Maybe I should do a tutorial on how to do it using matrices...
@jackbinding5587
@jackbinding5587 8 жыл бұрын
+Gabriel Sotolongo Im curious to how you do it with matrices! haha
@gabrielsotolongo8407
@gabrielsotolongo8407 8 жыл бұрын
+Jack Binding it is really easy, I could make a video an upload it if you like, anyways there is none here in KZbin of that type.
@jackbinding5587
@jackbinding5587 8 жыл бұрын
+Gabriel Sotolongo if you do decide to make one defo tell me! Haha
@gabrielsotolongo8407
@gabrielsotolongo8407 8 жыл бұрын
+Jack Binding I will try to make the video today (no promises) ;)
@jackbinding5587
@jackbinding5587 8 жыл бұрын
haha, im grateful if you upload it any time man! I've just not seen anything modulo been solved with matrices so im just curious!
@JPfromDport
@JPfromDport 8 жыл бұрын
Great video, helped me understand how to deal with negative numbers in Bezout's theorem.
@richardwalters9249
@richardwalters9249 7 жыл бұрын
This is a great instructional video ... I still need to clean up some details in my understanding ... but this question: Is there a check you can do to verify the answer ? I’m trying to do 27^-1 (mod 292) compared to 363 ( mod 392) ... or, am I thinking about this wrong ?
@CptGankbawlz
@CptGankbawlz 11 жыл бұрын
Thank you so much! While reading my book I was completely lost! You made this so simple to follow and understand. Thanks again!
@ajk7151
@ajk7151 5 жыл бұрын
awesome explanation! looking forward to check out the rest of the videos. :)
@bharathraj1646
@bharathraj1646 4 жыл бұрын
Thanks a lot , it was very helpful. Could you please make more videos on modular arithmetic algorithms . It would really help me a lot. Thanks once again :)
@bernie8571
@bernie8571 10 жыл бұрын
wow thank you for making this. it helped a ton!
@thelazyfrog9520
@thelazyfrog9520 9 жыл бұрын
Sir. It was a brilliant tutorial ... Just wondering if I have learnt this well or not. Is 7 inverse mod 31 = 9 ? Please advice.
@learnmathtutorials
@learnmathtutorials 9 жыл бұрын
Debajyoti Biswas Yes! Good Job! :)
@marksahlgreen9584
@marksahlgreen9584 6 жыл бұрын
I am sitting with this exact same calculation, and I can't make it to be 9 >_
@Haragavi
@Haragavi 6 жыл бұрын
Yeah bro. I've also go it :)
@bawarkhalid2651
@bawarkhalid2651 2 жыл бұрын
@@marksahlgreen9584 make sure you add both 7(1) and 7(8) together it will be 7(9), in the last step it will be 1=7 + 31(-2) +7(8). 4years old but I hope this helps :)
@vestigialSmile
@vestigialSmile 5 жыл бұрын
Thanks man! Came in handy with Abstract Algebra
@rasberybanana
@rasberybanana 9 жыл бұрын
very helpful video, are the equal signs at the end supposed to be congruence signs?
@savantdude
@savantdude 5 жыл бұрын
amazing explanation! saved me a lot of time!
@CSBIBLE21
@CSBIBLE21 4 жыл бұрын
this was very good, exactly what i was looking for
@logankoester2845
@logankoester2845 9 жыл бұрын
In the step where you calculated 363 by subtracting 29 from 392 (392-29=363) does the negative come from the -29? So if 29 were positive would you add 29 to 392?
@waltvanamstel6807
@waltvanamstel6807 9 жыл бұрын
Logan Koester He found the answer to be -29. That is a valid answer, but you will often be asked to find the positive inverse. -29 and 363 are essentially the same number under mod 392.
@coldair0010
@coldair0010 11 жыл бұрын
what if i am left with a constant on the left at the end
@fairlymoon448
@fairlymoon448 7 жыл бұрын
hey any chance you can make a playlist of these so we know which order to go it? just watched the positive mod change vid and im pretty sure next should be the negative mod but its this? which i dont think should be next?
@learnmathtutorials
@learnmathtutorials 11 жыл бұрын
1001 = 200(5) + 1 Rewrite as 1 = 1001 + 200(-5) (mod 1001) Note that 1001 (mod 1001) = 0 and also (-5) (mod 1001) = 996 since 1001 - 5 = 996 then we have 1 = 0 + 200(996) therefore 1 = 200(996) (mod 1001) Then 996 is the inverse of 200 (mod 1001) You can check the result by looking at 996(200) = 199200 = 199(1001) + 1 (mod 1001) and anything times the mod is 0 so we get 996(200) = 1 (mod 1001) I tried to format this nicely but it gets all jumbled together when I post it as a comment.
@Swoost
@Swoost 4 жыл бұрын
should include an explanation for this part: 9:00 my teacher would need a proof that these are equivalent modulo
@atomic_godz
@atomic_godz 10 жыл бұрын
Just what I needed, thanks a lot man
@김찬호-f1e
@김찬호-f1e 3 жыл бұрын
Thanks you!! it is really helpful for me to understand.
@SaramZafar
@SaramZafar 3 жыл бұрын
When you didn't explain why you replaced -29 with 363 I lost you, I mean it's unique to this question only. in other problems how will we know what to replace or we should even replace or not? You must have explained it a bit.
@ShivamSharmabtp
@ShivamSharmabtp 3 жыл бұрын
29+363 = 392. u can check out his -ve number modulo video
@feysalimran
@feysalimran 8 жыл бұрын
Pretty nice tutorial, even after all these years. Sir am wondering, if we had had a positive number instead of a negative one at + 27(-29)...., would we have still subtracted it from 392 or added it instead?
@alial-musawi9898
@alial-musawi9898 7 жыл бұрын
Feysal Imraan 27 (mod n > 27) = 27 So you leave the 27 as is.
@shivanineharkar2571
@shivanineharkar2571 2 жыл бұрын
Dude you have helped alot😇😇😇😇😇😇😇
@danielmartino8068
@danielmartino8068 4 жыл бұрын
Thank you for the explanation, you say me a lot of theory
@mikesdailygaming
@mikesdailygaming 5 ай бұрын
So for example if we did the EEA and came up with a number that was between 0 and 392 then that would be the answer, we wouldn't have to do anything else to it?
@JohnSmith-kf1lq
@JohnSmith-kf1lq 10 жыл бұрын
Very helpful. Thanks for making
@chnoco
@chnoco 6 жыл бұрын
Thank you so much this is so useful great job!
@mathhacker4764
@mathhacker4764 11 ай бұрын
Thanks sooooo much.
@Tuzkichen
@Tuzkichen 7 жыл бұрын
very clear explanation, thanks!
@pepe6666
@pepe6666 4 жыл бұрын
this seems to be somewhat lacking in explanations into why you're doing things. i can follow along, but why we are doing each step seems to be not mentioned.
@irenekuo1728
@irenekuo1728 4 жыл бұрын
Agreed
@victorpaesplinio2865
@victorpaesplinio2865 2 жыл бұрын
He basically found the gcd of 392 and 27. Then he used the steps to build up Bezout identity. This identity is the key to solve the problem. A little refresh: Euclidian algorithm says that if a and b are two positive integers and a=b*q+r Then gcd(a,b)=gcd(b,r). We use the division algorithm until we find 0 as a remainder (in this case he skipped this part). Notice we found that gcd(392,27)=1 which is very important. Next we have Bezout theorem. It says that if gcd(a,b)=d then we can find integers r and s such that a*r+b*s=d. Using the steps from the euclidian algorithm we can build up this identity. Finally we use this identity to solve the problem. Why is it important to have 1 as the gcd? Because if the gcd(a,b)≠1 then b has no inverse mod a.
@rapidreaders7741
@rapidreaders7741 5 жыл бұрын
How would you take the inverse of 2 (or any other even number) in mod 392?
@patogenny
@patogenny 5 жыл бұрын
2 (or any other even number) don't have inverse in mod 392 (or any other even number). If x would be a inverse then 2*x= y*392 + 1. 2*x must be even and y*392+1 must be odd.
@darrenmau1942
@darrenmau1942 9 жыл бұрын
Well explain, good example, thank you very much that helps so much
@BGSoccerMagic
@BGSoccerMagic 10 жыл бұрын
Can someone explain to me what's the practical use of modular arithmetic if we don't count encryption which is used automatically and with a very large numbers?
@lilmonkianime8084
@lilmonkianime8084 5 жыл бұрын
What should I do , if there is natural number in the givens, not number with -1 degree?
@Arkansas28
@Arkansas28 3 жыл бұрын
Excellent, thanks for the video.
@AndrewT34pot
@AndrewT34pot Жыл бұрын
thank you, well explained video
@billyandej
@billyandej 3 жыл бұрын
I hope you’ll answer this question right away. Badly needed. We’re going to report this topic this coming Thursday. May I know why do we need to get the multiplicative inverse of the given? just like in the example. Why do we need to get the inverse of 27 (mod 392) and it should be congruent to 1 mod 392?
@phnml8440
@phnml8440 3 жыл бұрын
Is my thinking correct that you can only find an inverse if the gcd(a,n) = 1 where a = 1 (mod n)
@yifuxero9745
@yifuxero9745 Жыл бұрын
Much easier way:. With a pocket calculator perform the Euclidean algorithm procedure to get the continued fraction quotients and the convergent, = [14, 1, 1, 13] and underneath we have the convergents [ 1/14, 1/15, 2/29 and 27/392} With an even number of terms in the partial quotient part (we have four), we take the 392 (rightmost denominator) and subtract the denominator to the left (a 29), giving 363, (correct.). However, if the number of quotients is odd, just extract the denominator to the left of the rightmost. Example: Fine 2^(-1) mod 29. Our data is [14, 1, 1]. and underneath we write[ (1/14, 1/15, 2/29]. Denominator to left of the 29 = 15 (correct, since 2 * 15 = 1 mod 29.
@unminified
@unminified 11 жыл бұрын
Hello I was wondering what kind of program do you use for all of your videos to write on the computer? Thanks
@shanthakumar1833
@shanthakumar1833 5 жыл бұрын
Thanks a lot. Searching the answer for asymmetric key cryptography
@kingsleyobi7482
@kingsleyobi7482 5 жыл бұрын
Wonderful tutorial!!
@programjm
@programjm 3 жыл бұрын
What happens when the number and n are not coprime? I.e. the GCD is not 1. Would we have to divide by the gcd?
@adzplus1
@adzplus1 3 жыл бұрын
It did help to explain what the textbook had in written words and figures...but it is still difficult because you still have to go through all the numbers on the Euclidean algorithm to get to the bottom of this. So imagine if you have a gcd(80, 98) it would be endless!!
@Ringcaat
@Ringcaat 2 жыл бұрын
Nice video! I just wish you hadn't chosen an example where the quotient and remainder of the first division are both 14s. And then we have two 1's later on as well.
@louisaldorio7251
@louisaldorio7251 4 жыл бұрын
what if the place where 27 is changed to be larger than 392? is this still possible?
@VaibhavNaik26
@VaibhavNaik26 Жыл бұрын
is there an easier way? to find x? or the inverse of mod? please let me know
@EsteBandido_YT
@EsteBandido_YT 5 жыл бұрын
question, and a really big one. by the equal sign, you mean the congruence, correct?
@fkrtna
@fkrtna 6 жыл бұрын
Wish if I watched this b4 the exam!
@aadilmufti4933
@aadilmufti4933 6 жыл бұрын
Great explanation!
@YBStark
@YBStark 8 жыл бұрын
I could not apply this to 2 * x = 1 (mod5) could you show me how to do this ?
@professortiagosandino
@professortiagosandino 8 жыл бұрын
5=2x2+1 5+2(-2)=1 5+2(3)=1(mod 5) 2(3)=1(mod 5) regards from brazil
@YBStark
@YBStark 8 жыл бұрын
Thank you. That is very helpful.
@grevierx
@grevierx 8 жыл бұрын
can you explain how you got from 5+2(-2)=1 to 5+2(3)=1(mod 5)?
@professortiagosandino
@professortiagosandino 8 жыл бұрын
+grevierx 3+2 is congr to 0 mod 5, so 3 is congr to -2 mod 5. just pass to the other side.
@CashmereMercenary
@CashmereMercenary 10 ай бұрын
why did we use 2(14) rather than combine 14+14? kind of confused there
@tarirokahari6833
@tarirokahari6833 7 жыл бұрын
what if the multiplicative is negative and you would like it in the positive range
@CALLm151
@CALLm151 5 жыл бұрын
How to calculate 1/a mod m using only these operations: a^b mod m, a*b mod m, a+b mod m, a-b mod m ?
@okay6195
@okay6195 3 жыл бұрын
but what if the number isnt 1?
@gaoelnlaojehc8913
@gaoelnlaojehc8913 3 жыл бұрын
why underrated?
@rachelc1110
@rachelc1110 3 жыл бұрын
What if we substituted 27 with a number bigger than 392, for example 400?
Basics of Modular Arithmetic
18:39
SyberMath
Рет қаралды 88 М.
How to Multiply  in Modular Arithmetic - Cryptography - Lesson 5
7:36
Learn Math Tutorials
Рет қаралды 99 М.
I Sent a Subscriber to Disneyland
0:27
MrBeast
Рет қаралды 104 МЛН
УНО Реверс в Амонг Ас : игра на выбывание
0:19
Фани Хани
Рет қаралды 1,3 МЛН
Почему Катар богатый? #shorts
0:45
Послезавтра
Рет қаралды 2 МЛН
SLIDE #shortssprintbrasil
0:31
Natan por Aí
Рет қаралды 49 МЛН
Extended Euclidean Algorithm Example
14:50
John Bowers
Рет қаралды 322 М.
Number Theory | Inverses modulo n
8:02
Michael Penn
Рет қаралды 46 М.
Multiplicative inverses mod n
13:22
GVSUmath
Рет қаралды 170 М.
Modular exponentiation
11:37
GVSUmath
Рет қаралды 292 М.
Extended Euclidean Algorithm and Inverse Modulo Tutorial
6:00
Best Friends Farm
Рет қаралды 868 М.
Multiplicative Inverse of 3 (mod 26)
7:36
Maths with Jay
Рет қаралды 126 М.
Finding the Modular Inverse #numbertheory
8:11
Study Force
Рет қаралды 1,3 М.
The Dome Paradox: A Loophole in Newton's Laws
22:59
Up and Atom
Рет қаралды 444 М.
I Sent a Subscriber to Disneyland
0:27
MrBeast
Рет қаралды 104 МЛН