>>8966217

The Pythagorean theorem works because of inner product spaces.

We commonly use the dot product to determine orthogonality.

For example, lets say that a and b are n-dimensional vectors, and that they are orthogonal to eachother - aka

a • b = 0

To find the length of a vector, you dot it with itself then take a square root.

||a||^2 = a • a = length(a)^2

Lets try this out!

Once again, let a,b be orthogonal vectors...

||a+b||^2 = (a+b)•(a+b)

Since dot products are linear in the real numbers, we can split this up.

(a+b)•(a+b) = a•a + a•b + b•a + b•b

Since a and b are orthogonal, a•b=0

a•a + a•b + b•a + b•b = a•a + b•b = ||a||^2 + ||b||^2

Thus for 2 orthogonal vectors, you find the combined length like so...

||a+b||^2 = ||a||^2 + ||b||^2