The Euclidean Algorithm: How and Why, Visually

Ғылым және технология

We explain the Euclidean algorithm to compute the gcd, using visual intuition. You'll never forget it once you see the how and why. Then we write it out formally and do an example.
This is part of a playlist on GCDs and the Euclidean algorithm:
• GCDs and Euclidean alg...

Пікірлер: 90

  • @et169tkm
    @et169tkm2 жыл бұрын

    Best explanation of the Euclid algorithm I found on KZread, gives me intuition instead of just describing how to compute it or proving it.

  • @ProofofConceptMath

    @ProofofConceptMath

    2 жыл бұрын

    Thank you!

  • @jaideepshekhar4621

    @jaideepshekhar4621

    Жыл бұрын

    Same. :)

  • @manarsalem1685
    @manarsalem168528 күн бұрын

    This was mind-blowing to watch. I'm amazed at how you could convey everything so neatly and clearly.

  • @navauchiha
    @navauchihaКүн бұрын

    This should be first hit for Euclidean algorithm

  • @stefanienix7447
    @stefanienix74472 жыл бұрын

    This is such a great video. I love how encouraging and soothing your voice is and I love that it has a handwritten vibe without doing that hand drawing the visuals that is in so many educational videos. All information flows so well that the only reason I'd rewatch is to notice what a great teacher you are. Thank you!

  • @fd93
    @fd932 жыл бұрын

    Please make more videos! This is an amazing explanation, I love that you're teaching it through using visuals :)

  • @akshatkalra4114
    @akshatkalra41142 жыл бұрын

    It's unassailably the most wonderful and comprehensive tutorial I've found on Euclidean Algorithm. I specially loved how you used the visual methods but also did not discount the mathy way of explaining things. Thank You, hope this reaches other people struggling to find the roots of this Euclidean algorithm.

  • @valeryjuli
    @valeryjuli2 жыл бұрын

    Thank you soo much for your videos! I always wanted to visually understand some math and algorithms but never found enough visual references on classic books, this is amazing :) Thanks!

  • @Frownlandia
    @Frownlandia2 жыл бұрын

    Oddly enough, I learned about the Euclidean algorithm through Stern's Diatomic array, where you can find any pair of coprime positive integers and trace a step-by-step path (that is equivalent to the Euclidean algorithm) through the array back to the pair 1, 1.

  • @ProofofConceptMath

    @ProofofConceptMath

    2 жыл бұрын

    Yes! These are very related ideas, and some of my favourites. I have a video on Lehmer's Factor Stencils that talks a bit about the Farey fractions and how it relates to continued fractions, which are really just a form of Euclidean algorithm.

  • @timetravellingblockhead2122
    @timetravellingblockhead2122 Жыл бұрын

    This is excellent for giving intuition, understanding AND the ability to actually use it, thank you.

  • @jaideepshekhar4621
    @jaideepshekhar4621 Жыл бұрын

    AMAZING explanation. I don't think I'll ever need to study Euclidean or Extended Euclidean again, because this will always remain in my mind. Thank you so much! :)

  • @akshat.jaiswal
    @akshat.jaiswal2 жыл бұрын

    Thanks! That's just the right type of video I was looking for. Keep up with the good work!

  • @kashikakhera9492
    @kashikakhera94929 ай бұрын

    This was very useful, appreciate the visuals you showed to prove, that was lacking in other videos that i saw. this will now stay in memory for long

  • @pectenmaximus231
    @pectenmaximus2312 жыл бұрын

    I really like your channel. Your method of exposition is exceptional.

  • @henrynwosu6277
    @henrynwosu62776 ай бұрын

    I wish I could say thank you in person. I am a Mechatronics Engineering Student and we are Studying the Routh-Hourwitz Criterion in Control Systems. I'm trying to understand this so I can understand the proof of the Routh-Hurwitz criterion better. I have to say, you are part of the people that make my degree worthwhile. Thanks so much for what you do. Thanks for not giving up on prooving mathematial facts. Thanks for not giving up on intuition. Thanks for not obscuring mathematical concepts . Thanks for making it accessible. Thank you. Thank you. Thank you !!!!😢😢😢😢😢😢😢.

  • @jathebest2835
    @jathebest2835 Жыл бұрын

    What a woman.. Your visual teaching with a concise explanation of voice literally broke the algorithm into every piece to be understood by everyone including me.. Thanks a lot from Korea.!

  • @luciepopova5907
    @luciepopova590710 ай бұрын

    Thank you, that was actually the visualization I needed to see to finally understand the logic of the Euclidean algorithm!

  • @ramkoduri9907
    @ramkoduri99072 жыл бұрын

    Really the best explanation. I wish this channel grows.

  • @bartomiejpotaman6973
    @bartomiejpotaman69734 ай бұрын

    Youre a wonderful teacher. I mean it. You made it very suggestive what the answer is so that I could come up with it myself. Brilliantly done and I bet you - now it is mine forever!

  • @hidrogenhelium7849
    @hidrogenhelium78492 жыл бұрын

    Nice, keep up the good work, hope this channel be great soon, Great explanation and even way to visual it

  • @lolkk9747
    @lolkk97472 жыл бұрын

    Such a good teacher! Seriously!

  • @kal8266
    @kal8266 Жыл бұрын

    Perfect Explanation, Thank you!

  • @stevecreighton3352
    @stevecreighton33522 жыл бұрын

    You are an inspirational teacher !

  • @carlosraventosprieto2065
    @carlosraventosprieto20657 ай бұрын

    I LOVED your video named rethinking the real line and now i saw this one and came in to your channel and saw that you are the same person!!! i didnt subscribe 3 months ago but i do now with a smile on my face :)

  • @kwazar374
    @kwazar374 Жыл бұрын

    Underrated video. Thanks a lot!

  • @TheWesternPrince
    @TheWesternPrince5 ай бұрын

    Amazing video! I personally think this explanation is much better than the ones shown on AwesomeMath L4

  • @yaronyahav656
    @yaronyahav65610 ай бұрын

    Excellent explanation. Thanks!

  • @Mark-nm9sm
    @Mark-nm9sm7 ай бұрын

    Thank you so much for making us think

  • @caiofernando
    @caiofernando11 күн бұрын

    Excellent video.

  • @mdaalishanraza3928
    @mdaalishanraza39282 жыл бұрын

    Very helpful video! thanks!

  • @ianweckhorst3200
    @ianweckhorst320010 ай бұрын

    Thank you so much for insisting that I figure it out myself, I didn’t get to do that for the quadratic formula, which I still don’t get and just memorize, I think this is what I wanted to do so long ago and I think this helped me go through those motions

  • @nourkhamis3931
    @nourkhamis39312 жыл бұрын

    really love it wish that you make more videos

  • @DL-re2mv
    @DL-re2mv Жыл бұрын

    best video on this topic by far

  • @brunilda
    @brunilda Жыл бұрын

    Oh. My. Goodness. You know, I studied a lot of math in college when I was young (Calc 1 & 2, Abstract Algebra 1 & 2, Linear Algebra, Functional calculus, etc., I can't even remember all the courses), so I am no patzer although I am not a professional mathematician... This BLEW MY MIND. THANK YOU. I love math.

  • @ShivamKumar-kd1ww
    @ShivamKumar-kd1ww2 жыл бұрын

    What a beautiful time to be alive.!

  • @vadrif-draco
    @vadrif-draco Жыл бұрын

    This is pretty visual and intuitive, thank you.

  • @vadrif-draco

    @vadrif-draco

    Жыл бұрын

    Bruh I was already impressed but then you went with the speed-up portion and took it to a new level of impressive!

  • @shubhankarkarn3747
    @shubhankarkarn37472 жыл бұрын

    Absolutely amazing😍

  • @ch1llp1ll43
    @ch1llp1ll432 жыл бұрын

    Thank you! This was really helpful :))

  • @viniciusfriasaleite8016
    @viniciusfriasaleite80162 жыл бұрын

    Looks like the pile B has 57 stones on the image... but that doesn't change the explanation, it's very good

  • @ProofofConceptMath

    @ProofofConceptMath

    2 жыл бұрын

    Oh! Well, 57 is divisible by 3, so the universe is not broken, I probably just counted wrong when labeling the picture... darn. It's so painful making mistakes in KZread videos because you can't fix them! :) Anyway, thanks for pointing that out.

  • @Jbortoletto
    @Jbortoletto2 жыл бұрын

    Awesome, thanks a lot!

  • @kiralight6825
    @kiralight6825 Жыл бұрын

    Amazing!

  • @a-n.o.n-y.m.o.u.s
    @a-n.o.n-y.m.o.u.s2 жыл бұрын

    Way to teach.❤

  • @naruhitoabiku9451
    @naruhitoabiku94515 ай бұрын

    you are a legend

  • @scollyer.tuition
    @scollyer.tuition2 жыл бұрын

    Minor point: in your discussion of the Division Algorithm, you need to use |a| rather than a, given that you're allowing a,b \in \mathbb{Z}

  • @AbjSir
    @AbjSirАй бұрын

    Thanks.

  • @alex_turing
    @alex_turing Жыл бұрын

    Thanks

  • @vickyli66
    @vickyli669 ай бұрын

    This is great. Wondering how did you come up with this way of visualizing and solving problems? Are there any references that you would like to share?

  • @estrom100
    @estrom10010 ай бұрын

    Nicely done! The only thing that initially confused me was the termination criterion in the game at the beginning. Should we stop when one pile is reduced to zero elements or when the piles have the same number of elements. (Both work, I guess, but the first rule is probably better as it correlates well with the Euclidean algorithm.)

  • @locopenguin6161
    @locopenguin61614 ай бұрын

    Amazing

  • @trampflips101
    @trampflips10110 ай бұрын

    Hopefully someone can explain this in an intuitive way, but why is the remainder the next candidate for the GCD? How do we know we didn't skip some number n which is remainder < n < smaller number?

  • @md.arifulislamroni2946
    @md.arifulislamroni2946Ай бұрын

    love it;❤

  • @wowashlam
    @wowashlam2 жыл бұрын

    you are great. i love you

  • @kaleabtadewos9344
    @kaleabtadewos9344 Жыл бұрын

    perfecto !!!

  • @Viral_vittles
    @Viral_vittles Жыл бұрын

    Prayers ....

  • @SirTravelMuffin
    @SirTravelMuffin2 жыл бұрын

    I finally get it!

  • @compucademy
    @compucademy3 жыл бұрын

    To do this you have to know what the gcd is in advance, and this is just confirmation it seems. My challenge is how to show visually what d (an arbitrary divisor of both numbers) can be when we don't know in advance. Sure if we know for example that two is a common divisor we can group everything in 2s, but how do you represent grouping everything in a arbitrary group size, until the gcd, or any common factor for that matter, is found?

  • @ProofofConceptMath

    @ProofofConceptMath

    3 жыл бұрын

    Interesting question. The algorithm has to "discover" what the gcd is, so there can't really be a way to see the gcd until after the algorithm plays out (unless, as you say, we guess it in advance). There is another interesting way to do the algorithm by nesting squares in a rectangle (you'll find videos of it on KZread and I might make a video about it too). This has the advantage that the entire algorithm is contained in one picture (instead of a series of steps like in my video above). So in some sense the gcd is shown in that picture.

  • @anothermoth

    @anothermoth

    2 жыл бұрын

    Play the video backwards. If the algorithm ended with pile A = pile B, then everything that was deleted was built out of copies of that final pile size too, so that final size must be a divisor of both original piles. It's less obvious to me that the common divisor found must be the largest one.

  • @jaideepshekhar4621

    @jaideepshekhar4621

    Жыл бұрын

    Well, we ARE just "confirming" the gcd when we compute it. It already exists!

  • @brunilda

    @brunilda

    10 ай бұрын

    Hmm. Well, this is just designed to show why the algorithm works (essentially because, by definition, call gcd(a,b)=g, both a and b are composed of "a number of whole groups containing g number of elements" (so to speak), so all the time you are subtracting things that come in groups of g elements from things that come in groups of g elements, so obviously you always end up with a smaller thing that comes in groups of g elements). You certainly do not need to know the gcd beforehand to apply the algorithm

  • @lp9931
    @lp99312 жыл бұрын

    Great vid! Just a question though. Wouldn't the assumption be that gcd(a,b) = gcd(a,b-na) instead of gcd(a,b) = gcd(a,b-a) since you are subtracting a multiple, n of a from b instead of just subtracting 1*a from b?

  • @lp9931

    @lp9931

    2 жыл бұрын

    Sorry didnt watch till end of vid where you explain this. My bad

  • @marcvanleeuwen5986
    @marcvanleeuwen598610 ай бұрын

    This is a nice explanation and beautifully illustrated. However, since I am a mathematician myself, I cannot help but to pick some nits. You might have mentioned that the original version, with just subtraction and stopping when both piles are of equal size, is the original version by Euclid. Because despite it being named after him, Euclid did not use Euclidean division in his description of his algorithm. And he did not stop at 0 because the Greeks did not have 0. Going to your description of the slow version (7:56), as we _do_ know about 0 and negative numbers, and your preceding statement explicitly allows any values in Z, I thought you should have been more specific than the ordering condition (1): you should also state the a (and therefore b as well) is _positive_ (it is interesting to see what happens when this is violated, but it is not a pleasant sight). And I found it a pity that your termination condition is not kept to be a=b as it was before, as this makes step (2b) unambiguous (as you stated it, one might or might not want to swap two equal values, even though it clearly makes no difference) and also step (3) easier: when a=b, the gcd is a (and also of course b). And you don't need to mention zero, just like before. Besides, your rules do not take heed of the fact, obvious from inspection, that any (first) occurrence of zero must be in the second position. I think that the only reason to introduce these changes is anticipation of the speedier version, since Euclidean division as usually defined has a hard time hitting the case a=b on the head (since the remainder must be strictly less than the divisor). The fact that now any zero clearly goes to the _second_ place confirms my suspicion that the earlier version was already formulated with this change in mind. That seems to me to be pedagogically a bad choice; I always get thrown off my understanding of an argument when suddenly it gets too slick, especially if that slickness is not announced or explained. The condition a>0 is also conspicuously absent in your statement of the (Euclidean) Division Algorithm, making it false.

  • @ahmadag1820
    @ahmadag18202 күн бұрын

    our explanations are similar except I cut the box Into Identical sections

  • @timothylei7558
    @timothylei7558 Жыл бұрын

    starts from 7:19 a bigger problem gcd(a,b) -->gcd(b, a-b) according to your algorithm, but you put gcd(a, a-b).

  • @sahilsharmahere
    @sahilsharmahere2 жыл бұрын

    Euclid from the heavens: Ohh mistress with a beautiful soul, may god blesseth thee.

  • @pedrorivera4405
    @pedrorivera44052 жыл бұрын

    Basic question: What is the operator / symbol "|" displayed in the proof at 13:20?

  • @pedrorivera4405

    @pedrorivera4405

    2 жыл бұрын

    Ok found the answer later in the video. a | b means a is an integer divider of b.

  • @ProofofConceptMath

    @ProofofConceptMath

    2 жыл бұрын

    @@pedrorivera4405 You are correct! (I think the timestamp is closer to the 7-8 minute mark?)

  • @anabhayansp3696

    @anabhayansp3696

    Жыл бұрын

    @@pedrorivera4405 I had the same doubt, thank you !

  • @goldenboy7697
    @goldenboy76977 ай бұрын

    You showed a visual proof with the triangles showing that it leaves 3 if the gcd is 3 never breaking part the groups which the amount would be the gcd, but I still dont understand why that works or happens, you just showed that it did, but i don't understand why subtracting it from each side leaves the gcd.

  • @cellmaker1
    @cellmaker15 ай бұрын

    Great stuff. However, it would have been useful to show an example where there are no common factors except for 1.

  • @robinpettit7827
    @robinpettit78272 жыл бұрын

    Rather than the division algorithm you might want to introduce the modular algorithm.

  • @klevisimeri607
    @klevisimeri6075 ай бұрын

  • @klevisimeri607

    @klevisimeri607

    5 ай бұрын

    This is the first explanation I have seen that describes the deeper understanding. Plus voice is very calm.

  • @hannesstark5024
    @hannesstark50243 жыл бұрын

    I think you have a typo: the 5 in the factorization of b should have exponent 3 not 2 :D

  • @hannesstark5024

    @hannesstark5024

    3 жыл бұрын

    And lovely video!

  • @ProofofConceptMath

    @ProofofConceptMath

    2 жыл бұрын

    @@hannesstark5024 Thank you! I'm sorry about the typo -- you are right about that!

  • @BestHolkin
    @BestHolkin2 жыл бұрын

    I see the proof for a common divisor, but where is the proof it is a largest possible common divisor?

  • @jaideepshekhar4621

    @jaideepshekhar4621

    Жыл бұрын

    Well, if you look, we diminish the piles until we've found the first number that divides both of them. If you proceed in the algorithm, you will only get smaller divisors, and hence, the first number you get is the largest divisor. Note that 1 marble is also a divisor, but we stopped at 3 first.

  • @BestHolkin

    @BestHolkin

    Жыл бұрын

    @@jaideepshekhar4621 But why we are sure that the first numbers we get is indeed the highest? Maybe there is another value we have never seen?

  • @harshitpandey3245

    @harshitpandey3245

    3 ай бұрын

    @@BestHolkin Exactly the same thought! Glad someone said it!

  • @cursedswordsman
    @cursedswordsman2 жыл бұрын

    Makes no sense. Not clear at all why there aren't two groups of 3 remaining in the end, for example.

  • @jaideepshekhar4621

    @jaideepshekhar4621

    Жыл бұрын

    Why would there be 2 groups of 3 in the end? The pattern is still there, and can be removed.

  • @steveglemaud3459
    @steveglemaud34593 ай бұрын

    I don't understand shit she said . 😅

  • @joeindia1647
    @joeindia16472 жыл бұрын

    Thanks.

Келесі