Illustrating a triangle inequality by Erdős
Randomly generating points in a triangle to visualize an inequality
Paul Erdős conjectured a triangle inequality in 1935, a couple millennia after the classical triangle inequality. For any point inside a triangle, the distances to the vertices are at least twice the distances to the sides. This conjecture was proved a couple years later.
Maybe Erdős had a proof. I’ve heard that he would sometimes pose problems that he already had a solution to. (Incidentally, my Erdős number is 4.)
I wanted to visualize where the inequality was tighter and where it was looser by randomly generating points in a triangle, then coloring them according to the difference between the left and right sides of the inequality. So first I had to generate random points in a triangle. That resulted in this post.
Next I wrote a post on Erdős’ triangle inequality, including the random point illustration. An alternative would have been to plot contours of the difference between sides of the inequality, but the random approach was much easier, and in my opinion more aesthetically interesting.
Enjoy!