# Pythagorean triplets

1. Aug 3, 2009

### JanClaesen

Can every real number be written as a sum of 2 real squares, and if not, how to prove that?
And how to prove that not every square of a whole number can be written as a sum of two whole squares?
I also read something that doesn't seem right to me: if a and b are rational, c must be irrational (counterexample: 3² + 4² = 5²), does the author mean a rational number that is not whole? And how to prove that?

I thank you.

2. Aug 3, 2009

i^2 = -1

2^2 = ...?

3. Aug 3, 2009

### JanClaesen

So... ?

2^2 = 1^2 + 1^2... But that's not really what I meant with a proof.

4. Aug 3, 2009

### Tac-Tics

A square of a real is always non-negative. The sum of two non-negative numbers is non-negative. Therefore, negative numbers can't be expressed as the sum of squares.

5. Aug 3, 2009

### JanClaesen

I'm sorry, I didn't formulate my question quite well: I meant: can any (positive) real square be expressed as the sum of two squares?

6. Aug 3, 2009

### Tac-Tics

Yes. For any positive real x, $$x = y^2 + 0^2$$ where $$y = \sqrt{x}$$.

7. Aug 3, 2009

### JanClaesen

And if we exclude zero?

By the way, does anyone knows whether this is correct and how to prove it: if x and y are rational and not whole then z must be irrational.

8. Aug 3, 2009

### Tac-Tics

Let's say $$x = y^2 + z^2$$ where both y and z are positive. One solution is let y = z, so we have $$x = y^2 + y^2 = 2y^2$$. Then $$y = z= \sqrt{\frac{x}{2}}$$ is a solution.

9. Aug 3, 2009

### CRGreathouse

If you mean "if x and y are rational but not integers then z = sqrt(x^2 + y^2) is irrational", it is not correct. Take (x, y, z) = (3/2, 2, 5/2).

10. Aug 4, 2009

### JanClaesen

Thanks, any idea what the book was trying to tell, or what I'm trying to tell?
It was something Fermat had (really) proven (I'm not talking about his last theorem eh).

11. Aug 4, 2009

### ramsey2879

Simple. Say a is the square root of a positive number smaller than x

set $$b = \sqrt{x - a^2}$$ then $$a^{2}+b^{2} = x$$

12. Aug 4, 2009

### ramsey2879

Not quite a counter-example since y is whole. Instead of dividing (3,4,5) by 2 divide (3,4,5) each by 5 or any whole number > 4.

13. Aug 4, 2009

### CRGreathouse

Fine. I took the statement as "when each of the numbers is an integer" and you took it as "when any of the numbers are integers". Either way examples are easy to find.

14. Aug 4, 2009