Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am interested in the algebraic/geometric way of finding the pythagorean triplets such that

$$a^2 + b^2 = c^2$$

$$a + b + c = 1000$$

I do the obvious

$$a + b = 1000 - (a^2 + b^2)^{1/2}$$

$$a^2 + b^2 = 1000^2 -2(1000)a - 2(1000)b +2ab + a^2 +b^2$$

$$2a + 2b - \frac{2ab}{1000} = 1000$$

$$a + b -\frac{ab}{1000} = 500$$

I have no idea what to do at this point. I can't separate the variables, and any geometric solution is beyond my reach. The only other thing I can think of is writing

$$a + b = 500 + \frac{ab}{1000} = 1000 - c$$

But this is going backwards

share|cite|improve this question
Only 1 exists right? look at and Euclids formula – mathguy Aug 7 '12 at 16:38
Do you want to include solutions with negative values like $a=1500$, $b=2000$, and $c=-2500$? – Byron Schmuland Aug 7 '12 at 17:01
up vote 1 down vote accepted

The following is copy and pasted directly from Yahoo Answers

All Pythagorean triples are generated by ${m^2+n^2, m^2-n^2, 2mn}$, where $m$ and $n$ are positive integers, and $m\gt n$.

You need $a+b+c=1000$, yielding $m(m+n)=500$. So, $m$ and $(m+n)$ are factors of $500$.

$m+n\gt m$, so $m(m+n)\gt m^2$, so $m\lt \sqrt{(500)}$, and $m+n\lt2m$ (since $m\gt n$), so $m(m+n)\lt2m^2$, so $m\gt \sqrt{(250)}$.

The prime factorisation of 500 is $2 \cdot 2 \cdot 5 \cdot 5 \cdot 5$, so the only factor of $500$ between $15 \cdot 8$ and $22 \cdot 4$ is $20$. Thus, $m=20$, $n=5$, giving the answer required: $m^2+n^2$ $= 425$; $m^2-n^2 = 375$; $2mn = 200$.

share|cite|improve this answer

We know the parametric form of the Pythagorian triplet is $(k(p^2-q^2), 2kpq, k(p^2+q^2))$ where p,r integers.

So, here $k(p^2-q^2+ 2pq + p^2+q^2)=1000$


Clearly, k can be any divisor of 500.

If k=1,

If p=1, p+q=500=> q = 499,

if p=2, p+q=250=> q = 248 and so on.

If k=2,$p(p+q)=250$

If k=5,$p(p+q)=100$

If k=10, $p(p+q)=50$ and so on.

share|cite|improve this answer
You don't get all of the non-primitive triples this way (e.g. $9^2 + 12^2 = 15^2$). – Qiaochu Yuan Aug 7 '12 at 16:43
@QiaochuYuan, I've rectified the answer and I think the result will be exhaustive if negative values are permitted. – lab bhattacharjee Aug 7 '12 at 18:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.