This relationship generalizes to dimensions, as we can easily show:
If , then and Eq.(5.1) holds in dimensions.
Note that the converse is not true in . That is, does not imply in . For a counterexample, consider , , in which case
For real vectors , the Pythagorean theorem Eq.(5.1) holds if and only if the vectors are orthogonal. To see this, note that, from Eq.(5.2), when the Pythagorean theorem holds, either or is zero, or is zero or purely imaginary, by property 1 of norms (see §5.8.2). If the inner product cannot be imaginary, it must be zero.
Note that we also have an alternate version of the Pythagorean theorem: