Library · Geometric Probability · Chapter 43

Sylvester’s four-point problem in a triangle

Revised Report an error

Problem 43.1

Let P1,P2,P3,P4P_1, P_2, P_3, P_4 be four points chosen independently and uniformly at random in a triangle TT. What is the probability that they form the vertices of a convex quadrilateral?

Solution. Step 1: the disjoint-events dichotomy. Four points in the plane in general position either lie in convex position (their convex hull is a quadrilateral) or else exactly one of the four lies inside the triangle formed by the other three. Let EiE_i denote the event “PiP_i lies strictly inside △PjPkPl\triangle P_j P_k P_l” (the triangle of the other three). The events E1,E2,E3,E4E_1, E_2, E_3, E_4 are mutually exclusive, and P(convex)+P(E1∪E2∪E3∪E4)=1.\mathbb{P}(\text{convex}) + \mathbb{P}(E_1 \cup E_2 \cup E_3 \cup E_4) = 1.

Step 2: reduce to the expected-area lemma. By symmetry, P(Ei)\mathbb{P}(E_i) is the same for each ii. For i=4i = 4, condition on P1,P2,P3P_1, P_2, P_3: P(E4)=E ⁣[Area⁡(△P1P2P3)Area⁡(T)]=E[Area⁡(△P1P2P3)]Area⁡(T).\mathbb{P}(E_4) = \mathbb{E}\!\left[\frac{\operatorname{Area}(\triangle P_1 P_2 P_3)}{\operatorname{Area}(T)}\right] = \frac{\mathbb{E}[\operatorname{Area}(\triangle P_1 P_2 P_3)]}{\operatorname{Area}(T)}.

Step 3: the expected area is Area⁡(T)/12\operatorname{Area}(T)/12. We claim that for three uniform random points in a triangle TT, E[Area⁡(△P1P2P3)]=Area⁡(T)12.(⋆)\mathbb{E}[\operatorname{Area}(\triangle P_1 P_2 P_3)] = \frac{\operatorname{Area}(T)}{12}. \tag{$\star$} By affine invariance of both sides under linear maps T→TT \to T, we may take TT to be the standard triangle with vertices (0,0),(1,0),(0,1)(0,0), (1,0), (0,1), of area 12\tfrac12. Write Pi=(Xi,Yi)P_i = (X_i, Y_i). The signed area is 12D\tfrac12 D with D=(X2−X1)(Y3−Y1)−(X3−X1)(Y2−Y1),D = (X_2 - X_1)(Y_3 - Y_1) - (X_3 - X_1)(Y_2 - Y_1), so Area⁡(△P1P2P3)=12∣D∣\operatorname{Area}(\triangle P_1 P_2 P_3) = \tfrac12 |D|. Direct integration (using the density 22 on TT and repeated Fubini) gives E[∣D∣]=112\mathbb{E}[|D|] = \tfrac1{12}, hence E[Area⁡]=124=112⋅Area⁡(T)\mathbb{E}[\operatorname{Area}] = \tfrac1{24} = \tfrac1{12} \cdot \operatorname{Area}(T). The computation is tedious but elementary.

Step 4: assemble. From Steps 1–3, P(convex)=1−4⋅112=1−13=23.■\boxed{\mathbb{P}(\text{convex}) = 1 - 4 \cdot \tfrac{1}{12} = 1 - \tfrac13 = \tfrac23.} \qedhere

Sylvester’s four-point problem in a triangle. Four uniform random points either form a convex quadrilateral (left, probability \tfrac23 ) or have exactly one point inside the triangle of the other three (right, probability \tfrac13 ). The expected area of a random sub-triangle is \tfrac1{12} of the
Sylvester’s four-point problem in a triangle. Four uniform random points either form a convex quadrilateral (left, probability 23\tfrac23) or have exactly one point inside the triangle of the other three (right, probability 13\tfrac13). The expected area of a random sub-triangle is 112\tfrac1{12} of the triangle’s area.
import numpy as np
# 4 uniform points in standard triangle (fold-sampled); directly test convex
# position by checking no point is strictly inside the triangle of the other 3.
N = 10**6
u, v = np.random.rand(2, 4, N)
mask = u + v > 1
u, v = np.where(mask, 1-u, u), np.where(mask, 1-v, v)
def inside_tri(pu, pv, au, av, bu, bv, cu, cv):
    det = (bv-cv)*(au-cu) + (cu-bu)*(av-cv)
    w1 = ((bv-cv)*(pu-cu) + (cu-bu)*(pv-cv)) / det
    w2 = ((cv-av)*(pu-cu) + (au-cu)*(pv-cv)) / det
    return (w1 > 0) & (w2 > 0) & (1 - w1 - w2 > 0)
any_in = np.zeros(N, dtype=bool)
for i in range(4):
    j, k, l = [m for m in range(4) if m != i]
    any_in |= inside_tri(u[i], v[i], u[j], v[j], u[k], v[k], u[l], v[l])
print(f"sim: {(1 - any_in).mean():.5f}   exact: {2/3:.5f}")
# sim: 0.66736   exact: 0.66667
Report an error on this page

Reports are stored by Netlify. See the privacy note.