Einstein's Most Excellent Proof

(*This routine makes the little square icon indicating a 90 degree right angle.  This assumes x and y are the Upper Right Hand corner of the icon
{x - δ, y}     {x, y}
{x - δ, y - δ} {x, y - δ}*)

icon[x_Real,y_Real,δ_Real:0.5,θ_Real:0.0]:=Module[{},
Rotate[{
Line[{{x,y},{x-δ,y}}],
Line[{{x-δ,y},{x-δ,y-δ}}],
Line[{{x-δ,y-δ},{x,y-δ}}],
Line[{{x,y-δ},{x,y}}]
},θ,{x,y}]
]

(*This allows for a List {x,y} in the parameter specification as well....*)

icon[{x_Real,y_Real},δ_Real:0.5,θ_Real:0.0]:=icon[x,y,δ,θ]

Manipulate[

Graphics[{
(* fancy background color *)
Polygon[{{-10,-10},{10,-10},{10,10},{-10,10}},VertexColors->{Lighter[Yellow,0.75],Lighter[Green,0.75],Lighter[Yellow,0.75],Lighter[Blue,0.75]}],

(* STEP 0:  Title *)
If[step==0,{
Lighter[Red,0.4],Opacity[0.6],Disk[{0,0},8],Black,Opacity[1],
Style[Text["Albert Einstein's",{0,3}],16,"Label"],
Style[Text["Most Excellent Proof of the",{0,2}],16,"Label"],
Style[Text["Pythagorean Theorem",{0,1}],16,"Label"],
Style[Text["* * *",{0,0}],16,"Label"]
},
{}
],

(* STEP 1: draw right triangle inside semi-circle *)
If[step==1,
{Style[Text["Any point on this semi-circle creates  ",{0,-1}],12,"Label"],
Style[Text["a right triangle.",{0,-1.75}],12,"Label"],
Style[Text["Use the slider below to change the triangle's shape,",{0,-4.75}],12,"Label"],
Style[Text["while preserving the right angle.",{0,-5.5}],12,"Label"]},
{}
],
If[step>0 &&step<4,{Lighter[Red,0.5],Opacity[0.7],Disk[{0,0},8,{0,π}],Opacity[1]},{}],
If[step>0 &&step<3,{Lighter[Red,0.6],Opacity[0.15],Disk[{0,0},8,{π,2π}],Opacity[1]},{}],
If[step>0,
{FaceForm[Darker[Orange,0.]],Opacity[1.],Polygon[{{8,0},8*{Cos[θ],Sin[θ]},{-8,0}}],
FaceForm[Lighter[Blue,0.4]],
icon[8*{Cos[θ],Sin[θ]},2δ,θ/2.0]/.{Line[aaa_],Line[bbb_],Line[ccc_],Line[ddd_]}:> Polygon[{Sequence @@ aaa,Sequence @@ bbb,Sequence @@ccc,Sequence @@ddd}]},
{}],

(* STEP 2: drop perpendicular *)
If[step==2,
{Style[Text["First, Einstein dropped a perpendicular onto the hypotenuse,",{0,8.5}],12,"Label"],
Style[Text["thereby…",{0,-1.75}],12,"Label"]},
{}
],
If[step>1,{White,Opacity[0.65],
AbsoluteThickness[3],Line[{8*{Cos[θ],Sin[θ]},8*{Cos[θ],0}}],
(* add 90° icon *)
AbsoluteThickness[1],
icon[{8*Cos[θ],δ}],
icon[{8*Cos[θ]+δ,δ}]},
{}
],

(* STEP 3: show 3 triangles *)
If[step==3,
{Style[Text["… creating two additional right triangles.",{0,8.5}],12,"Label"],
Style[Text["But wait! There's more!",{0,-0.5}],12,"Label"],
Style[Text["All three triangles are similar!",{0,-1.25}],12,"Label"],
Style[Text["Can you see why all three triangles are similar?",{0,-8.5}],12,"Label"],
Style[Text["Their similarity is at the heart of his proof.",{0,-9.25}],12,"Label"]},
{}
],
If[step==3,
{(* colorize original orange triangle *)
FaceForm[Lighter[Blue,0.6]],Opacity[0.5],Polygon[{8*{Cos[θ],0},8*{Cos[θ],Sin[θ]},{-8,0}}],
FaceForm[Lighter[RGBColor[0., 0.4, 0.1],0.16]],Opacity[0.4],Polygon[{8*{Cos[θ],0},8*{Cos[θ],Sin[θ]},{+8,0}}],
(* draw new triangles *)
FaceForm[Lighter[Blue,0.6]],Opacity[0.5],Polygon[{8*{Cos[θ],0}-{1,8},8*{Cos[θ],Sin[θ]}-{1,8},{-8,0}-{1,8}}],
White,AbsoluteThickness[2],icon[8*{Cos[θ],0}-{1,8}+{0,δ}],
FaceForm[Lighter[RGBColor[0.,0.4,0.1],0.16]],Opacity[0.5],Polygon[{8*{Cos[θ],0}+{1,-8},8*{Cos[θ],Sin[θ]}+{1,-8},{+8,0}+{1,-8}}],
icon[8*{Cos[θ],0}+{1,-8}+{δ,δ}]
},
{}
],
(* STEP 4: id hypoteni *)
If[step==4,
{Style[Text["Notice that each side of the original, orange triangle ",{0,9}],12,"Label"],
Style[Text["is now the hypotenuse of one of the three triangles!",{0,8.}],12,"Label"]},
{}
],
If[step>3,
{FaceForm[Darker[Orange,0.]],Opacity[1.],Polygon[{{8,0},8*{Cos[θ],Sin[θ]},{-8,0}}],
(* altitude *)
Lighter[White,0.5],AbsoluteThickness[3],Line[{8*{Cos[θ],Sin[θ]},8*{Cos[θ],0}}],
(* add 90° icon *)
AbsoluteThickness[2],icon[{8*Cos[θ],δ}],icon[{8*Cos[θ]+δ,δ}],
(* draw new triangles *)
FaceForm[Lighter[Blue,0.6]],Opacity[0.5],Polygon[{8*{Cos[θ],0}-{1,8},8*{Cos[θ],Sin[θ]}-{1,8},{-8,0}-{1,8}}],
icon[8*{Cos[θ],0.}-{1,8}+{0,δ}],
FaceForm[Lighter[RGBColor[0.,0.4,0.1],0.16]],Opacity[0.5],Polygon[{8*{Cos[θ],0}+{1,-8},8*{Cos[θ],Sin[θ]}+{1,-8},{+8,0}+{1,-8}}],
icon[8*{Cos[θ],0.}+{1,-8}+{δ,δ}],
(* emphasize hypoteni *)
AbsoluteThickness[8],Opacity[1],
Orange,
Arrow[{{-8,0}-{0,δ},{8,0}-{0,δ}}],
Blue,
Arrow[{{-8,0}-{1,8},8*{Cos[θ],Sin[θ]}-{1,8}}],
Arrow[{{-8,0}+{0,1.1 δ},8*{Cos[θ],Sin[θ]}+{0,1.1 δ}}], 
RGBColor[0.,0.4,0.1], (* Dark Green *)
Arrow[{{+8,0}+{1,-8},8*{Cos[θ],Sin[θ]}+{1,-8}}],
Arrow[{{+8,0}+{0,1.1 δ},8*{Cos[θ],Sin[θ]}+{0,1.1δ}}]
},
{}
],
(* STEP 5:  introduce Area Formula *)
If[step==5,
{Style[Text["Of course, the area of the orange triangle equals",{0,9}],12,"Label"],
Style[Text["the sum of the areas of the blue and green triangles.",{0,8}],12,"Label"],
Style[Text["orange area = blue area + green area",{0,-1}],12,"Label"],
Style[Text["Einstein knew something more about similar objects…",{0,-9}],12,"Label"]},
{}
],
(* STEP 6: introduce "proportional to the square of any linear characteristic" *)
If[step==6,
{Style[Text["If geometric objects are similar, their areas are",{0,9}],12,"Label"],
Style[Text["proportional to the square of any linear part.",{0,8.25}],12,"Label"],
Style[Text["So, (orange area) is proportional to (orange hypotenuse)^2.",{0,-1}],12,"Label"],
Style[Text["And so, Einstein rewrote the area formula:",{0,-9}],12,"Label"]},
{}
],
(* STEP 7, rewrite Area Formula with λ *)
If[step==7,
{Style[Text["orange area = blue area + green area ",{0,8.5}],12,"Label"],
Style[Text["Using the hypotenuses and the proportionality constant p … ",{0,-1}],12,"Label"],
Style[Text["p (orange hypotenuse)^2 = p (blue hypotenuse)^2 + p (green hypotenuse)^2",{0,-9}],12,"Label"]},
{}
],
(* STEP 8: eliminate λ factor, QED *)
If[step==8,
{Style[Text["Now, he eliminated the common factor p and got:",{0,9}],12,"Label"],
Style[Text["(orange hypotenuse)^2= (blue hypotenuse)^2 + (green hypotenuse)^2",{0,8.25}],12,"Label"],
Style[Text["But, that's what he wanted to prove!",{0,-1}],12,"Label"],
Style[Text["The square of the (orange) hypotenuse is equal to",{0,-8.5}],12,"Label"],
Style[Text["the sum of the squares of the other two sides!",{0,-9.25}],12,"Label"]},
{}
],
(* STEP 9: Summary*)
If[step==9,
{Polygon[{{-10,-10},{10,-10},{10,10},{-10,10}},VertexColors->{Lighter[Yellow,0.75],Lighter[Yellow,0.75],Lighter[Green,0.75],Lighter[Blue,0.75]}],

Style[Text["In Summary",{0,8.5}],18,"Label"],
Style[Text["orange area = p (orange hypotenuse)^2",{0,-1.25}],12,"Label"],
Style[Text[" blue area = p (blue hypotenuse)^2  ",{0,-2}],12,"Label"],
Style[Text[" green area = p (green hypotenuse)^2 ",{0,-2.75}],12,"Label"],

Style[Text["    orange area      =   blue area                 +     green area    ",{0,-4.2}],12,"Label"],
AbsoluteThickness[2],Black,Opacity[0.3],Line[{{-10,-4.5},{10,-4.5}}],Opacity[1],
Style[Text["p (orange hypotenuse)^2   =  p (blue hypotenuse)^2  +  p (green hypotenuse)^2",{0,-4.9}],12,"Label"],
Style[Text[" (orange hypotenuse)^2   =   (blue hypotenuse)^2    +    (green hypotenuse)^2",{0,-5.7}],12,"Label"],

Style[Text["The square of the (orange) hypotenuse is equal to",{0,-7.5}],12,"Label"],
Style[Text["the sum of the squares of the other two sides!!!",{0,-8.25}],12,"Label"],
Style[Text["Q.E.D.",{0,-9}],12,"Label"],

FaceForm[Darker[Orange,0.]],Opacity[1.],Polygon[{{8,0},8*{Cos[θ],Sin[θ]},{-8,0}}],
FaceForm[Lighter[Blue,0.4]],
icon[8*{Cos[θ],Sin[θ]},2δ,θ/2.0]/.{Line[aaa_],Line[bbb_],Line[ccc_],Line[ddd_]}:> Polygon[{Sequence @@ aaa,Sequence @@ bbb,Sequence @@ccc,Sequence @@ddd}],
White,Opacity[0.5],
AbsoluteThickness[3],Line[{8*{Cos[θ],Sin[θ]},8*{Cos[θ],0}}],
(* add 90° icon *)
AbsoluteThickness[1],
icon[{8*Cos[θ],δ}],
icon[{8*Cos[θ]+δ,δ}],
(* emphasize hypoteni *)
AbsoluteThickness[8],Opacity[1],
Orange,
Arrow[{{-8,0}-{0,δ},{8,0}-{0,δ}}],
Blue,
Arrow[{{-8,0}+{0,δ},8*{Cos[θ],Sin[θ]}+{0,δ}}],
RGBColor[0., 0.4, 0.1],
Arrow[{{+8,0}+{0,δ},8*{Cos[θ],Sin[θ]}+{0,δ}}]
},
{}
]
}, (* end Graphics data *)
ImageSize->500,PlotRange->9.5,Frame-> False
], (* end Graphics *)

(* controls *)
{{step,0,"step through proof"},{0,1,2,3,4,5,6,7,8,9},ControlType->RadioButtonBar},
{{θ,1.0,"customize triangle"},π-π/10.,π/10.},

(* dynamic variable *)
{{δ,0.5,""},ControlType->None},

(* options *)
SaveDefinitions->True,
AutorunSequencing-> {{1,30}}

]

CAPTION

According to his autobiography, a preteen Albert Einstein divised a new proof of the Pythagorean theorem based on the properties of similar triangles. Many known proofs use similarity arguments, but this one is notable for its elegance, simplicity, and the sense that it reveals the connection between length and area that is at the heart of the theorem.

DETAILS

Einstein in his autobiography says, "At the age of 12, I experienced a second wonder of a totally different nature: in a little book dealing with Euclidean plane geometry, which came into my hands at the beginning of a school year. Here were assertions, as for example the intersection of the three altitudes of a triangle in one point, which — though by no means evident — could nevertheless be proved with such certainty that any doubt appeared to be out of the question. This lucidity and certainty made an indescribable impression upon me. For example I remember that an uncle told me the Pythagorean theorem before the holy geometry booklet had come into my hands. After much effort I succeeded in "proving'' this theorem on the basis of the similarity of triangles … for anyone who experiences [these feelings] for the first time, it is marvellous enough that man is capable at all to reach such a degree of certainty and purity in pure thinking as the Greeks showed us for the first time to be possible in geometry."

THIS NOTEBOOK IS THE SOURCE CODE FROM

"Einstein's Most Excellent Proof" from the Wolfram Demonstrations Project
 http://demonstrations.wolfram.com/EinsteinsMostExcellentProof/

Contributed by: John Kiehl

A full-function Wolfram Mathematica system (Version 6 or higher) is required to edit this notebook.
GET WOLFRAM MATHEMATICA »

© Wolfram Demonstrations Project & Contributors   |   Terms of Use   |   Make a new version of this Demonstration »