Mathematical reasoning: describing an inscribed triangle#

The goal of this project is to use mathematical reasoning, regression analysis, and mathematical tools to determine some rules about how to inscribe an equilateral triangle within a circle of a given radius. In particular, we are interested in determining the:

  • coordinates of the end points of the the base of the triangle if the apex is at (0,r).
  • perimeter of the triangle, given only the radius of the circle.

Calculating the base using the radius#


To begin, we will create a circle of \(r=1\) and manually determine the base position by comparing the lengths of the base line to the length of one of the sides. Since the base is always a horizontal line, if one side length is equal to the base line length, the triangle will be equilateral.

In desmos, create a circle with a radius of 1, and create an apex point at \((0,r)\). Label the coordinate \(x_0\) and \(y_0\) in order to distiguish them from the other vertices. Then make two aribitrary points on the circle to form the base, ensuring they are colinear and parallel with the x-axis. The simplest way to do this accurately is to use the equation for a circle, choose a \(y\) value, and solve for the \(x\) value. The other point will simply be \((-x,y)\). I chose a \(y=-0.5\) Be sure to label these coordinates with numbers as well, as shown.

Next, we need to compare the distance between the base end points and the length of one side of the triangle. In order for the triangle to be equilateral, these lengths must be equal. We would normally use the distance formula to find the distance between two points, but there is no need. Since the y values are the same for both points, we will just use subtraction to determine distance.

Note

The y terms are the same, so the differnce is zero. The square and square root cancel. \(\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}=\sqrt{(x_2-x_1)^2}=x_2-x_1\)

However, to determine the distance between \((x_0,y_0)\) and \((x_1,y_1)\) we will need to use the distance formula.

Choosing \(y_1=-0.5\) was a lucky guess, giving us two equal lengths. Notice that shifting the y value with the slider makes \(L_1\) and \(L_2\) diverge.

Let's do a few more circles for comparision, eyeballing a good baseline position and then fine tuning to the actual value with the \(y_1\) slider. The pattern is clear:

For each radial increase by \(1\), the y-value drops by \(-0.5\). We can write this relationship as an equation: \(y_1=-0.5r\).

From here we can use the equation for a circle and solve for \(x\).

\(x^2+y^2=r^2\)
\(x^2=r^2-y^2\)
\(x=\sqrt{r^2-y^2}\)

This is the solution to our first query: What are the coordinates of the end points of the base of the triangle if the apex is at (0,r)?

\(y_1,y_2=-0.5r\)
\(x_1=\sqrt{r^2-y_1^2}\)
\(x_2=-\sqrt{r^2-y_2^2}\)

Side note about regression#

You can use linear regression in desmos to determine \(y_1=-0.5r\) if it is not intuitive.

The tilda character ~ informs demos that we are proposing a regression model. It will then return some values for our variables and tell us how well they work. In this case, we use the equation for a line \(y=ax+b\) (in the form \(y_1=ar+b\)), and desmos suggests \(a=-0.5\) and \(b=0\). This means that there is no constant value. The \(r=-1\) shows a perfect negative correlation: \(y_1=-0.5r+0 = -0.5r\)

Note

Why did we use a linear model instead of an exponential, logarithmic, sinusoidal, or some other regression model? Whenever an x shows a regular change, and its y value changes by some regular fixed value as well, it will be linear.

Calculating the perimeter of the triangle using the radius#

To answer the second question, and determine the inscribed triangle perimeter using only the radius of the circle, we are going to get some help from Wolfram Alpha to find a closed expression representing the ratio of the perimeter of the triangle to the circumference of the circle. We are using a ratio, because ratios will scale with the circle radius.

Choose an arbitary radius, and its associated Y_1 value (see above). Then choose one side length of the triangle and multiply it by \(3\):

\(r=5, y_1=-2.5\)
\(C=2\pi r=31.4159265359\ldots\)
\(x_1=\sqrt{r^2-y_1^2}=4.33012701892\ldots\)
\(x_2=-\sqrt{r^2-y_1^2}=-4.33012701892\ldots\)
\(L_1=x_1-x_2=8.66025403784\ldots\)
\(L=3\cdot L_1\)
\(L=3\cdot 8.66025403784=25.9807621135\ldots\)
\(\frac{L}{C}=\frac{25.9807621135}{31.4159265359}=0.826993343133\)

This is where Wolfram Alpha is useful. You can type in an irrational number and discover potential closed forms for \(\frac{L}{C}=0.826993343133\).

if \(\frac{3\sqrt{3}}{2\pi}=\frac{L}{C}\)
then \(L=\frac{3\sqrt{3}}{2\pi}\cdot C=\frac{3\sqrt{3}}{2\pi}\cdot 2\pi r=3r\sqrt{3}\)

This final form is generally applicable for all circle radii, because it only depends upon the radius, without any needed information about the triangles vertices - apart from the apex being at \((0,r)\).

So our derived set of equations are:

\(y_1,y_2=-0.5r\)
\(x_1=\sqrt{r^2-y_1^2}\)
\(x_2=-\sqrt{r^2-y_2^2}\)
\(L=3r\sqrt{3}\)

Let's try them out in a table using radii corresponding to the first serval prime numbers:

Notice that \(3L_1\) (three times the length of one side) requires knowledge of the vertex coordinates, while \(3r\sqrt{3}\) only requires the radius of the circle.

Using a rotation matrix#

Of course, the first vertex doesn't need to be at (0,r). We can rotate the inscribed equilateral triangle into any orientation we wish using a rotation matrix. First, use p and q as arrays containing all the x and y values for each vertex of the triangle:

\(p=[x_0,x_1,x_2]\)
\(q=[y_0,y_1,y_2]\)

Then use the rotation matrix on the arrays:

\(\begin{pmatrix} p_{rot}\\ q_{rot} \end{pmatrix}= \begin{pmatrix} p\\ q \end{pmatrix} \begin{pmatrix} cos \theta & -sin \theta\\ sin \theta & cos \theta \end{pmatrix}\)

Matrix multiplication produces the following equations: \(p_{rot}=p \cos \theta - q \sin \theta\)
\(q_{rot}=p \sin \theta + q \cos \theta\)

To animate the rotation in demos, set theta to \(0\) and set the range from \(0\) to \(2\pi\), and press play. The equilateral triangle will rotate counter clockwise one full rotation. Here is a functional example. Click on edit graph in the lower right corner of the image for more details.