Triangle Line Picking

Isosceles triangle triangle line picking

Consider the average length of a line segment determined by two points picked at random in the interior of an arbitrary triangle Delta(a,b,c) with side lengths a, b, and c. This problem is not affine, but a simple formula in terms of the area or linear properties of the original triangle can be found using Borel's overlap technique to collapse the quadruple integral to a double integral and then convert to polar coordinates, leading to the beautiful general formula


(A. G. Murray, pers. comm., Apr. 4, 2020), where s=(a+b+c)/2 is the semiperimeter and s_i=s-i. The formulas for odd moments have a similar form to that of the mean but with higher powers of a, b, c, and the triangle area Delta=sqrt(ss_as_bs_c).

This formula immediately gives the special cases obtained below originally using brute-force computer algebra.

Equilateral triangle line pickingEquilateralTriangleLinePickingDistribution

If the original triangle is chosen to be an equilateral triangle with unit side lengths, then the average length of a line with endpoints chosen at random inside it is given by


The integrand can be split up into the four pieces


As illustrated above, symmetry immediately gives I_2=I_3 and I_1=I_4, so


With some effort, the integrals I_1 and I_2 can be done analytically to give the final beautiful result


(OEIS A093064; E. W. Weisstein, Mar. 16, 2004).


If the original triangle is chosen to be an isosceles right triangle with unit legs, then the average length of a line with endpoints chosen at random inside it is given by


(OEIS A093063; M. Trott, pers. comm., Mar. 10, 2004), which is numerically surprisingly close to sqrt(2)-1=0.414213....

The mean length of a line segment picked at random in a 3, 4, 5 triangle is given by


(E. W. Weisstein, Aug. 6-9, 2010; OEIS A180307).

The mean length of a line segment picked at random in a 30-60-90 triangle with unit hypotenuse was computed by E. W. Weisstein (Aug. 5, 2010) as a complicated analytic expression involving sums of logarithms. After simplification, the result can be written as


(E. Weisstein, M. Trott, A. Strzebonski, pers. comm., Aug. 25, 2010; OEIS A180308).

The expected distance from a random point in a general triangle to the vertex A opposite the side of length a is


(A. G. Murray, pers. comm., Apr. 4, 2020), with analogous expressions for d_(Delta(a,b,c),B) and d_(Delta(a,b,c),C). These give the beautiful identity


(A. G. Murray, pers. comm., Apr. 4, 2020).

See also

Equilateral Triangle, Isosceles Right Triangle, Square Line Picking, Triangle Point Picking, Triangle Triangle Picking

Explore with Wolfram|Alpha


Pure, R.; Durran, S.; Tong, F.; Pan, J. "Distance Distribution Between Two Random Points in Arbitrary Polygons." To appear in Math. Meth. Appl. Sci.Sheng, T. .K. "The Distance between Two Random Points in Plane Regions." Adv. Appl. Prob. 17, 748-773, 1985.Sloane, N. J. A. Sequences A093063, A093064, A180307, and A180308 in "The On-Line Encyclopedia of Integer Sequences."

Referenced on Wolfram|Alpha

Triangle Line Picking

Cite this as:

Weisstein, Eric W. "Triangle Line Picking." From MathWorld--A Wolfram Web Resource.

Subject classifications