ASCIIMathML-SVG Pythagoras

Theorem: In a right-angled triangle with side-lengths `a`, `b` and `c`, where `c` is the length of the hypothenuse, `a^2+b^2=c^2`.

Proof: Consider a line through the right angle and perpendicular to the hypothenuse. This line splits the hypothenuse into two pieces of length `d` and `c-d`. By similar triangles, `\frac{a}{c}=\frac{d}{a}` and `\frac{b}{c}=\frac{c-d}{b}`.

Therefore `a^2=c*d` and `b^2=c*(c-d)`, hence `a^2+b^2=c*d+c*(c-d)=c*d+c^2-c*d=c^2`.

agraph width=600; height=300; initPicture(-6,6,-1,5); A = [5,0]; B = [-5,0]; O = [0,0]; t = -2; update2(); endagraph Pointer coordinates: (x,y) Click coordinates: (x,y)
Move the pointer over the picture to see different right-angled triangles. The proof given above applies to all of them.

agraph width=600; height=300; initPicture(-6,6,0); a = 2; s = 5; update4(); endagraph Move the pointer over the left square. Can you see why the red area + the blue area = the green area? This is what Pythagoras discovered! (Well, actually it was known long before his time, but his name is attached to this fundamental result.) 

The original ASCIIMathML and ASCIIsvg scripts have been developed by by Peter Jipsen, Chapman University (
LaTeXMathML has been developed by Douglas Woodall (and exteded by Jeff Knisley), based on ASCIIMathML
The version of ASCIIMathML used here, is a modified and extended version, developed by S.A. Miedema
Other sources: An ASCIIsvg manual by Robert Fant.  An ASCIIsvg manual by Peter Jipsen. An ASCIIMathML manual by James Gray.

Plugins and fonts required (depending on your browser): MIT MathML font packages, MathPlayer, Adobe SVGviewer
Look at: for detailed information about SVG.
Look at: for detailed information about MathML

Copyright © S.A. Miedema, Delft University of Technology, Faculty of Mechanical Engineering, Marine Technology & Materials Science
Department of Marine & Transport Technology, The Chair of Dredging Engineering