## Inscribed Triangle in circle problem

In the LinkedIn Pre-University Geometric Algebra group, James presents a problem from the MindYourDecisions youtube channel Impossible Viral Problem, as a candidate for solution using geometric algebra.

I tried this out and found a couple ways to solve it. One of those I’ll detail here. I have to admit that part of the reason that I wanted to solve this is that the figure in the beginning of the video really bugged me. The triangle that was inscribed in the circle didn’t have any of the length properties from the problem. I could do much better with a sloppy freehand sketch, but to do a good figure, you have to actually solve for the vertexes of the triangle (once you do that, the area is easy to figure out.)

## Formulating the problem.

Having solved the problem, the geometry of the problem is illustrated in fig. 1.

fig. 1. Inscribed triangle in circle.

I set up the problem so that the $$A,C$$ triangle vertices were symmetric with respect to the x-axis, and the $$B$$ vertex located elsewhere. I can describe those algebraically as
\label{eqn:inscribedTriangleProblem:20}
\begin{aligned}
\BA &= r \Be_1 e^{i\theta} \\
\BC &= r \Be_1 e^{-i\theta} \\
\BB &= r \Be_1 e^{i\phi},
\end{aligned}

where the radius $$r$$ and two angles $$\theta, \phi$$ are to be determined, and $$i = \Be_1 \Be_1$$ the pseudoscalar for the $$x-y$$ plane.
The vector pointing to the midpoint of the upper triangular face is given by the average of the $$\BA, \BB$$ vectors, which can be seen from
\label{eqn:inscribedTriangleProblem:40}
\BA + \frac{\BB – \BA}{2} = \frac{\BA + \BB}{2},

and similarly, the midpoint of the lower face is found at
\label{eqn:inscribedTriangleProblem:60}
\BC + \frac{\BB – \BC}{2} = \frac{\BB + \BC}{2},

The problem tells us that the respective lengths of those vectors from the origin are $$r-2, r – 3$$ respectively, so
\label{eqn:inscribedTriangleProblem:80}
\begin{aligned}
r – 2 &= \inv{2} \Abs{ \BA + \BB } \\
r – 3 &= \inv{2} \Abs{ \BB + \BC },
\end{aligned}

or
\label{eqn:inscribedTriangleProblem:100}
\begin{aligned}
(r – 2)^2 &= \frac{r^2}{4} \lr{ \Be_1 e^{i\theta} + \Be_1 e^{i\phi} }^2 \\
(r – 3)^2 &= \frac{r^2}{4} \lr{ \Be_1 e^{i\phi} + \Be_1 e^{-i\theta} }^2 \\
\end{aligned}

Finally, since the midpoint of the right edge is found at $$(r-1)\Be_1$$, it is clear that
\label{eqn:inscribedTriangleProblem:120}
\frac{r-1}{r} = \cos\theta,

or
\label{eqn:inscribedTriangleProblem:140}
r = \inv{1 – \cos\theta}.

This leaves us with three equations and three unknowns. Unfortunately, these are rather non-linear equations. In the video, a direct method of solving equivalent equations was demonstrated, but I picked the lazy route, and used Mathematica’s NSolve routine, solving for $$r,\theta, \phi$$ numerically. Since NSolve has intrinsic complex number support, I made the following substitutions:
\label{eqn:inscribedTriangleProblem:160}
\begin{aligned}
z &= e^{i\theta} \\
w &= e^{i\phi},
\end{aligned}

and then plugged those into our relations above, after expanding the squares, to find
\label{eqn:inscribedTriangleProblem:180}
\begin{aligned}
\lr{ \Be_1 e^{i\theta} + \Be_1 e^{i\phi} }^2
&=
2 + \Be_1 e^{i\theta} \Be_1 e^{i\phi} + \Be_1 e^{i\phi} \Be_1 e^{i\theta} \\
&=
2 + e^{-i\theta} \Be_1^2 e^{i\phi} + e^{-i\phi} \Be_1^2 e^{i\theta} \\
&=
2 + e^{-i\theta} \Be_1^2 e^{i\phi} + e^{-i\phi} \Be_1^2 e^{i\theta} \\
&=
2 + \frac{w}{z} + \frac{z}{w},
\end{aligned}

and
\label{eqn:inscribedTriangleProblem:200}
\begin{aligned}
\lr{ \Be_1 e^{i\phi} + \Be_1 e^{-i\theta} }^2
&=
2 + \Be_1 e^{i\phi} \Be_1 e^{-i\theta} + \Be_1 e^{-i\theta} \Be_1 e^{i\phi} \\
&=
2 + e^{-i\phi} e^{-i\theta} + e^{ i\theta} e^{i\phi} \\
&=
2 + w z + \inv{w z}.
\end{aligned}

This gives us
\label{eqn:inscribedTriangleProblem:220}
\begin{aligned}
4 \lr{ \frac{r – 2 }{r} }^2 &= 2 + \frac{w}{z} + \frac{z}{w} \\
4 \lr{ \frac{r – 3 }{r} }^2 &= 2 + w z + \inv{w z},
\end{aligned}

where
\label{eqn:inscribedTriangleProblem:240}
r = \inv{1 – \inv{2}\lr{ z + \inv{z}}}.

The NSolve gave me some garbage solutions (like $$\theta = 0$$) that must have been valid numerically, but did not encode the geometry of the problem, so I added a few additional constraints to the problem, namely
\label{eqn:inscribedTriangleProblem:260}
\begin{aligned}
z \bar{z} &= 1 \\
w \bar{w} &= 1 \\
\inv{2} \lr{ z + \inv{z} } &\ne 1 \\
1/(1 – (1/2) \textrm{Re}(z + 1/z)) &> 3.
\end{aligned}

This provided exactly two solutions, but when plotted, they turn out to just be mirror images of each other. After back substitution, the solution illustrated above was given by
\label{eqn:inscribedTriangleProblem:280}
\begin{aligned}
r &= 3.87939 \\
\theta &= 42.078 \\
\phi &= 164.125,
\end{aligned}

where these angles are in degrees, not radians.

## The triangular area.

There are probably lots of formulas for the area of a triangle (that I have forgotten), but we can compute it easily by doubling the triangle, forming a parallelogram, to find
\label{eqn:inscribedTriangleProblem:300}
\textrm{Area} = \inv{2} \Abs{ \lr{ \BA – \BC } \wedge {\BC – \BB } },

or
\label{eqn:inscribedTriangleProblem:320}
\begin{aligned}
\textrm{Area}^2
&= \frac{-1}{4} \lr{ \lr{ \BA – \BC } \wedge \lr{\BC – \BB } }^2 \\
&= \frac{-1}{4} \lr{ \BA \wedge \BC – \BA \wedge \BB + \BC \wedge \BB }^2 \\
&= \frac{-r^4}{4} \lr{\gpgradetwo{ \Be_1 e^{i\theta} \Be_1 e^{-i\theta} – \Be_1 e^{i\theta} \Be_1 e^{i\phi} + \Be_1 e^{-i\theta} \Be_1 e^{i\phi} }}^2 \\
&= \frac{-r^4}{4} \lr{\gpgradetwo{ e^{-2 i \theta} – e^{i \phi -i\theta} + e^{i\theta + i \phi} }}^2,
\end{aligned}

so
\label{eqn:inscribedTriangleProblem:340}
\textrm{Area} = \frac{r^2}{2} \Abs{ -\sin( 2 \theta ) – \sin(\phi- \theta) + \sin(\theta + \phi)}.

Plugging in $$r, \theta, \phi$$, we find
\label{eqn:inscribedTriangleProblem:360}
\textrm{Area} = 17.1866.

After computing this value, I then finally watched the original video to compare my answer, and was initially disturbed to find that this wasn’t even one of the possible values. However, that was because the problem itself, as originally stated, didn’t include the correct answer, and my worry that I’d made a mistake was unfounded, as the value I computed matched what was computed in the video (it also looks “about right” visually.)

## Canonical bivectors in spacetime algebra.

I’ve been enjoying XylyXylyX’s QED Prerequisites Geometric Algebra: Spacetime YouTube series, which is doing a thorough walk through of [1], filling in missing details. The last episode QED Prerequisites Geometric Algebra 15: Complex Structure, left things with a bit of a cliff hanger, mentioning a “canonical” form for STA bivectors that was intriguing.

The idea is that STA bivectors, like spacetime vectors can be spacelike, timelike, or lightlike (i.e.: positive, negative, or zero square), but can also have a complex signature (squaring to a 0,4-multivector.)

The only context that I knew of that one wanted to square an STA bivector is for the electrodynamic field Lagrangian, which has an $$F^2$$ term. In no other context, was the signature of $$F$$, the electrodynamic field, of interest that I knew of, so I’d never considered this “Canonical form” representation.

Here are some examples:
\label{eqn:canonicalbivectors:20}
\begin{aligned}
F &= \gamma_{10}, \quad F^2 = 1 \\
F &= \gamma_{23}, \quad F^2 = -1 \\
F &= 4 \gamma_{10} + \gamma_{13}, \quad F^2 = 15 \\
F &= \gamma_{10} + \gamma_{13}, \quad F^2 = 0 \\
F &= \gamma_{10} + 4 \gamma_{13}, \quad F^2 = -15 \\
F &= \gamma_{10} + \gamma_{23}, \quad F^2 = 2 I \\
F &= \gamma_{10} – 2 \gamma_{23}, \quad F^2 = -3 + 4 I.
\end{aligned}

You can see in this table that all the $$F$$’s that are purely electric, have a positive signature, and all the purely magnetic fields have a negative signature, but when there is a mix, anything goes. The idea behind the canonical representation in the paper is to write
\label{eqn:canonicalbivectors:40}
F = f e^{I \phi},

where $$f^2$$ is real and positive, assuming that $$F$$ is not lightlike.

The paper gives a formula for computing $$f$$ and $$\phi$$, but let’s do this by example, putting all the $$F^2$$’s above into their complex polar form representation, like so
\label{eqn:canonicalbivectors:60}
\begin{aligned}
F &= \gamma_{10}, \quad F^2 = 1 \\
F &= \gamma_{23}, \quad F^2 = 1 e^{\pi I} \\
F &= 4 \gamma_{10} + \gamma_{13}, \quad F^2 = 15 \\
F &= \gamma_{10} + \gamma_{13}, \quad F^2 = 0 \\
F &= \gamma_{10} + 4 \gamma_{13}, \quad F^2 = 15 e^{\pi I} \\
F &= \gamma_{10} + \gamma_{23}, \quad F^2 = 2 e^{(\pi/2) I} \\
F &= \gamma_{10} – 2 \gamma_{23}, \quad F^2 = 5 e^{ (\pi – \arctan(4/3)) I}
\end{aligned}

Since we can put $$F^2$$ in polar form, we can factor out half of that phase angle, so that we are left with a bivector that has a positive square. If we write
\label{eqn:canonicalbivectors:80}
F^2 = \Abs{F^2} e^{2 \phi I},

we can then form
\label{eqn:canonicalbivectors:100}
f = F e^{-\phi I}.

If we want an equation for $$\phi$$, we can just write
\label{eqn:canonicalbivectors:120}
2 \phi = \mathrm{Arg}( F^2 ).

This is a bit better (I think) than the form given in the paper, since it will uniformly rotate $$F^2$$ toward the positive region of the real axis, whereas the paper’s formula sometimes rotates towards the negative reals, which is a strange seeming polar form to use.

Let’s compute $$f$$ for $$F = \gamma_{10} – 2 \gamma_{23}$$, using
\label{eqn:canonicalbivectors:140}
2 \phi = \pi – \arctan(4/3).

The exponential expands to
\label{eqn:canonicalbivectors:160}
e^{-\phi I} = \inv{\sqrt{5}} \lr{ 1 – 2 I }.

Multiplying each of the bivector components by $$1 – 2 I$$, we find
\label{eqn:canonicalbivectors:180}
\begin{aligned}
\gamma_{10} \lr{ 1 – 2 I}
&=
\gamma_{10} – 2 \gamma_{100123} \\
&=
\gamma_{10} – 2 \gamma_{1123} \\
&=
\gamma_{10} + 2 \gamma_{23},
\end{aligned}

and
\label{eqn:canonicalbivectors:200}
\begin{aligned}
– 2 \gamma_{23} \lr{ 1 – 2 I}
&=
– 2 \gamma_{23}
+ 4 \gamma_{230123} \\
&=
– 2 \gamma_{23}
+ 4 \gamma_{23}^2 \gamma_{01} \\
&=
– 2 \gamma_{23}
+ 4 \gamma_{10},
\end{aligned}

leaving
\label{eqn:canonicalbivectors:220}
f = \sqrt{5} \gamma_{10},

so the canonical form is
\label{eqn:canonicalbivectors:240}
F = \gamma_{10} – 2 \gamma_{23} = \sqrt{5} \gamma_{10} \frac{1 + 2 I}{\sqrt{5}}.

It’s interesting here that $$f$$, in this case, is a spatial bivector (i.e.: pure electric field), but that clearly isn’t always going to be the case, since we can have a case like,
\label{eqn:canonicalbivectors:260}
F = 4 \gamma_{10} + \gamma_{13} = 4 \gamma_{10} + \gamma_{20} I,

from the table above, that has both electric and magnetic field components, yet is already in the canonical form, with $$F^2 = 15$$. The canonical $$f$$, despite having a positive square, is not necessarily a spatial bivector (as it may have both grades 1,2 in the spatial representation, not just the electric field, spatial grade-1 component.)

# References

[1] Justin Dressel, Konstantin Y Bliokh, and Franco Nori. Spacetime algebra as a powerful tool for electromagnetism. Physics Reports, 589:1–71, 2015.