a Pythagorean theorem calculator

demonstrating a classic of Euclidean geomoetry with Vue.JS

You might remember this from a secondary school maths class. The Pythagorean theorem is a fundamental relation in Euclidean geometry among the three sides of a right triangle1. According to the theorem, if you extrapolate the three sides of a triangle into squares, the sums of the squares of the legs are equal to the square of the hypotenuse2. It’s commonly attributed to the Greek mathematician Pythagoras, but its history is a bit more complicated.

Here’s a little Vue.JS app that demonstrates the theorem.

Solving for the {{ selected }}...

The length of the {{ selected }} is {{ theoremSolution }}.

Check out the JavaScript source for this applet or check out my other attempts to master Vue.JS. It's also available on CodePen.

  1. a right triangle is a triangle where one angle is 90°↩︎

  2. the longest side of a right triangle↩︎