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 triangle^{1}. 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 hypotenuse^{2}. 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.