# Proof: For all integers $x$ and $y$, if $x^2+ y^2= 0$ then $x =0$ and $y =0$

I need help proving the following statement:

For all integers $x$ and $y$, if $x^2+ y^2= 0$ then $x =0$ and $y =0$

The statement is true, I just need to know the thought process, or a lead in the right direction. I think I might have to use a contradiction, but I don't know where to begin.

Any help would be much appreciated.

• What are your axioms? – Git Gud Sep 20 '14 at 21:27
• You seem to be on the right track with using contradiction. What happens if either $x\neq 0$ or $y\neq 0$? – SleuthEye Sep 20 '14 at 21:28
• Assume $x^2+ y^2= 0$ but $x$ and/or $y$ does not equal zero. – Rienman Sep 20 '14 at 21:28
• But what do I do that after that? – Rienman Sep 20 '14 at 21:29
• What is the square of any nonzero number? – rogerl Sep 20 '14 at 21:29

If $x\ne 0$ or $y\ne 0$ then $|x| \ge 1$ or $|y| \ge 1$, which implies $x^2+y^2 \ge 1$.

• What would this proof strategy called ? Direct proof? – Rienman Sep 20 '14 at 21:33
• @Rienman: contraposition. – lhf Sep 20 '14 at 21:35

If $x^2 + y^2 = 0$ then $(x+y)^2 = 2xy$ and then $(x-y)^2 = -(x+y)^2$. But $(x-y)^2\geq 0$ for every $x,y$ and the same is true for $(x+y)^2$, hence we have

(1) $(x-y)^2 \geq 0$

(2) $-(x+y)^2 \leq 0$

So $(x-y)^2 = (x+y)^2=0$. Therefore $x=y$ and $x=-y$, so the only solution is $x=0$ and $y=0$

A short proof (I would suggest fleshing it out a little with support from axioms for the integers):

You know that if $x$ is an integer, then $x^2 \geq 0$. In fact, $x^2 = 0$ iff $x =0$.

So if $x^2 + y^2 = 0$, then it must be that $x^2 = 0$ and $y^2 = 0$, since squaring integers does not result in negative numbers.

From $x^2 =0$ and $y^2 = 0$ it follows that $x=0,y=0$.

$x=r\cos\theta, y=r\sin\theta$, choosing suitable $r$ and $\theta$ such that $x$ and $y$ are integers. Applying to the equation. $x^2+y^2=0$ $\implies r^2=0$ $\implies x=y=0.$