Similar figures on the three sides The Pythagorean theorem generalizes beyond the areas of squares on the three sides to any
similar figures. This was known by
Hippocrates of Chios in the 5th century BC, and was included by
Euclid in his
Elements: This extension assumes that the sides of the original triangle are the corresponding sides of the three congruent figures (so the common ratios of sides between the similar figures are ). While Euclid's proof only applied to convex polygons, the theorem also applies to concave polygons and even to similar figures that have curved boundaries (but still with part of a figure's boundary being the side of the original triangle). When \theta is \tfrac{\pi}{2} radians or 90°, then {{tmath|1=\cos{\theta} = 0}}, and the formula reduces to the usual Pythagorean theorem.
Arbitrary triangle . Lower panel: reflection of triangle (top) to form triangle , similar to triangle (top). At any selected angle of a general triangle of sides , , , inscribe an isosceles triangle such that the equal angles at its base θ are the same as the selected angle. Suppose the selected angle is opposite the side labeled . Inscribing the isosceles triangle forms triangle with angle opposite side and with side along . A second triangle is formed with angle opposite side and a side with length along , as shown in the figure.
Thābit ibn Qurra stated that the sides of the three triangles were related as: a^2 +b^2 =c(r+s) . As the angle approaches /2, the base of the isosceles triangle narrows, and lengths and overlap less and less. When , becomes a right triangle, , and the original Pythagorean theorem is regained. One proof observes that triangle has the same angles as triangle , but in opposite order. (The two triangles share the angle at vertex , both contain the angle , and so also have the same third angle by the
triangle postulate.) Consequently, is similar to the reflection of , the triangle in the lower panel. Taking the ratio of sides opposite and adjacent to , \frac{c}{b} = \frac{b}{r} . Likewise, for the reflection of the other triangle, \frac{c}{a} = \frac{a}{s} .
Clearing fractions and adding these two relations: cs + cr = a^2 +b^2 , the required result. The theorem remains valid if the angle is obtuse so the lengths and are non-overlapping.
General triangles using parallelograms Pappus's area theorem is a further generalization, that applies to triangles that are not right triangles, using parallelograms on the three sides in place of squares (squares are a special case, of course). The upper figure shows that for a scalene triangle, the area of the parallelogram on the longest side is the sum of the areas of the parallelograms on the other two sides, provided the parallelogram on the long side is constructed as indicated (the dimensions labeled with arrows are the same, and determine the sides of the bottom parallelogram). This replacement of squares with parallelograms bears a clear resemblance to the original Pythagoras's theorem, and was considered a generalization by
Pappus of Alexandria in 4 AD The lower figure shows the elements of the proof. Focus on the left side of the figure. The left green parallelogram has the same area as the left, blue portion of the bottom parallelogram because both have the same base and height . However, the left green parallelogram also has the same area as the left green parallelogram of the upper figure, because they have the same base (the upper left side of the triangle) and the same height normal to that side of the triangle. Repeating the argument for the right side of the figure, the bottom parallelogram has the same area as the sum of the two green parallelograms.
Ptolemy's theorem Ptolemy's theorem states that when a
quadrilateral can be inscribed in a circle (i.e., when it is a
cyclic quadrilateral), the product of the lengths of one pair of opposite sides plus the product of the lengths of the other pair of opposite sides equals the product of the lengths of the diagonals. This reduces to the Pythagorean theorem when the quadrilateral is a rectangle. Ptolemy's theorem can also be used to prove the law of cosines.
Solid geometry In terms of
solid geometry, Pythagoras's theorem can be applied to three dimensions as follows. Consider the
cuboid shown in the figure. The length of
face diagonal is found from Pythagoras's theorem as: \overline{AC}^{\,2} = \overline{AB}^{\,2} + \overline{BC}^{\,2} , where these three sides form a right triangle. Using diagonal and the horizontal edge , the length of
body diagonal then is found by a second application of Pythagoras's theorem as: \overline{AD}^{\,2} = \overline{AC}^{\,2} + \overline{CD}^{\,2} , or, doing it all in one step: \overline{AD}^{\,2} = \overline{AB}^{\,2} + \overline{BC}^{\,2} + \overline{CD}^{\,2} . This result is the three-dimensional expression for the magnitude of a vector (the diagonal ) in terms of its orthogonal components (the three mutually perpendicular sides): \|\mathbf{v}\|^2 = \sum_{k=1}^3 \|\mathbf{v}_k\|^2. This one-step formulation may be viewed as a generalization of Pythagoras's theorem to higher dimensions. However, this result is really just the repeated application of the original Pythagoras's 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 "-dimensional Pythagorean theorem": 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's theorem applies. In a different wording:
Inner product spaces The Pythagorean theorem can be generalized to
inner product spaces, which are generalizations of the familiar 2-dimensional and 3-dimensional
Euclidean spaces. For example, a
function may be considered as a
vector with infinitely many components in an inner product space, as in
functional analysis. In an inner product space, the concept of
perpendicularity is replaced by the concept of
orthogonality: two vectors and are orthogonal if their inner product \langle \mathbf{v} , \mathbf{w}\rangle is zero. The
inner product is a generalization of the
dot product of vectors. The dot product is called the
standard inner product or the
Euclidean inner product. However, other inner products are possible. The concept of length is replaced by the concept of the
norm of a vector , defined as: \lVert \mathbf{v} \rVert \equiv {\textstyle \sqrt{\langle \mathbf{v},\, \mathbf{v}\rangle}\vphantom\big| } . In an inner-product space, the
Pythagorean theorem states that for any two orthogonal vectors and we have \left\| \mathbf{v} + \mathbf{w} \right\|^2 = \left\| \mathbf{v} \right\|^2 + \left\| \mathbf{w} \right\|^2 . Here the vectors and are akin to the sides of a right triangle with hypotenuse given by the
vector sum . This form of the Pythagorean theorem is a consequence of the
properties of the inner product: \begin{align} \left\| \mathbf{v} + \mathbf{w} \right\|^2 &= \langle \mathbf{ v+w},\ \mathbf{ v+w}\rangle \\[3mu] &= \langle \mathbf{v},\, \mathbf{ v}\rangle +\langle \mathbf{ w},\, \mathbf{ w}\rangle +\langle\mathbf{ v,\, w }\rangle + \langle\mathbf{ w,\, v }\rangle \\[3mu] &= \left\| \mathbf{v}\right\|^2 + \left\| \mathbf{w}\right\|^2, \end{align} where \langle\mathbf{ v,\, w }\rangle = \langle\mathbf{ w,\, v }\rangle = 0 because of orthogonality. A further generalization of the Pythagorean theorem in an inner product space to non-orthogonal vectors is the
parallelogram law: \biggl\|\sum_{k=1}^n\mathbf{v}_k\biggr\|^2=\sum_{k=1}^n\|\mathbf{v}_k\|^2
Sets of -dimensional objects in -dimensional space Another generalization of the Pythagorean theorem applies to
Lebesgue-measurable sets of objects in any number of dimensions. Specifically, the square of the measure of an -dimensional set of objects in one or more parallel -dimensional
flats in -dimensional
Euclidean space is equal to the sum of the squares of the measures of the
orthogonal projections of the object(s) onto all -dimensional coordinate subspaces. In mathematical terms: \mu_{ms}^2 = \sum_{i=1}^{x}\mu_{mp_i}^2 where: • \mu_m is a measure in -dimensions (a length in one dimension, an area in two dimensions, a volume in three dimensions, etc.). • s is a set of one or more non-overlapping -dimensional objects in one or more parallel -dimensional flats in -dimensional Euclidean space. • \mu_{ms} is the total measure (sum) of the set of -dimensional objects. • p represents an -dimensional projection of the original set onto an orthogonal coordinate subspace. • \mu_{mp_i} is the measure of the -dimensional set projection onto -dimensional coordinate subspace . Because object projections can overlap on a coordinate subspace, the measure of each object projection in the set must be calculated individually, then measures of all projections added together to provide the total measure for the set of projections on the given coordinate subspace. • x is the number of orthogonal, -dimensional coordinate subspaces in -dimensional space () onto which the -dimensional objects are projected : x = \binom{n}{m} = \frac{n!}{m!(n-m)!}
Non-Euclidean geometry The Pythagorean theorem is derived from the
axioms of
Euclidean geometry, and in fact, were the Pythagorean theorem to fail for some right triangle, then the plane in which this triangle is contained cannot be Euclidean. More precisely, the Pythagorean theorem
implies, and is implied by, Euclid's Parallel (Fifth) Postulate. Thus, right triangles in a
non-Euclidean geometry do not satisfy the Pythagorean theorem. For example, in
spherical geometry, all three sides of the right triangle (say , , and ) bounding an octant of the unit sphere have length equal to /2, and all its angles are right angles, which violates the Pythagorean theorem because . Here two cases of non-Euclidean geometry are considered—
spherical geometry and
hyperbolic plane geometry; in each case, as in the Euclidean case for non-right triangles, the result replacing the Pythagorean theorem follows from the appropriate law of cosines. However, the Pythagorean theorem remains true in hyperbolic geometry and elliptic geometry if the condition that the triangle be right is replaced with the condition that two of the angles sum to the third, say . The sides are then related as follows: the sum of the areas of the circles with diameters and equals the area of the circle with diameter .
Spherical geometry For any right
triangle on a sphere of radius (for example, if in the figure is a right angle), with sides , , and , the relation between the sides takes the form: \cos{\frac cR} = \cos{\frac aR} \, \cos{\frac bR}. This equation can be derived as a special case of the
spherical law of cosines that applies to all spherical triangles: \cos{\frac cR} = \cos{\frac aR} \, \cos{\frac bR} + \sin{\frac aR} \, \sin{\frac bR} \, \cos{\gamma}. For infinitesimal triangles on the sphere (or equivalently, for finite spherical triangles on a sphere of infinite radius), the spherical relation between the sides of a right triangle reduces to the Euclidean form of the Pythagorean theorem. To see how, assume we have a spherical triangle of fixed side lengths , , and on a sphere with expanding radius . As approaches infinity the quantities , , and tend to zero and the spherical Pythagorean identity reduces to , so we must look at its
asymptotic expansion. The
Maclaurin series for the cosine function can be written as \cos x = 1 - \tfrac12 x^2 + O{\left(x^4\right)} with the remainder term in
big O notation. Letting x = c/R be a side of the triangle, and treating the expression as an asymptotic expansion in terms of for a fixed , \begin{align} \cos{\frac cR} = 1 - \frac{c^2}{2R^2} + O{\left(R^{-4}\right)} \end{align} and likewise for and . Substituting the asymptotic expansion for each of the cosines into the spherical relation for a right triangle yields \begin{align} 1-\frac{c^2}{2R^2} + O{\left(R^{-4}\right)} &= \left(1-\frac{a^2}{2R^2} + O{\left(R^{-4}\right)} \right) \left(1-\frac{b^2}{2R^2} + O{\left(R^{-4}\right)} \right) \\ &= 1 - \frac{a^2}{2R^2} - \frac{b^2}{2R^2} + O{\left(R^{-4}\right)}. \end{align} Subtracting 1 and then negating each side, \frac{c^2}{2R^2} = \frac{a^2}{2R^2} + \frac{b^2}{2R^2} + O{\left(R^{-4}\right)}. Multiplying through by the asymptotic expansion for in terms of fixed , and variable is c^2 = a^2 + b^2 + O{\left(R^{-2}\right)}. The Euclidean Pythagorean relationship c^2 = a^2 + b^2 is recovered in the limit, as the remainder vanishes when the radius approaches infinity. For practical computation in spherical trigonometry with small right triangles, cosines can be replaced with sines using the double-angle identity \cos{2\theta} = 1 - 2\sin^2{\theta} to avoid
loss of significance. Then the spherical Pythagorean theorem can alternately be written as \sin^2{\frac c{2R}} = \sin^2{\frac a{2R}} + \sin^2{\frac b{2R}} - 2 \sin^2{\frac a{2R}} \, \sin^2{\frac b{2R}}.
Hyperbolic geometry In a
hyperbolic space with uniform
Gaussian curvature , for a right
triangle with legs , , and hypotenuse , the relation between the sides takes the form: \cosh \frac{c}{R} = \cosh \frac{a}{R} \, \cosh \frac{b}{R} where cosh is the
hyperbolic cosine. This formula is a special form of the
hyperbolic law of cosines that applies to all hyperbolic triangles: \cosh \frac{c}{R} = \cosh \frac{a}{R} \, \cosh \frac{b}{R} - \sinh \frac{a}{R} \, \sinh \frac{b}{R} \, \cos \gamma , with the angle at the vertex opposite the side . By using the
Maclaurin series for the hyperbolic cosine, , it can be shown that as a hyperbolic triangle becomes very small (that is, as , , and all approach zero), the hyperbolic relation for a right triangle approaches the form of Pythagoras's theorem. For small right triangles , the hyperbolic cosines can be eliminated to avoid
loss of significance, giving \sinh^2 \frac{c}{2R} = \sinh^2 \frac{a}{2R} + \sinh^2 \frac{b}{2R} + 2 \sinh^2 \frac{a}{2R} \sinh^2 \frac{b}{2R} .
Very small triangles For any uniform curvature (positive, zero, or negative), in very small right triangles () with hypotenuse , it can be shown that c^2 = a^2 + b^2 - \frac{K}{3} a^2 b^2 - \frac{K^2}{45} a^2 b^2 (a^2 + b^2) - \frac{2 K^3}{945} a^2 b^2 (a^2 - b^2)^2 + O (K^4 c^{10}) .
Differential geometry (top) and
polar coordinates (bottom), as given by Pythagoras's theorem The Pythagorean theorem applies to
infinitesimal triangles seen in
differential geometry. In three dimensional space, the distance between two infinitesimally separated points satisfies ds^2 = dx^2 + dy^2 + dz^2, with the element of distance and (, , ) the components of the vector separating the two points. Such a space is called a
Euclidean space. However, in
Riemannian geometry, a generalization of this expression useful for general coordinates (not just Cartesian) and general spaces (not just Euclidean) takes the form: ds^2 = \sum_{i,j}^n g_{ij}\, dx_i\, dx_j which is called the
metric tensor. It may be a function of position, and often describes
curved space. A simple example is Euclidean (flat) space expressed in
curvilinear coordinates. For example, in
polar coordinates: ds^2 = dr^2 + r^2 d\theta^2 . ==See also==