Number Theory | Primitive Pythagorean Triples

Поділитися
Вставка
  • Опубліковано 6 вер 2024
  • We derive the structure of all primitive Pythagorean triples.

КОМЕНТАРІ • 105

  • @skwbusaidi
    @skwbusaidi 4 роки тому +217

    Corrrection
    x= q^2 - p^2
    y=2pq
    z=q^2 + p^2

    • @MichaelPennMath
      @MichaelPennMath  4 роки тому +70

      I know, at the very end I forgot to write exponents. This will be a video that I re-do next time I teach Number Theory.

    • @ThainaYu
      @ThainaYu 3 роки тому +2

      @@MichaelPennMath Have you made a fixed video yet?

    • @Qermaq
      @Qermaq 2 роки тому +4

      @@ThainaYu He's into a whole new Number Theory series now. Check his main page under Playlists for Number Theory v2.

    • @binaroth9665
      @binaroth9665 2 роки тому

      wait i am quite perplexed at the ending. upon plugging in the p/q's values as 1 and 2 into the x+y=z equation, the solution was not 3,4,5. perhaps I am calculating this wrong. can you elaborate how to plug in the p/qs into the equation? thank you

    • @timsim83
      @timsim83 Рік тому +2

      Primitive triangle 1 4 3 is revolutionary!

  • @user-gk7kv8oc8x
    @user-gk7kv8oc8x 3 роки тому +5

    You are a good teacher, in spite of my bad English, I understand you.

  • @edwardhartz1029
    @edwardhartz1029 3 роки тому +4

    This channel is wonderful! Keep up the great work! Thank you from England!

  • @den1fednu
    @den1fednu 4 роки тому +20

    @17:55 instead of x=q-p and z=p+q it should be x=q^2-p^2 and z=p^2+q^2

    • @MichaelPennMath
      @MichaelPennMath  4 роки тому +11

      You are totally right. I made this mistake at the very end. Ooops!

  • @georgesadler7830
    @georgesadler7830 2 роки тому +3

    Professor Penn, thank you for an incredible lecture on the Pythagorean Triples.

  • @NegenTropist
    @NegenTropist 2 роки тому +11

    The elements of ANY primitive pythagorean triple with gcd(x,y,z)=1, MUST be pairwise co-prime, ie gcd(x,y)=1, gcd(x,z)=1 and gcd(z,y)=1
    To prove this, let a primitive pythagorean triple (x, y, z), so that x^2 + y^2 = z^2 .
    If a prime, p, divides any two of x , y or z, then it must also divide the third one, because,
    p|x and p|z ==> x = mp and z = np
    and therefore y^2 = z^2 - x^2 ==> y^2 = n^2 p^2 − m^2 p^2 = (n^2 − m^2) p^2
    From above: p^2 | y^2 and so p | y which leads to a contradiction, because in this case triple (x, y, z) is not primitive, since x, y and z have a common factor p.
    Similarly, for the other pairs (x,y) and (z,y)
    Therefore, the elements of the primitive triple (x,y,z) ARE pairwise co-prime.

    • @jasonzhang3024
      @jasonzhang3024 Рік тому

      another way to approach such conclusion could be gcd(x^2,y^2)=gcd(z^2,y^2)=gcd(z^2,x^2) hence gcd(x,y)=gcd(z,y)=gcd(z,x).Therefore, since ((x,y),(y,z))=(x,y,z) and we already have (x,y)=(y,z), we can conclude that x,y,z must be pairwise co-prime.

    • @jasonzhang3024
      @jasonzhang3024 Рік тому

      this could be more straight forward since we only need to consider the basic properties and operation of gcd

    • @anonymouskumar8576
      @anonymouskumar8576 4 місяці тому

      Thanks. I was wondering about how i could prove that 😊

  • @robertingliskennedy
    @robertingliskennedy 4 роки тому +7

    thank you - great pace, eminently clear

  • @PunmasterSTP
    @PunmasterSTP 3 роки тому +4

    Another wonderful video, and thanks for posting! I'd be interested if you ever make a corrected version, as I'd sharing a link to it if any of my friends happen to have questions about this material.

  • @atramcharan8b967
    @atramcharan8b967 2 роки тому +4

    a,b,c, are positive integers. If a2
    +b2=c2 then (a,b,c) are said to be “Pythagorean
    triplet

  • @pietergeerkens6324
    @pietergeerkens6324 4 роки тому +9

    Also:
    73² - 48² = 55² not 53², as expected from 64 - 9 = 55.

  • @faustobarbuto
    @faustobarbuto Рік тому +1

    Excellent video.
    The explanation that runs from 6:30 to 8:15 could be carried out in another way. Since z² is clearly even, it could be written as (2c)² = 4c² and therefore:
    4(a² + b² + a + b) + 2 = 4c²
    Dividing the expression above by two, comes:
    2(a² + b² + a + b) + 1 = 2c²
    The RHS is *even*, whereas the LHS is *odd*. Therefore, right triangles with integer sides and odd catheti cannot exist.

  • @abhimanyugupta2986
    @abhimanyugupta2986 2 роки тому +1

    Thanks! Finally can solve a question that involves this concept.

  • @Tiqerboy
    @Tiqerboy 4 роки тому +4

    One thing I noticed from all that, not only does y have to be even (when x is odd) it also has to be divisible by 4.

  • @JonathonV
    @JonathonV 4 роки тому +5

    Such a hardcore mathematician that he got a “>” scarified in his elbow!

  • @adem8440
    @adem8440 25 днів тому

    Small correction: Theorem: If (x,y,z) is a primitive Pythagorean triple with y is even then there exists …

  • @BlackEyedGhost0
    @BlackEyedGhost0 Рік тому

    A good way to remember this algorithm is (q+ip)² = q²-p² + i(2qp) and |(q+ip)²| = q²+p², so squaring a complex number gives you a Pythagorean triple, and if both the real and imaginary parts are coprime with q>p>0, then you'll get a primitive triple.

  • @eltongarcia6105
    @eltongarcia6105 3 роки тому +2

    Thank you so much! great explanation.

  • @egillandersson1780
    @egillandersson1780 4 роки тому +8

    I am viewing all your number theory videos (and put a blue thumb for each)
    These formulas give us some primitive Pythagorean triplets, but do they give all of them ?

    • @MichaelPennMath
      @MichaelPennMath  4 роки тому +10

      These give all "primitive" Pythagorean triples. All others are "decedents" of these. For example (3,4,5) is a primitive Pythagorean triple, but (6,8,10) is one of its non-primitive decedents. Notice (6,8,10)=(2*3,2*4,2*5).

    • @egillandersson1780
      @egillandersson1780 4 роки тому +1

      @@MichaelPennMath Thank you !

    • @Tiqerboy
      @Tiqerboy 4 роки тому +4

      @@MichaelPennMath I think as long as p and q are mutually prime with q > p and one of these has to be even, then x, y and z have to be and in that way, you can calculate all the primitive triples from this formula.
      For example q = 5, p = 3 doesn't give you a primitive triple. but q = 5, p = 2 will.
      From this you can write a computer program to generate just primitive triples for as long as you need.

  • @pietergeerkens6324
    @pietergeerkens6324 4 роки тому +1

    (x,y,z) a primitive Pythagorean triple => gcd(x,y,z) = 1.
    Where did we assume gcd(x,z) = 1 (at 14:46)?
    Surely it wouldn't take too long to explicitly infer:
    d = gcd(x,z)
    => d | x² and d | z²
    => d | (z² - x²) = y²
    => d | y²
    => d | y
    => d | gcd(x,y,z) = 1
    => d = 1

  • @andrewk7660
    @andrewk7660 3 роки тому +2

    Can someone explain why at 15:00 d|x ?
    EDIT: i generally didn't understand what happened in the last 2 steps on that panel, or the 'secret trick'

    • @Alex_Deam
      @Alex_Deam 2 роки тому +1

      If d|m and d|n, then not only does d|(m+n) (as he wrote on the board), but also d|(n-m) (which he forgot to write). But n-m=x, therefore d|x.
      As for the trick, if d|z and d|x then we can write z=da and x=db for some natural numbers a and b. Sub them into the pythag equation and you get: (db)^2 + y^2 = (da)^2 and rearranging y^2 = (da)^2 - (db)^2 = (d^2)(a^2 - b^2) which means d|y. But this violates the assumption that gcd(x,y,z) = 1, since now d is a factor of all three. It's just like the step earlier where he showed x and y couldn't be even, the same argument works for any factor and to any pair from x, y and z i.e. gcd(x,y,z)=gcd(x,y)=gcd(x,z)=gcd(y,z)=1

  • @msislam6751
    @msislam6751 3 роки тому +1

    Thanks now all clear about this concept

  • @vishalmishra3046
    @vishalmishra3046 Рік тому

    At 3:25 More simply gcd(x,y) = 1 (No need to include z due to the definition of z i.e. z^2 as sum of square of x and y)

  • @nurularafah6353
    @nurularafah6353 10 місяців тому

    thank you for your awesome explanation, its really help me sir🙏

  • @msislam6751
    @msislam6751 3 роки тому

    Well, I think you should add that q>p and they are of opposite parity.

  • @mikhailkotsarenko6002
    @mikhailkotsarenko6002 6 місяців тому

    Any odd from 3 to the infinity is a part of pythagorean triples.

  • @mismis3153
    @mismis3153 2 роки тому

    I like to prove this with complex numbers.
    Take (a+bi)^2
    (a+bi)^2 = a^2 - b^2 + i(2ab)
    Real part : a^2 - b^2
    Imaginary part : 2ab
    lenght : a^2 + b^2

  • @user-ey2np8ff8k
    @user-ey2np8ff8k 4 роки тому +3

    can someone explain at 15:44 why it follows that m and n have to be squares?

    • @BeugenNinja
      @BeugenNinja 4 роки тому +5

      you can write down k so that mn = k^2 = a(1)^2 * ... * a(n)^2 for some a(i)€N that are relatively prime with each other
      and since the gcm(m,n)=1, each a(i) can only be in one of those two numbers (m or n)
      so you can rearrange the numbers so that
      m = a(1)^2 * ... * a(k)^2 and
      n = a(k+1)^2 * ... * a(n)^2
      for some k€

    • @kazebaret
      @kazebaret 4 роки тому +2

      When you have a product m*n, any product, you can have that:
      1) m is a square, n is not (or viceversa): if this is the case, m*n is not a perfect square (mn != k^2) because, if you take the square root, you are left with sqrt(n), which is not an integer.
      2) m is a square, n is a square: in this case, the product is a square as well, and satisfies the equation m*n = k^2, as in Penn's case.
      3) m is not a square, n is not a square: in this case, the only way to satisfy mn = k^2 is if m and n have gcd(m,n) >1. For example, m=2, n=8: they are not squares, but their product is 16 = 4^2. The same applies to m=3 and n=27, or m=2 and n=18, and so on: they all have a gcd(m,n) >=2. When he demonstrated that gcd(m,n) = 1, he basically ruled out this case (m and n not squares), and the only possible case that is left that satisfies mn=k^2 is m=p^2, n=q^2.
      I hope it helped!

    • @user-ey2np8ff8k
      @user-ey2np8ff8k 4 роки тому +1

      @@BeugenNinja Thank you that clears things up.

    • @user-ey2np8ff8k
      @user-ey2np8ff8k 4 роки тому

      @@kazebaret Yes that was very helpful.

  • @atramcharan8b967
    @atramcharan8b967 2 роки тому

    If there are no common factors other than 1 among a,b,c then the triplet (a,b,c) is
    called “primitive triplet”.

  • @hierkonnteihrewerbungstehe6847
    @hierkonnteihrewerbungstehe6847 4 роки тому +2

    Really helpful

  • @Pes_10R7
    @Pes_10R7 Рік тому

    Well explained 👏👏

  • @gnaveenk
    @gnaveenk 4 роки тому +2

    Can you do a video on how to get solutions for x^3+y^3=u^3+v^3 ?

    • @emiltonklinga3035
      @emiltonklinga3035 4 роки тому +6

      It's super easy! The solution is x = u, y = v ;)

  • @diogosilva27
    @diogosilva27 2 роки тому

    Thank you for the video
    Question - if p and q are co prime but both odd it doesn’t seem to generate a primitive triple
    Example 3,1 leads to 8,6,10

  • @venky30111
    @venky30111 11 місяців тому

    Great job . Though I think triplet is the correct word and not triple

  • @chaparral82
    @chaparral82 3 роки тому +2

    (2,5) leads to 20² + 21² = 29² which brings me to the question: How many "nearly" quadratic triples exist where b-a = 1. That leads to the condition that 2p²-1 or 2p²+1 has to be a perfect square. In this case: 2² +1 = 3² and therefore q = 2 + sqrt ( 2+2² +1 ) = 5. Is there an upper bound for such "nearly" quadratic triples?
    In fact, triples a²+b²=c² where b + 1 = c are very frequent, but where a+1 = b seem to be very seldom. In fact I do not know a bigger one than 20² + 21² = 29²

    • @Qermaq
      @Qermaq 3 роки тому +2

      They are infinite. If y = x +/- sqrt(2x^2 + 1) then it happens that (y^2 - x^2) -1 = 2xy. If x = 2 and y = 5, we get 20 and 21. 12 and 29 will get you legs 696 and 697. 70 and 169 work too, etc etc.

    • @zanti4132
      @zanti4132 3 роки тому +3

      The numbers to generate these triples form a neat, Fibonnacci-like sequence: (2,5), (5,12), (12,29), (29,70), etc., where if (m,n) is a solution, the next one is (n, m+2n). It is worth noting the ratio of the two numbers approach √2 + 1.

    • @chaparral82
      @chaparral82 3 роки тому +1

      @@zanti4132 Thank you very much: Did you finde out for yourself or is it a well known relation? In fact with the help of google I did not find out.

    • @zanti4132
      @zanti4132 3 роки тому +3

      @@chaparral82 I'd imagine the pattern is mentioned in some books, although it doesn't seem to be well-known. I found it on my own while in high school by kind of backing into it - I found the first three triples where the legs differed by 1 using the generator, then noticed the similarity of the sequence 1, 2, 5, 12 to a standard Fibonnaci sequence. So I guessed 29 would come next and discovered (12, 29) did give the next triple in this pattern.

    • @chaparral82
      @chaparral82 3 роки тому

      @@zanti4132 well done

  • @udic01
    @udic01 4 роки тому +4

    (55,48,73)

  • @ogglieostrich2574
    @ogglieostrich2574 3 роки тому +1

    I am confused about why gcd(x,z) = 1.
    gcd(x,y,z) = 1 but that doesnt mean gcd(x,z) = 1
    e.g.
    gcd(3,2,9) = 1
    gcd(3,9) = 3

    • @maruferieldelcarmen9573
      @maruferieldelcarmen9573 3 роки тому +3

      yea he skipped that a bit
      and you're right, gcd(x,y,z) = 1 doesn't imply gcd(x,z) = 1
      the missing piece is the fact that they supposedly form a primitive pytha. triple
      assume first that d = gcd(x,z) ≠ 1
      then x = ad and z = bd
      from the pytha. relation:
      y² = z² - x² = b²d² - a²d² = d²(b² - a²)
      thus, d² | y² or d | y
      but since d | y, then it violates gcd(x,y,z) = 1, because there exists d > 1 that divides all x, y, z
      i.e. gcd(x,y,z) ≥ d ≠ 1

    • @mystychief
      @mystychief 3 роки тому +1

      It works if it concerns a pythagorian tiple.

  • @ribhuhooja3137
    @ribhuhooja3137 4 роки тому +1

    What does the N-cubed at the very start mean( in "x,y and z in N cubed, where N is the set of natural numbers)

    • @onealjerry
      @onealjerry 4 роки тому +1

      It means that x is in N, y is in N, and z is in N. N^3 is shorthand for N * N * N. I hope this helps!

    • @onealjerry
      @onealjerry 3 роки тому +1

      @@user-ds6jv5jf5o N^3 is shorthand for NxNxN. You could also write (x,y,z) in (N,N,N).

    • @msislam6751
      @msislam6751 3 роки тому

      @@user-ds6jv5jf5o I agree

    • @ogglieostrich2574
      @ogglieostrich2574 3 роки тому

      Realistically it makes sense. For very large groups you would sometime have to write (N,N,... with 20 or so Ns which is ridiculous. The notation looks weird at first but makes sense since N is a set and can't be cubed so simply. The way of expressing what you think N^3 looks like is { x^3 | x ∈ N } which is easily distinguishable and won't cause confusion once you learn it.

  • @davidbrisbane7206
    @davidbrisbane7206 4 роки тому +1

    Did anyone else think the opening blackboard scene looks like the cosmic background radiation map.

    • @malawigw
      @malawigw 4 роки тому

      It actually is the CMB map

  • @user-zl8nh1bp6e
    @user-zl8nh1bp6e 3 роки тому +1

    What does N^3 mean?

  • @deltalima6703
    @deltalima6703 2 роки тому

    WTH? Gives you ALL of them if you put them on a spreadsheet. Thats nuts!

    • @deltalima6703
      @deltalima6703 2 роки тому

      Z-X=p²+q²+p²-q²=2p²
      You can tell at a glance if a triple is good. Crazy.

  • @IoT_
    @IoT_ 4 роки тому +1

    I like the proof using gaussian integers - it's more elegant from my perspective :)

  • @KipIngram
    @KipIngram 2 роки тому

    17:40 - Oh, no man. q+p, not p+q. It just screams out to be x=q-p, z=q+p. Symmetry for the win!

  • @RayOne8
    @RayOne8 3 роки тому

    how do you get x=q-p and z=q+p, what is happening there?17:25

  • @eukleidesk6759
    @eukleidesk6759 3 роки тому

    What do p and q represent on the corresponding right triangle?

    • @Qermaq
      @Qermaq 3 роки тому

      They aren't really represented in the triangle, but one interesting fact is that assuming q>p, atan(p/q) is half the measure of the smallest angle of the right triangle.

  • @mtslybot78
    @mtslybot78 4 роки тому

    clomp clomp clomp clomp clomp cleat cleat clomp
    "ok, in this video.."

  • @widscience2373
    @widscience2373 3 роки тому

    check the method in the video to find all pythagorean triples
    ua-cam.com/video/6txKnwphALg/v-deo.html

  • @jarikosonen4079
    @jarikosonen4079 3 роки тому

    So this means there is no pythagorean triples that are all primes (p1, p2, p3)...
    Also q=6, p=3 giving (27, 36, 45) = 9 * (3, 4, 5) [is not primitive?]
    Is it possible somehow to modify the derivation to remove also multiples of 9, 25, etc.?

    • @nosignal5804
      @nosignal5804 3 роки тому

      No, there is no prime pythagorean triples; (As we know one of them is even).
      Note that for the triple to be primitive, p and q must be coprime, and of opposite parity.
      In your example they're not coprime, they share a common factor of 3.

    • @jarikosonen4079
      @jarikosonen4079 3 роки тому

      @@nosignal5804 What means "primitive pythagorean triple"?

    • @nosignal5804
      @nosignal5804 3 роки тому

      @@jarikosonen4079 Haven't you watched the video? He explains it at 2:57.
      A pythagorean triple is said to be primitive if x,y,z don't share a common factor.

    • @jarikosonen4079
      @jarikosonen4079 3 роки тому

      @@nosignal5804 is "9" common factor?

    • @nosignal5804
      @nosignal5804 3 роки тому

      @@jarikosonen4079 In your example: Yes, (27,36,45) share a common factor which is 9, so (27,36,45) is not a primitive triple.
      Note that when you divide each of them by 9 you get (3,4,5) which is a primitive triple, because because they do not share a common factor.

  • @nikitakipriyanov7260
    @nikitakipriyanov7260 4 роки тому +1

    1. Call all primitive Pythagorean triples be generated this way? Could the derivation itself serve as a proof by a contradiction, i. e. suppose we have a triple we don't generated by the enumeration of all possible p and q, let's calculate which p and q produce that triple and have a contradiction?
    2. gcd(3,5)=1, but it gives a triple (16, 30, 34) which is not primitive. It is easy to see if both p and q are odd you'll get a non primitive triple.
    Nowhere in the derivation of the formula we had a requirement that one of them has to be even, the only requirement is their relative primeness, stated at 16:00 as a consequence of their squares m and n being relative primes. Also we never encounter a statement about oddness of m and n. We only have 2m=z-x and 2n=z+x, m and n are arbitrary naturals at 11:20.
    This has to be sorted out some way. I only noticed this additional requirement p and q have to be of different oddness for generated triple to be primitive. Could there be another caveats like this, for example, suddenly triple appears as divisible by 3?

  • @ilyanus
    @ilyanus 4 роки тому

    q=4
    p=1
    x=15
    y=8
    z=17

  • @JCCyC
    @JCCyC Рік тому

    Conjecture: either z-x or z-y is a power of two.

  • @David-km2ie
    @David-km2ie 4 роки тому

    I do see a logical failure when generating the triples.
    The theorem says: x,y,z is a primitive pythagorian triple implies there exist p,q satisfying the conditions.
    This does not say:
    For all p,q satisfying the conditions, the corresponding x,y,z is a primitive pythagorian triple.

    • @ribhuhooja3137
      @ribhuhooja3137 4 роки тому +1

      Actually, it does. To prove that, we simply have to prove that for any co-prime p and q of opposite parity, the x,y and z given by the formula is a pythagorean triple and it is primitive.
      The first part: You can see by algebraically expanding that (q^2 - p^2)^2 + (2qp)^2 is indeed equal to (q^2 + p^2)^2
      Now to prove that x,y and z are co-prime. I will only prove it for y and z, you can see for yourself that x and y and z and x are also coprime. Notice that if any two of them are relatively prime, the gcd of all 3 will be 1. Thus, proving 2 of them are coprime suffices.
      y = 2qp and z = q^2 + p^2. Assume that y and z have a common divisor d ie d|y and d|z. d cannot be 2, because z is odd (since one of q square or p square is even while another is odd). Thus either d|p or d|q. This implies that d divides one of p-square or q-square. But, since z is a multiple of d and one of p^2 or q^2 is a multiple of d, the other one must also be a multiple of d.
      Since p and q are interchangeable, assume d|p -> d|p^2 -> p^2 = da for some a and z = db. da + q^2 = db. That implies q^2 = db - da = d(b - a) and is thus a multiple of d.
      This contradicts the condition that p and q are coprime, therefore, our assumption that y and z have a common factor must be untrue, therefore the Pythagorean triple generated by this formula must be primitive.
      (Note: The same reasoning can be done for y and . For x and z, you can prove it by taking q^2 as a and p^2 as b, and then proving that if a-b and a+b have a common factor d, then d must also divide a and b and is thus a common factor of a and b, thus p and q are not coprime, leading to a contradiction)

    • @ribhuhooja3137
      @ribhuhooja3137 4 роки тому +1

      As a proof of the proposition I gave in the end,take a and b are coprime and have opposite parity ie one is odd, the other is even.
      Assume that there is a d such that d divides a+b and d divides a-b. since both of these are odd, d must also be odd since an even number cannot divide an odd number. Thus, dm = a+b and dn = a-b. Add them. d(m+n) = 2a => d divides 2a. Since d does not divide 2, it must divide a.
      Now, subtract them. d(m-n) = 2b. By the same logic as before, this implies that d divides b. That is a contradiction. Therefore no such d can exist.
      (note: this does rely on the fact that one of a and b is odd and the other even. However, that is also a condition for p and q and therefore p^2 and q^2, which are the a and b that we are taking)

    • @user-xm9xo7jg4u
      @user-xm9xo7jg4u 3 роки тому

      @@ribhuhooja3137 Great explanation. Thank you so much.

  • @perrymartin1771
    @perrymartin1771 10 місяців тому +1

    How disappointing. There is a pythagorean triple for every (x,y) where x,y are positive integers. If x and y are relatively prime then the triple is primitive.They are found with simple algebra. Need to review Euclid's Elements. I expected more.