On this page
A problem gives you three sides of a triangle and a point on one of them, then asks how long the line from the opposite corner is. Stewart's theorem answers it in one line, and its proof gives you the median and bisector formulas for free.
What is a cevian, and what does Stewart's theorem say?
A cevian is a line segment that joins a vertex of a triangle to a point on the opposite side (or its extension), as Wolfram MathWorld's entry on cevians defines it. Medians, angle bisectors and altitudes are all cevians.
Label the triangle ABC with sides a = BC, b = CA and c = AB. Let the cevian AP have length d, and let P split BC into BP = m (next to side c) and PC = n (next to side b), so m + n = a. Stewart's theorem states that b²m + c²n = a(d² + mn), as given in the Wikipedia statement of Stewart's theorem.
The same page gives a memory aid: rearranged, it reads man + dad = bmb + cnc, "a man and his dad put a bomb in the sink". Note the pairing: each side's square is multiplied by the segment it does not touch.
The Scottish mathematician Matthew Stewart (1717 to 1785) published the result in 1746 in General Theorems of Considerable Use in the Higher Parts of Mathematics, according to his MacTutor biography.
How do you prove Stewart's theorem with the cosine rule?
The proof below follows the one in the Wikipedia article. It uses one idea: the two angles at P add up to 180°.
Let θ be the angle APB. Then angle APC is 180° − θ, so its cosine is −cos θ.
Cosine rule in triangle ABP: c² = m² + d² − 2dm cos θ.
Cosine rule in triangle ACP: b² = n² + d² + 2dn cos θ.
Multiply step 2 by n and step 3 by m, then add. The cos θ terms cancel.
You get b²m + c²n = m²n + mn² + (m + n)d² = (m + n)(mn + d²) = a(d² + mn).
To see where the cosine rule itself comes from, our post on the projection formula a = b cos C + c cos B builds it from the same picture.
How do you find the length of a cevian with Stewart's theorem?
Here is a worked example. Take a triangle with a = 9, b = 7 and c = 5. Point P on BC has BP = m = 3 and PC = n = 6. Find AP.
Check the labels: m = 3 sits next to c = 5, and n = 6 sits next to b = 7.
Left side: b²m + c²n = 49 × 3 + 25 × 6 = 147 + 150 = 297.
Right side: a(d² + mn) = 9(d² + 18).
Solve: d² + 18 = 33, so d² = 15 and AP = √15, about 3.87.
Sense check: AP must be shorter than the longer neighbouring side (7) and, by the triangle inequality in ABP, longer than c − m = 2. It is.
How do the median and angle-bisector formulas follow?
For a median, m = n = a/2. Stewart's theorem becomes (b² + c²)(a/2) = a(d² + a²/4), so the median from A has length squared (2b² + 2c² − a²)/4. This special case is Apollonius' theorem, as the Wikipedia page on Apollonius's theorem notes. In the example triangle the median is √67/2, about 4.09. The same page notes it is equivalent to the parallelogram law; our post on parallelogram diagonals as a + b and a − b proves it with vectors.
The bisector from A splits BC in the ratio c : b, so m = ac/(b + c) and n = ab/(b + c). Substitute, and the left side collapses to abc. Dividing by a gives d² = bc − mn, which is the same as d² = bc[1 − a²/(b + c)²], the formula in the Wikipedia article on the angle bisector theorem.
In the example triangle, m = 3.75 and n = 5.25, so d² = 35 − 19.6875 = 15.3125 and the bisector is 7√5/4, about 3.91.
What mistakes should you check for?
Swapping m and n. Write each segment beside its neighbouring side before you substitute.
Dropping the mn term on the right.
Reporting d² as the answer. Take the square root.
Using it when P lies outside BC. As written, the theorem assumes P is between B and C.
If a step goes wrong and you cannot see where, the Fermi Problem Library has a step-by-step solver that explains the reasoning rather than printing an answer. To revise the cosine rule or triangle areas behind it, look the idea up in the Fermi Concept Library, or read how the area ½ab sin C is derived.



