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
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.
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.
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.
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.
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.
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 ?
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).
@@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.
(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
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
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€
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!
(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²
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.
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 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.
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
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.
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.
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.?
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 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 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.
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?
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.
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)
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)
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.
Corrrection
x= q^2 - p^2
y=2pq
z=q^2 + p^2
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.
@@MichaelPennMath Have you made a fixed video yet?
@@ThainaYu He's into a whole new Number Theory series now. Check his main page under Playlists for Number Theory v2.
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
Primitive triangle 1 4 3 is revolutionary!
You are a good teacher, in spite of my bad English, I understand you.
This channel is wonderful! Keep up the great work! Thank you from England!
@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
You are totally right. I made this mistake at the very end. Ooops!
Professor Penn, thank you for an incredible lecture on the Pythagorean Triples.
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.
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.
this could be more straight forward since we only need to consider the basic properties and operation of gcd
Thanks. I was wondering about how i could prove that 😊
thank you - great pace, eminently clear
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.
a,b,c, are positive integers. If a2
+b2=c2 then (a,b,c) are said to be “Pythagorean
triplet
Also:
73² - 48² = 55² not 53², as expected from 64 - 9 = 55.
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.
Thanks! Finally can solve a question that involves this concept.
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.
Such a hardcore mathematician that he got a “>” scarified in his elbow!
Small correction: Theorem: If (x,y,z) is a primitive Pythagorean triple with y is even then there exists …
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.
Thank you so much! great explanation.
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 ?
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).
@@MichaelPennMath Thank you !
@@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.
(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
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'
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
Thanks now all clear about this concept
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)
thank you for your awesome explanation, its really help me sir🙏
Well, I think you should add that q>p and they are of opposite parity.
Any odd from 3 to the infinity is a part of pythagorean triples.
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
can someone explain at 15:44 why it follows that m and n have to be squares?
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€
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!
@@BeugenNinja Thank you that clears things up.
@@kazebaret Yes that was very helpful.
If there are no common factors other than 1 among a,b,c then the triplet (a,b,c) is
called “primitive triplet”.
Really helpful
Thanks!
Well explained 👏👏
Can you do a video on how to get solutions for x^3+y^3=u^3+v^3 ?
It's super easy! The solution is x = u, y = v ;)
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
Statement says one even, one odd.
Great job . Though I think triplet is the correct word and not triple
(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²
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.
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.
@@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.
@@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.
@@zanti4132 well done
(55,48,73)
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
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
It works if it concerns a pythagorian tiple.
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)
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!
@@user-ds6jv5jf5o N^3 is shorthand for NxNxN. You could also write (x,y,z) in (N,N,N).
@@user-ds6jv5jf5o I agree
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.
Did anyone else think the opening blackboard scene looks like the cosmic background radiation map.
It actually is the CMB map
What does N^3 mean?
WTH? Gives you ALL of them if you put them on a spreadsheet. Thats nuts!
Z-X=p²+q²+p²-q²=2p²
You can tell at a glance if a triple is good. Crazy.
I like the proof using gaussian integers - it's more elegant from my perspective :)
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!
how do you get x=q-p and z=q+p, what is happening there?17:25
What do p and q represent on the corresponding right triangle?
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.
clomp clomp clomp clomp clomp cleat cleat clomp
"ok, in this video.."
check the method in the video to find all pythagorean triples
ua-cam.com/video/6txKnwphALg/v-deo.html
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.?
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.
@@nosignal5804 What means "primitive pythagorean triple"?
@@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.
@@nosignal5804 is "9" common factor?
@@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.
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?
q=4
p=1
x=15
y=8
z=17
Conjecture: either z-x or z-y is a power of two.
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.
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)
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)
@@ribhuhooja3137 Great explanation. Thank you so much.
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.