# 10.3: Random Triangles

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\id}{\mathrm{id}}$$ $$\newcommand{\Span}{\mathrm{span}}$$

( \newcommand{\kernel}{\mathrm{null}\,}\) $$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$ $$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$ $$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\id}{\mathrm{id}}$$

$$\newcommand{\Span}{\mathrm{span}}$$

$$\newcommand{\kernel}{\mathrm{null}\,}$$

$$\newcommand{\range}{\mathrm{range}\,}$$

$$\newcommand{\RealPart}{\mathrm{Re}}$$

$$\newcommand{\ImaginaryPart}{\mathrm{Im}}$$

$$\newcommand{\Argument}{\mathrm{Arg}}$$

$$\newcommand{\norm}[1]{\| #1 \|}$$

$$\newcommand{\inner}[2]{\langle #1, #2 \rangle}$$

$$\newcommand{\Span}{\mathrm{span}}$$ $$\newcommand{\AA}{\unicode[.8,0]{x212B}}$$

$$\newcommand{\vectorA}[1]{\vec{#1}} % arrow$$

$$\newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow$$

$$\newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vectorC}[1]{\textbf{#1}}$$

$$\newcommand{\vectorD}[1]{\overrightarrow{#1}}$$

$$\newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}}$$

$$\newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}}$$

$$\newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} }$$

$$\newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}}$$

$$\newcommand{\avec}{\mathbf a}$$ $$\newcommand{\bvec}{\mathbf b}$$ $$\newcommand{\cvec}{\mathbf c}$$ $$\newcommand{\dvec}{\mathbf d}$$ $$\newcommand{\dtil}{\widetilde{\mathbf d}}$$ $$\newcommand{\evec}{\mathbf e}$$ $$\newcommand{\fvec}{\mathbf f}$$ $$\newcommand{\nvec}{\mathbf n}$$ $$\newcommand{\pvec}{\mathbf p}$$ $$\newcommand{\qvec}{\mathbf q}$$ $$\newcommand{\svec}{\mathbf s}$$ $$\newcommand{\tvec}{\mathbf t}$$ $$\newcommand{\uvec}{\mathbf u}$$ $$\newcommand{\vvec}{\mathbf v}$$ $$\newcommand{\wvec}{\mathbf w}$$ $$\newcommand{\xvec}{\mathbf x}$$ $$\newcommand{\yvec}{\mathbf y}$$ $$\newcommand{\zvec}{\mathbf z}$$ $$\newcommand{\rvec}{\mathbf r}$$ $$\newcommand{\mvec}{\mathbf m}$$ $$\newcommand{\zerovec}{\mathbf 0}$$ $$\newcommand{\onevec}{\mathbf 1}$$ $$\newcommand{\real}{\mathbb R}$$ $$\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}$$ $$\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}$$ $$\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}$$ $$\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}$$ $$\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}$$ $$\newcommand{\laspan}[1]{\text{Span}\{#1\}}$$ $$\newcommand{\bcal}{\cal B}$$ $$\newcommand{\ccal}{\cal C}$$ $$\newcommand{\scal}{\cal S}$$ $$\newcommand{\wcal}{\cal W}$$ $$\newcommand{\ecal}{\cal E}$$ $$\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}$$ $$\newcommand{\gray}[1]{\color{gray}{#1}}$$ $$\newcommand{\lgray}[1]{\color{lightgray}{#1}}$$ $$\newcommand{\rank}{\operatorname{rank}}$$ $$\newcommand{\row}{\text{Row}}$$ $$\newcommand{\col}{\text{Col}}$$ $$\renewcommand{\row}{\text{Row}}$$ $$\newcommand{\nul}{\text{Nul}}$$ $$\newcommand{\var}{\text{Var}}$$ $$\newcommand{\corr}{\text{corr}}$$ $$\newcommand{\len}[1]{\left|#1\right|}$$ $$\newcommand{\bbar}{\overline{\bvec}}$$ $$\newcommand{\bhat}{\widehat{\bvec}}$$ $$\newcommand{\bperp}{\bvec^\perp}$$ $$\newcommand{\xhat}{\widehat{\xvec}}$$ $$\newcommand{\vhat}{\widehat{\vvec}}$$ $$\newcommand{\uhat}{\widehat{\uvec}}$$ $$\newcommand{\what}{\widehat{\wvec}}$$ $$\newcommand{\Sighat}{\widehat{\Sigma}}$$ $$\newcommand{\lt}{<}$$ $$\newcommand{\gt}{>}$$ $$\newcommand{\amp}{&}$$ $$\definecolor{fillinmathshade}{gray}{0.9}$$
$$\newcommand{\P}{\mathbb{P}}$$ $$\newcommand{\E}{\mathbb{E}}$$ $$\newcommand{\var}{\text{var}}$$ $$\newcommand{\R}{\mathbb{R}}$$ $$\newcommand{\N}{\mathbb{N}}$$ $$\newcommand{\area}{\text{area}}$$

## Preliminaries

### Statement of the Problem

Suppose that a stick is randomly broken in two places. What is the probability that the three pieces form a triangle?

Without looking below, make a guess.

Run the triangle experiment 50 times. Do not be concerned with all of the information displayed in the app, but just note whether the pieces form a triangle. Would you like to revise your guess?

### Mathematical Formulation

As usual, the first step is to model the random experiment mathematically. We will take the length of the stick as our unit of length, so that we can identify the stick with the interval $$[0, 1]$$. To break the stick into three pieces, we just need to select two points in the interval. Thus, let $$X$$ denote the first point chosen and $$Y$$ the second point chosen. Note that $$X$$ and $$Y$$ are random variables and hence the sample space of our experiment is $$S = [0, 1]^2$$. Now, to model the statement that the points are chosen at random, let us assume, as in the previous sections, that $$X$$ and $$Y$$ are independent and each is uniformly distributed on $$[0, 1]$$.

The random point $$(X, Y)$$ is uniformly distributed on $$S = [0, 1]^2$$.

Hence $\P\left[(X, Y) \in A\right] = \frac{\area(A)}{\area(S)}$

## Triangles

### The Probability of a Triangle

The three pieces form a triangle if and only if the triangle inequalities hold: the sum of the lengths of any two pieces must be greater than the length of the third piece.

The event that the pieces form a triangle is $$T_1 \cup T_2$$ where

1. $$T_1 = \left\{ (x, y) \in S: y \gt \frac{1}{2}, \; x \lt \frac{1}{2}, \; y - x \lt \frac{1}{2} \right\}$$
2. $$T_2 = \left\{ (x, y) \in S: x \gt \frac{1}{2}, \; y \lt \frac{1}{2}, \; x - y \lt \frac{1}{2} \right\}$$

A sketch of the event $$T$$ is given below. Curiously, $$T$$ is composed of triangles!

The probability that the pieces form a triangle is $$\P(T) = \frac{1}{4}$$.

How close did you come with your initial guess? The relative low value of $$\P(T)$$ is a bit surprising.

Run the triangle experiment 1000 times and compare the empirical probability of $$T^c$$ to the true probability.

### Triangles of Different Types

Now let us compute the probability that the pieces form a triangle of a given type. Recall that in an acute triangle all three angles are less than 90°, while an obtuse triangle has one angle (and only one) that is greater than 90°. A right triangle, of course, has one 90° angle.

Suppose that a triangle has side lengths $$a$$, $$b$$, and $$c$$, where $$c$$ is the largest of these. The triangle is

1. acute if and only if $$c^2 \lt a^2 + b^2$$.
2. obtuse if and only if $$c^2 \gt a^2 + b^2$$.
3. right if and only if $$c^2 = a^2 + b^2$$.

Part (c), of course, is the famous Pythagorean theorem, named for the ancient Greek mathematician Pythagoras.

The right triangle equations for the stick pieces are

1. $$(y - x)^2 = x^2 + (1 - y)^2$$ in $$T_1$$
2. $$(1 - x)^2 = x^2 + (y - x)^2$$ in $$T_1$$
3. $$x^2 = (y - x)^2 + (1 - y)^2$$ in $$T_1$$
4. $$(x - y)^2 = y^2 + (1 - x)^2$$ in $$T_2$$
5. $$(1 - x)^2 = y^2 + (x - y)^2$$ in $$T_2$$
6. $$y^2 = (x - y)^2 + (1 - x)^2$$ in $$T_2$$

Let $$R$$ denote the event that the pieces form a right triangle. Then $$\P(R) = 0$$.

The event that the pieces form an acute triangle is $$A = A_1 \cup A_2$$ where

1. $$A_1$$ is the region inside curves (a), (b), and (c) of the right triangle equations.
2. $$A_2$$ is the region inside curves (d), (e), and (f) of the right triangle equations.

The event that the pieces form an obtuse triangle is $$B = B_1 \cup B_2 \cup B_3 \cup B_4 \cup B_5 \cup B_6$$ where

1. $$B_1$$, $$B_2$$, and $$B_3$$ are the regions inside $$T_1$$ and outside of curves (a), (b), and (c) of the right triangle equations, respectively.
2. $$B_4$$, $$B_5$$, and $$B_6$$ are the regions inside $$T_2$$ and outside of curves (d), (e), and (f) of the right triangle equations, respectively.

The probability that the pieces form an obtuse triangle is $\P(B) = \frac{9}{4} - 3 \ln(2) \approx 0.1706$

Proof

Simple calculus shows that $$\P(B_i) = 3/8 - \ln(2) / 2$$ for each $$i \in \{1, 2, 3, 4, 5, 6\}$$. For example \begin{align} \P(B_1) & = \int_0^{1/2} \frac{x \, (1 - 2 \, x)}{2 - 2 \, x} \, dx \\ \P(B_3) & = \int_0^{1/2} \left(y + \frac{1}{2 \, y} - \frac{3}{2} \right) \, dy \end{align} From symmetry it also follows that $$\P(B_i)$$ is the same for each $$i$$.

The probability that the pieces form an acute triangle is $\P(A) = 3 \ln(2) - 2 \approx 0.07944$

Proof

Note that $$A \cup B \cup R = T$$, and $$A$$, $$B$$, and $$R$$ are disjoint.

Run the triangle experiment 1000 times and compare the empirical probabilities to the true probabilities.

This page titled 10.3: Random Triangles is shared under a CC BY 2.0 license and was authored, remixed, and/or curated by Kyle Siegrist (Random Services) via source content that was edited to the style and standards of the LibreTexts platform.