18
$\begingroup$

Can somebody fill me in on a visual explanation for the following:

If there exist integers $x, y$ such that $x^2 + y^2 = c$, then there also exist integers $w, z$ such that $w^2 + z^2 = 2c$

I know why it is true (ex. take $w = x-y, z = x+y$), but I would think there is a visual explanation hiding somewhere because of squared terms (we can make squares!!)

$\endgroup$

6 Answers 6

40
$\begingroup$

2 Circles

$~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~$

$\endgroup$
5
  • 2
    $\begingroup$ $\sqrt{c}$ is the radius of smaller circle; $\sqrt{2c}$ is the radius of bigger circle; $(\sqrt{c})^2+(\sqrt{c})^2=(\sqrt{2c})^2$ (triangle is $45^\circ$ right triangle). $\endgroup$
    – Oleg567
    Mar 20, 2014 at 12:05
  • 1
    $\begingroup$ source ( code)? $\endgroup$
    – user13107
    Mar 20, 2014 at 16:05
  • $\begingroup$ @Oleg567 What if $c$ isn't an integer? $\endgroup$
    – Jack M
    Mar 20, 2014 at 18:07
  • 3
    $\begingroup$ @JackM That's impossible, since x and y are integers. $\endgroup$
    – Red Alert
    Mar 20, 2014 at 18:34
  • $\begingroup$ @user13107: earlier [rough] image was made via MS Word (to draw circle, line, show Grid :); last [accurate] image was made via C/C++ (Windows API, GDI-functions: MoveToEx(), LineTo, Ellipse(), ...). $\endgroup$
    – Oleg567
    Mar 21, 2014 at 10:59
26
$\begingroup$

It will take me forever to post the diagram so here is a description.

Draw the circle with centre $(0,0)$ and radius $\sqrt c\,$. Locate the point $(x,y)$ on this circle: by assumption, $x$ and $y$ are integers. Draw the tangent to this circle starting at $(x,y)$ and having length $\sqrt c\,$. This will give a point distant $\sqrt{2c}$ from the origin (because we have a right angled isosceles triangle), and the point will have integer coordinates because it is obtained from $(x,y)$ by a displacement of $(y,-x)$ or $(-y,x)$, depending which way we drew the tangent.

Update: see another answer for the picture. Thanks Oleg!

$\endgroup$
3
  • $\begingroup$ Doubt: How did you calculate the displacement? $\endgroup$
    – Anant
    Mar 20, 2014 at 17:17
  • $\begingroup$ The line perpendicular to a point $(x, y)$ has a slope of $\frac{-x}{y}$. So, a displacement of $(-y, x)$ or $(y, -x)$ is contained by that perpendicular and is the same length as the original displacement from the origin of $(x, y)$ $\endgroup$
    – MT_
    Mar 20, 2014 at 19:19
  • 1
    $\begingroup$ Or more simply: the tangent is perpendicular to the radius, so the $x$ coordinate becomes the $y$ coordinate and vice versa, with a little care to get the signs right. $\endgroup$
    – David
    Mar 20, 2014 at 21:01
15
$\begingroup$

Hint $\ $ The transformation is simply multiplication by $\, 1+i\,$ in the complex plane

$$(1+i)(x+yi)\, =\, x\!-\!y + (x\!+\!y)i $$

Thus if $\ |x+yi| = x^2+y^2 = c \ $ then

$$ (x\!-\!y)^2+(x\!+\!y)^2 =\, |x\!-\!y+(x\!+\!y)i| = |(1+i)(x+yi)|\, =\, 2\,|x+yi|\,=\,2c$$

Geometrically, multiplication by $\ 1+i = \sqrt{2}\, e^{\large i\pi/4}\,$ may be visualized as an expansion by the factor $\,\sqrt{2}\,$ composed with a rotation by $\,\pi/4.\,$ Let's visualize this in the diagram from Oleg567's answer, excerpted below. Let $\,\rm\color{#c00}{v = x+y\, i}\,$ be the lower red vector. Multiplying it by $\,1+i\,$ yields $\, (1+i){\rm v = v} + i\rm v,\,$ where $\,\rm\color{#c00}{i\,v = -y + x\, i}\,$ is the rotation of $\,\rm v\,$ by $\,\pi/4.\,$ Adding these red vectors yields the result $\,\rm\color{blue}{v + i\, v = x-y + (x+y)\,i}.$

$\qquad\quad$ enter image description here

$\endgroup$
2
  • 3
    $\begingroup$ This is very nice. Always appreciate when complex numbers are used in clever ways like this. $\endgroup$
    – MT_
    Mar 21, 2014 at 19:10
  • $\begingroup$ Reminded me of this explanation, which opened my eyes to the beauty of complex numbers :) $\endgroup$
    – Anant
    Mar 22, 2014 at 8:25
13
$\begingroup$

In terms of the areas of squares:

enter image description here

Edit: Thanks to Michael T for pointing out a simpler rearrangement.

$\endgroup$
3
  • 2
    $\begingroup$ Hey, squares! This was the original idea I had in mind. Looks very nice, thank you. $\endgroup$
    – MT_
    Mar 21, 2014 at 19:59
  • $\begingroup$ I have found what I believe is a simpler construction (and have thus answered my own question) $\endgroup$
    – MT_
    Mar 21, 2014 at 21:52
  • 1
    $\begingroup$ @user92774 I've edited the diagram to incorporate your construction. Thanks! $\endgroup$
    – Anant
    Mar 21, 2014 at 22:51
6
$\begingroup$

I have devised what I believe to be a simpler construction of Anant's squares argument and have thus shared it here:

enter

$\endgroup$
1
  • $\begingroup$ Very nice! Silly that I didn't spot it :) $\endgroup$
    – Anant
    Mar 21, 2014 at 22:26
2
$\begingroup$

If you imagine an integer-sized coordinate grid (as in Oleg567's answer) overlaid with another coordinate grid that has been shrunk by a factor of $\sqrt2$ and rotated by $45^{\circ}$ about the origin, the original unit vectors still have integer coordinates.

So the point $(x,y)$ also has integer coordinates in the new system, being a linear combination of unit vectors. Its distance to the origin is now $\sqrt2$ times the old distance, because we did shrink the unit vectors.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .