In geometry, Stewart's theorem yields a relation between the lengths of the sides of a triangle and the length of segment from a vertex to a point on the opposite side. Let a, b, c be the sides of a triangle. Let p be a segment from A to a point on a dividing a itself in x and y. Then
- <math> a (p^2 + x y ) = b^2 x + c^2 y. \, </math> or alternatively:
- <math> ap^2 = b^2 x + c^2 y - axy . \, </math>
Proof
Call the point where a and p meet P. We start applying the law of cosines to the supplementary angles APB and APC.
- <math> b^2 = p^2 + y^2 - 2 p y \cos { \theta } \, </math>
- <math> c^2 = p^2 + x^2 + 2 p x \cos { \theta } \, </math>
Multiply the first by x the latter by y :
- <math> x b^2 = x p^2 + x y^2 - 2 p x y \cos { \theta } \, </math>
- <math> y c^2 = y p^2 + y x^2 + 2 p x y \cos { \theta } \, </math>
Now add the two equations:
- <math> x b^2 + y c^2 = (x+y) p^2 + x y (x + y), \, </math>
and this is Stewart's theorem.


