Medians, heights and angle bisectors can only be calculated from the three sides. All formulas come out of metric relations — and a single relation, Stewart’s, solves them all at once.

Who discovered

The median formula is known as Apollonius’ theorem: Papo of Alexandria attributes it to Apollonius of Perga (3rd century BC). The height formula uses the area of ​​the triangle as a function of the sides, the Heron’s formula, demonstrated by Heron of Alexandria in the 1st century, in the Metric (the Arabs attributed it to Archimedes). The relation that holds for any segment connecting a vertex to the opposite side was published by the Scotsman Matthew Stewart in 1746, in the book Some General Theorems of Considerable Use in the Higher Parts of Mathematics.

The story

Stewart (1717–1785) was a student of Robert Simson at Glasgow and Colin Maclaurin at Edinburgh, and succeeded Maclaurin as professor of mathematics. He advocated purely geometric methods, in the Greek manner, even for astronomical problems, such as calculating the distance to the Sun.

The segment that connects a vertex to a point on the opposite side is today called ceviana, in honor of the Italian Giovanni Ceva (1678). Medians, heights and angle bisectors are particular Cevians, and so the Stewart relation gives the formulas for all of them.

In everyday life

  • Structures. The length of an internal strut of a truss, connecting a node to a point on the opposite member, falls outside the Stewart relation.
  • Area of ​​land. With Heron’s formula, the area of ​​a triangular land is calculated only with the measurements of the three sides, without measuring angles.
  • Design and computer graphics. Modeling programs calculate medians and centroids to divide and balance triangle meshes.
  • Navigation. The midpoint between two ports and the distance of a ship from it are median problems.

Sources: Matthew Stewart (MacTutor) · Heron of Alexandria (MacTutor) · Apollonius (MacTutor).

Theory and constructions

Choose the notable line and drag the vertices. The measurement in the figure coincides with that calculated by the formula, only with the sides.

Calculation of medians

TeoremaMedians depending on the sides

Since $a$, $b$ and $c$ are the sides of a triangle, the medians relative to these sides measure

$$m_a = \frac{1}{2}\sqrt{2(b^2 + c^2) - a^2}, \qquad m_b = \frac{1}{2}\sqrt{2(a^2 + c^2) - b^2}, \qquad m_c = \frac{1}{2}\sqrt{2(a^2 + b^2) - c^2}.$$
View the deduction

Let $M$ be the midpoint of $\overline{BC}$ and $D$ be the foot of the height by $A$, with $x$ the distance from $M$ to $D$. In triangles $AMC$ and $AMB$ (one with an obtuse angle and the other with an acute angle in $M$):

$$b^2 = m_a^2 + \left(\frac{a}{2}\right)^2 + 2\cdot\frac{a}{2}\cdot x, \qquad c^2 = m_a^2 + \left(\frac{a}{2}\right)^2 - 2\cdot\frac{a}{2}\cdot x.$$

Adding: $b^2 + c^2 = 2m_a^2 + \dfrac{a^2}{2}$, then $4m_a^2 = 2(b^2 + c^2) - a^2$. If $\hat M$ is straight, the result is immediate according to the Pythagorean theorem.

ExemploMedians of the triangle with sides 5, 7 and 8

With $a = 5$, $b = 7$ and $c = 8$:

$$m_a = \tfrac{1}{2}\sqrt{2(49 + 64) - 25} = \tfrac{1}{2}\sqrt{201}, \quad m_b = \tfrac{1}{2}\sqrt{2(25 + 64) - 49} = \tfrac{1}{2}\sqrt{129}, \quad m_c = \tfrac{1}{2}\sqrt{2(25 + 49) - 64} = \sqrt{21}.$$

Note. We could obtain $m_c$ without the formula, by the law of cosines in the triangles $CBM$ and $CAM$ (with $\alpha$ the angle in $M$): $5^2 = m_c^2 + 4^2 - 8m_c\cos\alpha$ and $7^2 = m_c^2 + 4^2 + 8m_c\cos\alpha$. Adding, $2m_c^2 = 42$ and $m_c = \sqrt{21}$.

Calculation of heights

TeoremaHeights depending on sides

With $2p = a + b + c$ being the perimeter of the triangle ($p$ is the semiperimeter):

$$h_a = \frac{2}{a}\sqrt{p(p - a)(p - b)(p - c)}, \qquad h_b = \frac{2}{b}\sqrt{p(p - a)(p - b)(p - c)}, \qquad h_c = \frac{2}{c}\sqrt{p(p - a)(p - b)(p - c)}.$$
View the deduction

Let $\overline{CD} = h_c$ and $m$ be the projection of $b$ onto $c$. In $\triangle ADC$: $h_c^2 = b^2 - m^2$ (1). According to the metric relationship, $a^2 = b^2 + c^2 \mp 2cm$, therefore $m = \pm\dfrac{b^2 + c^2 - a^2}{2c}$ (2). Replacing (2) into (1):

$$4c^2h_c^2 = (2bc)^2 - (b^2 + c^2 - a^2)^2 = (2bc + b^2 + c^2 - a^2)(2bc - b^2 - c^2 + a^2)$$$$= [(b + c)^2 - a^2]\,[a^2 - (b - c)^2] = (b + c + a)(b + c - a)(a + b - c)(a - b + c).$$

Such as $a + b + c = 2p$, $-a + b + c = 2(p - a)$, $a - b + c = 2(p - b)$ and $a + b - c = 2(p - c)$:

$$4c^2h_c^2 = 2p \cdot 2(p - a) \cdot 2(p - b) \cdot 2(p - c) \;\Rightarrow\; h_c = \frac{2}{c}\sqrt{p(p - a)(p - b)(p - c)}.$$

ExemploTriangle heights of sides 5, 7 and 8

$p = 10$, $p - a = 5$, $p - b = 3$, $p - c = 2$ and $\sqrt{p(p - a)(p - b)(p - c)} = \sqrt{300} = 10\sqrt{3}$. Then

$$h_a = \frac{2}{5}\cdot 10\sqrt{3} = 4\sqrt{3}, \qquad h_b = \frac{2}{7}\cdot 10\sqrt{3} = \frac{20\sqrt{3}}{7}, \qquad h_c = \frac{2}{8}\cdot 10\sqrt{3} = \frac{5\sqrt{3}}{2}.$$

Note. Formulas do not always simplify calculations. In a triangle with sides $\sqrt{5}$, $\sqrt{10}$ and 5, the height relative to the largest side comes out faster through Pythagoras: with $x$ the projection of the side $\sqrt{5}$, $h^2 + x^2 = 5$ and $h^2 + (5 - x)^2 = 10$; subtracting, $10x = 20$, $x = 2$ and $h = 1$.

Stewart ratio

TeoremaStewart ratio

Given a triangle $ABC$ and $D$ being a point on the side $\overline{AB}$, with $BC = a$, $AC = b$, $AB = c$, $DB = x$, $AD = y$ and $CD = z$, it is worth

$$a^2y + b^2x - z^2c = cxy.$$
Drag point D over side AB and the vertices. The two members of Stewart’s relationship always remain the same.
View the demo

Let $m$ be the projection of $\overline{CD}$ onto $\overline{AB}$. By metric relations, in the triangles $BCD$ and $ACD$ (one angle in $D$ is acute and the other obtuse):

$$a^2 = x^2 + z^2 \mp 2xm \quad (1) \qquad b^2 = y^2 + z^2 \pm 2ym \quad (2)$$

Multiplying (1) by $y$ and (2) by $x$ and adding, the terms with $m$ cancel each other out:

$$a^2y + b^2x = xy(x + y) + z^2(x + y) = cxy + z^2c \;\Rightarrow\; a^2y + b^2x - z^2c = cxy.$$

ExemploApplication: circle tangent to three others

Consider the circles $\lambda(O, 3)$, $\lambda(O_1, 2)$ and $\lambda(O_2, 1)$, with $O_1$ and $O_2$ on one diameter and the two smallest tangents to each other and tangents internally to the largest, and a fourth circle $\lambda(O_3, x)$ tangent to the three. In the triangle $O_1O_2O_3$: $O_1O_2 = 3$, $O_1O_3 = 2 + x$, $O_2O_3 = 1 + x$; and also $OO_1 = 1$, $OO_2 = 2$ and $OO_3 = 3 - x$. Applying Stewart’s relation to cevian $\overline{O_3O}$:

$$(1 + x)^2 \cdot 1 + (2 + x)^2 \cdot 2 - (3 - x)^2 \cdot 3 = 3 \cdot 2 \cdot 1 \;\Rightarrow\; 28x = 24 \;\Rightarrow\; x = \frac{6}{7}.$$

Note. With the Stewart ratio, medians are also calculated: just take $x = y = \dfrac{c}{2}$.

Calculation of internal angle bisectors

Teoremaangle bisectors internal depending on the sides

$$s_a = \frac{2}{b + c}\sqrt{bc\,p(p - a)}, \qquad s_b = \frac{2}{a + c}\sqrt{ac\,p(p - b)}, \qquad s_c = \frac{2}{a + b}\sqrt{ab\,p(p - c)}.$$
View the deduction

angle bisector $\overline{AS}$ divides $\overline{BC}$ into $x$ (side of $B$) and $y$ (side of $C$). By the theorem of internal angle bisector, $\dfrac{x}{c} = \dfrac{y}{b}$ and $x + y = a$; then $x = \dfrac{ac}{b + c}$ and $y = \dfrac{ab}{b + c}$. From Stewart’s link in $\triangle ABC$, $b^2x + c^2y - s_a^2a = xya$. Replacing:

$$(b + c)^2 s_a^2 = bc\,[(b + c)^2 - a^2] = bc\,(b + c + a)(b + c - a) = bc \cdot 2p \cdot 2(p - a),$$

where $s_a = \dfrac{2}{b + c}\sqrt{bc\,p(p - a)}$.

Exemploangle bisectors internal triangle sides 5, 7 and 8

With $p = 10$, $p - a = 5$, $p - b = 3$ and $p - c = 2$:

$$s_a = \frac{2}{15}\sqrt{7 \cdot 8 \cdot 10 \cdot 5} = \frac{2}{15}\cdot 20\sqrt{7} = \frac{8\sqrt{7}}{3}, \qquad s_b = \frac{2}{13}\sqrt{5 \cdot 8 \cdot 10 \cdot 3} = \frac{40\sqrt{3}}{13}, \qquad s_c = \frac{2}{12}\sqrt{5 \cdot 7 \cdot 10 \cdot 2} = \frac{5\sqrt{7}}{3}.$$

Calculation of external angle bisectors

Teoremaangle bisectors external depending on the sides

$$s^{\prime}_a = \frac{2}{|b - c|}\sqrt{bc\,(p - b)(p - c)}, \qquad s^{\prime}_b = \frac{2}{|a - c|}\sqrt{ac\,(p - a)(p - c)}, \qquad s^{\prime}_c = \frac{2}{|a - b|}\sqrt{ab\,(p - a)(p - b)}.$$

If $b = c$, the expression of $s^{\prime}_a$ is meaningless: the angle bisector of the external angle of the vertex of a isosceles triangle is parallel to the base.

View the deduction

Let $b > c$. The external angle bisector $\overline{AS^{\prime}}$ meets the line $BC$ at a point $S^{\prime}$ beyond $B$; be $S^{\prime}B = x$ and $S^{\prime}C = y$, so that $y - x = a$. By the theorem of external angle bisector, $\dfrac{x}{c} = \dfrac{y}{b}$; then $x = \dfrac{ac}{b - c}$ and $y = \dfrac{ab}{b - c}$. Applying the Stewart relation in the triangle $AS^{\prime}C$ with the cevian $\overline{AB}$:

$$s^{\prime 2}_a \cdot a + b^2x - c^2y = a\,x\,y.$$

Replacing $x$ and $y$:

$$(b - c)^2 s^{\prime 2}_a = bc\,[a^2 - (b - c)^2] = bc\,(a + b - c)(a - b + c) = bc \cdot 2(p - c) \cdot 2(p - b),$$

where $s^{\prime}_a = \dfrac{2}{|b - c|}\sqrt{bc\,(p - b)(p - c)}$. If $b < c$, $b - c$ is replaced by $c - b$: that is why the difference appears in module.

Exemploangle bisectors external triangle sides 5, 7 and 8

$$s^{\prime}_a = \frac{2}{1}\sqrt{7 \cdot 8 \cdot 3 \cdot 2} = 8\sqrt{21}, \qquad s^{\prime}_b = \frac{2}{3}\sqrt{5 \cdot 8 \cdot 5 \cdot 2} = \frac{40}{3}, \qquad s^{\prime}_c = \frac{2}{2}\sqrt{5 \cdot 7 \cdot 5 \cdot 3} = 5\sqrt{21}.$$