Pythagorean Theorem Square Proof

This is small applet showing exactly Pythagoras' Theorem works. The area of the large square can be expressed in two ways. One is one side of the square squared, which, in terms of the right angled triangles within the square, is (x+y)^2, or x^2+2xy+y^2. Another way is the sum of the four triangles and the smaller square, which is 4((xy)/2)+z or simply 2xy+z^2. Given that these two expressions are equal, we can say that x^2+2xy+y^2= 2xy+z^2. Subtracting 2xy from each side gives us the famous x^2+y^2=z^2. This applet is a visualisation of that. Drag point E along AD to change the shape of the triangles. This applet displays every right-angled triangle, proving that the theorem always works.