Stewart's Theorem for the Length of Any Cevian
One formula gives the length of any line from a vertex to the opposite side; see the proof, special cases and examples.
Key takeaways
- Stewart's theorem links the three sides, one cevian and the two pieces it cuts from the base.
- Each squared side is multiplied by the base piece that does not touch it.
- The proof needs only the Pythagorean relation, applied in coordinates.
- Putting in a midpoint gives the median length, and putting in the bisector ratio gives the bisector length.
- The formula can be solved backward to find where a cevian of a given length must land.
Stewart's theorem finds the length of a cevian, a segment from a vertex of a triangle to a point on the opposite side. If you know all three sides and where the cevian lands, you can compute its length without measuring a single angle.
Suppose D lies on side BC and splits it into BD = m and DC = n, so that a = m + n. Write b for AC, c for AB and d for AD. Then
b²·m + c²·n = a·(d² + m·n) Getting the letters in the right places
The only tricky part is the pairing. Side b = AC is multiplied by m = BD, which sits at the other end of the base. Side c = AB is multiplied by n = DC.
A popular memory aid rearranges the formula as man + dad = bmb + cnc, read as "a man and his dad put a bomb in the sink". In symbols it says m·a·n + d·a·d = b·m·b + c·n·c, which is the same equation.
If you forget the pairing, test an extreme case. Let D slide to C, so that m = a and n = 0. The formula becomes b²·a = a·d², giving d = b. That is right, because AD has turned into AC.
A proof with coordinates
Put the base on the horizontal axis with D at the origin. Then B = (−m, 0) and C = (n, 0). Let A = (x, y). The distance formula, which is the Pythagorean theorem in coordinates, gives
c² = (x + m)² + y² = d² + 2mx + m²
b² = (x − n)² + y² = d² − 2nx + n² Here d² = x² + y². The two lines differ in the sign of the term containing x, and that term is the only thing that depends on the direction of the cevian. Multiply the first line by n and the second by m, then add.
c²n + b²m = d²(n + m) + 2mnx − 2mnx + m²n + mn²
= (m + n)·d² + mn·(m + n)
= a·(d² + mn) The x terms cancel exactly, which is why no angle appears in the result.
A first example
A triangle has AB = 7, AC = 8 and BC = 10. Point D lies on BC with BD = 4, so DC = 6. How long is AD?
b²m + c²n = 64·4 + 49·6 = 256 + 294 = 550
550 = 10·(d² + 4·6)
55 = d² + 24
d² = 31 So AD = √31 ≈ 5.57. As a sanity check, the answer is smaller than both neighboring sides, which is typical for a cevian landing well inside the base.
Solving for d in general
It is often convenient to rewrite the theorem with d² alone. Let t = m / a, the fraction of the way from B to C. Then
d² = t·b² + (1 − t)·c² − t(1 − t)·a² The first two terms form a weighted average of the squares of the sides. The last term subtracts a correction that is zero at both ends and greatest at the middle.
Example: a trisection point. In an equilateral triangle of side 6, D is one third of the way along BC. Here t = 1/3, so d² = 12 + 24 − (2/9)·36 = 28. The cevian has length 2√7 ≈ 5.29.
The median as a special case
If D is the midpoint, then m = n = a/2. The formula collapses to
d² = (2b² + 2c² − a²) / 4 This is Apollonius' theorem, which was known long before Stewart. For sides b = 9, c = 7 and a = 8, d² = (162 + 98 − 64) / 4 = 49, so the median is exactly 7.
The angle bisector as a special case
For the bisector of angle A, the angle bisector theorem gives m = ac / (b + c) and n = ab / (b + c). Substitute into the left side.
b²m + c²n = (a·b²c + a·bc²) / (b + c) = abc
so abc = a·(d² + mn)
d² = bc − mn The square of a bisector equals the product of the neighboring sides minus the product of the base pieces. With b = 6, c = 8 and a = 7, the pieces are m = 4 and n = 3, so d² = 48 − 12 = 36.
The isosceles case
Let b = c. The left side becomes b²·a, and cancelling a gives
b² − d² = m·n For any point D on the base of an isosceles triangle, the drop from the square of the leg to the square of the cevian equals the product of the two base pieces. This is a disguised form of the power of a point: draw the circle centered at A with radius b, and BC is a chord of it divided at D.
| Type of cevian from A | Base pieces | Squared length |
|---|---|---|
| General | m and n | (b²m + c²n)/a − mn |
| Median | a/2 and a/2 | (2b² + 2c² − a²)/4 |
| Angle bisector | ac/(b + c) and ab/(b + c) | bc − mn |
| Any, with b = c | m and n | b² − mn |
A practical length
Picture a symmetric triangular frame with two sloping members of 5 meters and a base of 8 meters. A strut is to run from the apex to a point on the base 2 meters from one end. What length is needed on paper?
Because the two sloping sides are equal, the isosceles form applies with m = 2 and n = 6.
d² = 25 − 2·6 = 13
d ≈ 3.61 meters This is only the geometric length between two points. Real framing has to allow for joints and loads, and any structural member should follow a qualified engineer's design and the local building code.
A neat identity from two cevians
Stewart's theorem is also a good machine for discovering relations. Let D and E trisect side BC, with D nearer B. Use t = 1/3 and then t = 2/3.
AD² = (1/3)b² + (2/3)c² − (2/9)a²
AE² = (2/3)b² + (1/3)c² − (2/9)a²
AD² + AE² = b² + c² − (4/9)a² If the angle at A is right, then b² + c² = a², and the sum becomes (5/9)a². In a right triangle with hypotenuse 9, the squares of the two cevians to the trisection points always add to 45, whatever the legs are.
Try it with legs that are equal and then very unequal. The individual cevians change a good deal, but the total does not move.
Working backward
Triangle ABC has a = 9, b = 8 and c = 5. Is there a point D on BC, other than B, with AD = 5?
Put d² = 25, n = 9 − m into the theorem.
64m + 25(9 − m) = 9·(25 + m(9 − m))
225 + 39m = 225 + 81m − 9m²
9m² = 42m
m = 0 or m = 14/3 The root m = 0 is B itself, since AB = 5. The other root puts D at 14/3 from B. The two solutions lie symmetrically about the foot of the altitude, at distance 7/3 from B.
The shortest cevian
Because d² is a quadratic in m with a positive m² term, it has a single minimum. In the example above, d² = m² − (14/3)·m + 25, which is smallest at m = 7/3. There d² = 25 − 49/9 = 176/9, so d ≈ 4.42.
The shortest segment from a point to a line is the perpendicular, so this must be the altitude. Heron's formula confirms it: the area is √396 ≈ 19.90, and twice the area divided by the base 9 is about 4.42.
When D lies outside the segment
The theorem still holds if D is on line BC beyond B or C, provided you treat the base pieces as signed. For D beyond C, take n negative, with m still equal to BD and a = m + n.
Say a = 7, b = 6, c = 8 and D is 21 units beyond C, so m = 28 and n = −21. Then d² = (36 · 28 + 64 · (−21)) / 7 − (28)(−21) = −48 + 588 = 540. That is the square of the external bisector of this triangle.
When to choose it over other tools
You can always find a cevian by dropping an altitude, locating its foot and using right triangles twice. That works, but it takes several steps and invites sign errors when the foot falls outside the base.
Stewart's theorem packages those steps once. Reach for it when you know all the side lengths and the way the base is divided, and you want a length. It also suits problems where the unknown is a base piece or a side, since the same equation can be solved for any one quantity.
Look elsewhere when a problem gives angles instead of lengths, or when a pair of similar triangles is already visible. Similarity will usually be quicker then, and it explains more about why the lengths come out as they do.
Common mistakes
- Pairing b with n and c with m. Run the D = C test to catch it.
- Using the whole base where a piece is needed.
- Forgetting to take the square root at the end.
- Applying the formula to a segment that does not start at a vertex.
- Accepting both roots of a backward problem without checking that each point lies on the segment.
The theorem is named for Matthew Stewart, a Scottish mathematician who published it in 1746, though related results are older.
To test your grip on it, take a 3-4-5 triangle with the right angle at A, AB = 3 and AC = 4. Let D sit on the hypotenuse with BD = 2 and DC = 3. The theorem gives d² = (16·2 + 9·3) / 5 − 6 = 5.8, so AD ≈ 2.41. Check it by placing A at the origin and computing the position of D with coordinates.