Right and this is called the Pythagoras' Theorem.
If you have a right angle triangle as shown, the sum of the squares of the two sides adjacent to the right angle is equal to the square of the hypotenuse (the longest side of the triangle)
So, we get: