stylistic:tone
Solid geometry

In terms of solid geometry, Pythagoras' theorem can be applied to three dimensions as follows. Consider the cuboid shown in the figure. The length of face diagonal AC is found from Pythagoras' theorem as:

where these three sides form a right triangle. Using diagonal AC and the horizontal edge CD, the length of body diagonal AD then is found by a second application of Pythagoras' theorem as:

or, doing it all in one step:

This result is the three-dimensional expression for the magnitude of a vector v (the diagonal AD) in terms of its orthogonal components { v } (the three mutually perpendicular sides):

This one-step formulation may be viewed as a generalization of Pythagoras' theorem to higher dimensions. However, this result is really just the repeated application of the original Pythagoras' theorem to a succession of right triangles in a sequence of orthogonal planes.

A substantial generalization of the Pythagorean theorem to three dimensions is de Gua's theorem, named for Jean Paul de Gua de Malves: If a tetrahedron has a right angle corner (like a corner of a cube), then the square of the area of the face opposite the right angle corner is the sum of the squares of the areas of the other three faces. This result can be generalized as in the " n -dimensional Pythagorean theorem":

Let x 1, x 2, …, x n {\displaystyle x_{1},x_{2},\ldots,x_{n}} be orthogonal vectors in R. Consider the n -dimensional simplex S with vertices 0, x 1, …, x n {\displaystyle 0,x_{1},\ldots,x_{n}}. (Think of the (n − 1)-dimensional simplex with vertices x 1, …, x n {\displaystyle x_{1},\ldots,x_{n}} not including the origin as the "hypotenuse" of S and the remaining (n − 1)-dimensional faces of S as its "legs".) Then the square of the volume of the hypotenuse of S is the sum of the squares of the volumes of the n legs.

This statement is illustrated in three dimensions by the tetrahedron in the figure. The "hypotenuse" is the base of the tetrahedron at the back of the figure, and the "legs" are the three sides emanating from the vertex in the foreground. As the depth of the base from the vertex increases, the area of the "legs" increases, while that of the base is fixed. The theorem suggests that when this depth is at the value creating a right vertex, the generalization of Pythagoras' theorem applies. In a different wording:

Given an n -rectangular n -dimensional simplex, the square of the (n − 1)-content of the facet opposing the right vertex will equal the sum of the squares of the (n − 1)-contents of the remaining facets.