Today was the day to try that. I started by cutting a very large hole in his wall to see into the big triangular roof space. I wanted a hole that was big enough that we could potentially reach into the back, since I was pretty sure that I could get a line up in that location. Here’s that hole with the fishing wire poking out:

The house is old, and the walls have been finished with drywall over plaster and lathe.

In my office I had to cut two holes, one near the ceiling

I cut a nice little rectangle with the intention of using my 4.5′ flexible 3/4″ drill bit between the lathe and the brick, but changed my strategy once I saw the hole. We’ve got the following layers in this space:

- drywall (1/2″)
- plaster (~1/2″)
- lathe (~1/2″)
- 5/8-3/4″ gap (no insulation)
- brick.

I was worried that trying to jam my drill bit into the space between the lathe and the brick would wreck it, since the space is so small. Instead I opted to try to drill upwards through the plaster layer, into the lathe, and then up through the ceiling. This wasn’t the easiest path to drill and the bit wandered significantly, but I did get the hole made, and fished my pulling line up. With Karl’s help, we got the pulling line out of our big hole. I was then ready to cut my second hole, and try to get the line down from the ceiling area to closer to the floor, where I’ll put the outlet and the ethernet jacks. Here’s that hole with the pulling line fished through:

I chose to run 4 lines. Two for Karl’s room, and two for the back room. The two lines for the back room, have just been left in the crawl space. I tossed them in a bit, so that if we open up the wall in that room, it should be possible to crawl in from the other side and grab them. We are thinking that it would be good to open up that triangular dead space and build in some sort of integrated storage solution — at which point we could also run ethernet to that room. Even if we don’t use it, it’s easy to leave it there for the future at this point when the walls are opened up.

Here’s Karl’s room temporarily closed up with one jack connected:

The end result from Karl’s point of view is the following speed test:

He was very happy with this result, about 5x faster than his wifi speed (which in turn, is also way better than his wifi speed at the old house.)

There is still more to do for this little project:

- reinsert the insulation in the big hole, and anchor the drywall in place, and the mud and sanding to patch things up.
- patch up things in my office and repaint that little wall (hopefully, I can get away with just that single wall.)
- connect jacks for the second wire, and put on covers (on order.)
- (maybe) connect jacks for the “future expansion” wires for the back room. I may just leave those in the wall for now (but have ordered a 4-port jack plate.)

]]>

I’m reading [1], which has problems, despite being a sort of pop-sci book. The first such problem is showing that the particular constant

\begin{equation*}

\sqrt{ \frac{h G}{c^3} }

\end{equation*}

has dimensions of length.

My first thought for this was that we have lots of ways of expressing energy in ways that bring in some, but not all of those constants. Examples are

\begin{equation*}

m c^2

,\quad

h \nu

,\quad

i \,\hbar \PD{t}{}

,\quad

– \frac{\hbar^2}{2m} \PDSq{x}{}

,\quad

– \frac{G m M}{r^2}.

\end{equation*}

Some of these are identical with respect to dimensions, for example:

\begin{equation*}

[h\nu] = [i \,\hbar \PD{t}{}] = [h]/T.

\end{equation*}

Let’s use the fact that the dimensions of a particle’s rest energy match that of the photon energy, to find a way to eliminate mass from the dimensions of the gravitation potential energy, that is

\begin{equation*}

[ m c^2 ] = [m] \frac{L^2}{T^2} = [h]/T,

\end{equation*}

or

\begin{equation*}

M L^2/T^2 = [h]/T,

\end{equation*}

so

\begin{equation*}

M

= [h] \frac{T}{L^2}

= [h/c] \inv{L}.

\end{equation*}

Now we can relate the photon energy dimensions with the dimensions of gravitational potential energy, to find

\begin{equation*}

\begin{aligned}

\frac{[h]}{T}

&=

\frac{[G] M^2}{L} \\

&=

\frac{[G]}{L}

[h^2/c^2] \inv{L^2},

\end{aligned}

\end{equation*}

or

\begin{equation*}

[h G/c^3] = L^2.

\end{equation*}

so, we see that the root of this odd combination of units, does, as claimed, have dimensions of length.

[1] Carlo Rovelli. *General Relativity: The Essentials*. Cambridge University Press, 2021.

In file included from /home/llvm-project/llvm/lib/IR/Constants.cpp:15: /home/llvm-project/llvm/lib/IR/LLVMContextImpl.h:447:11: error: explicit specialization in non-namespace scope ‘struct llvm::MDNodeKeyImpl<llvm::DIBasicType>’ template <> struct MDNodeKeyImpl<DIStringType> { ^

This is the code:

template <> struct MDNodeKeyImpl<DIStringType> { unsigned Tag; MDString *Name; Metadata *StringLength; Metadata *StringLengthExp; Metadata *StringLocationExp; uint64_t SizeInBits; uint32_t AlignInBits; unsigned Encoding;

This specialization isn’t materially different than the one that preceded it:

template <> struct MDNodeKeyImpl<DIBasicType> { unsigned Tag; MDString *Name; MDString *PictureString; uint64_t SizeInBits; uint32_t AlignInBits; unsigned Encoding; unsigned Flags; Optional<DIBasicType::DecimalInfo> DecimalAttrInfo; MDNodeKeyImpl(unsigned Tag, MDString *Name, MDString *PictureString, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, unsigned Flags, Optional<DIBasicType::DecimalInfo> DecimalAttrInfo) : Tag(Tag), Name(Name), PictureString(PictureString), SizeInBits(SizeInBits), AlignInBits(AlignInBits), Encoding(Encoding), Flags(Flags), DecimalAttrInfo(DecimalAttrInfo) {} MDNodeKeyImpl(const DIBasicType *N) : Tag(N->getTag()), Name(N->getRawName()), PictureString(N->getRawPictureString()), SizeInBits(N->getSizeInBits()), AlignInBits(N->getAlignInBits()), Encoding(N->getEncoding()), Flags(N->getFlags(), DecimalAttrInfo(N->getDecimalInfo()) {} bool isKeyOf(const DIBasicType *RHS) const { return Tag == RHS->getTag() && Name == RHS->getRawName() && PictureString == RHS->getRawPictureString() && SizeInBits == RHS->getSizeInBits() && AlignInBits == RHS->getAlignInBits() && Encoding == RHS->getEncoding() && Flags == RHS->getFlags() && DecimalAttrInfo == RHS->getDecimalInfo(); } unsigned getHashValue() const { return hash_combine(Tag, Name, SizeInBits, AlignInBits, Encoding); } };

However, there is an error hiding above it on this line:

i.e. a single missing brace in the initializer for the Flags member, a consequence of a cut and paste during rebase that clobbered that one character, when adding a comma after it.

It turns out that the compiler was giving me a hint that something was wrong before this in the message:

as it states that the scope is:

which is the previous class definition. Inspection of the code made me think that the scope was ‘namespace llvm {…}’, and I’d gone looking for a rebase error that would have incorrectly terminated that llvm namespace scope. This is a classic example of not paying enough attention to what is in front of you, and going off looking based on hunches instead. I didn’t understand the compiler message, but in retrospect, non-namespace scope meant that something in that scope was incomplete. The compiler wasn’t smart enough to tell me that the previous specialization was completed due to the missing brace, but it did tell me that something was wrong in that previous specialization (which was explicitly named), and I didn’t look at that because of my “what the hell does that mean” reaction to the compilation error message.

In this case, I was building on RHEL8.3, which uses an ancient GCC toolchain. I wonder if newer versions of g++ fare better (i.e.: a message like “possibly unterminated brace on line …” would have been much nicer)? I wasn’t able to try with clang++ as I was building llvm+clang+lldb (V14), and had uninstalled all of the llvm related toolchain to avoid interference.

]]>Neither of the existing lights was mounted in a box, instead there was a “clever” surface mounting method used, with the wires and marrettes tucked into little cavities. I see why this was done, especially on the exterior wall, since there is not enough space for a standard size octagon box between the brick and the drywall. We have about a one inch gap, then lathe, then the drywall.

I’ll see if I can find and install a shallow octagon box instead. It will be tricky to do so, because there are no studs to connect to, and not enough space to retrofit any into the wall. As Sofia said, “nothing is ever easy, is it.”

]]>In a discord thread on the bivector group (a geometric algebra group chat), MoneyKills posts about trouble he has calculating the correct expression for the angular momentum bivector or it’s dual.

This blog post is a more long winded answer than my bivector response and includes this calculation using both cylindrical and spherical coordinates.

The position vector for any point on a plane can be expressed as

\begin{equation}\label{eqn:amomentum:20}

\Br = r \rcap,

\end{equation}

where \( \rcap = \rcap(\phi) \) encodes all the angular dependence of the position vector, and \( r \) is the length along that direction to our point, as illustrated in fig. 1.

The radial unit vector has a compact GA representation

\begin{equation}\label{eqn:amomentum:40}

\rcap = \Be_1 e^{i\phi},

\end{equation}

where \( i = \Be_1 \Be_2 \).

The velocity (or momentum) will have both \( \rcap \) and \( \phicap \) dependence. By chain rule, that velocity is

\begin{equation}\label{eqn:amomentum:60}

\Bv = \dot{r} \rcap + r \dot{\rcap},

\end{equation}

where

\begin{equation}\label{eqn:amomentum:80}

\begin{aligned}

\dot{\rcap}

&= \Be_1 i e^{i\phi} \dot{\phi} \\

&= \Be_2 e^{i\phi} \dot{\phi} \\

&= \phicap \dot{\phi}.

\end{aligned}

\end{equation}

It is left to the reader to show that the vector designated \( \phicap \), is a unit vector and perpendicular to \( \rcap \) (Hint: compute the grade-0 selection of the product of the two to show that they are perpendicular.)

We can now compute the momentum, which is

\begin{equation}\label{eqn:amomentum:100}

\Bp = m \Bv = m \lr{ \dot{r} \rcap + r \dot{\phi} \phicap },

\end{equation}

and the angular momentum bivector

\begin{equation}\label{eqn:amomentum:120}

\begin{aligned}

L

&= \Br \wedge \Bp \\

&= m \lr{ r \rcap } \wedge \lr{ \dot{r} \rcap + r \dot{\phi} \phicap } \\

&= m r^2 \dot{\phi} \rcap \phicap.

\end{aligned}

\end{equation}

This has the \( m r^2 \dot{\phi} \) magnitude that the OP was seeking.

In spherical coordinates, our position vector is

\begin{equation}\label{eqn:amomentum:140}

\Br = r \lr{ \Be_1 \sin\theta \cos\phi + \Be_2 \sin\theta \sin\phi + \Be_3 \cos\theta },

\end{equation}

as sketched in fig. 2.

We can factor this into a more compact representation

\begin{equation}\label{eqn:amomentum:160}

\begin{aligned}

\Br

&= r \lr{ \sin\theta \Be_1 (\cos\phi + \Be_{12} \sin\phi ) + \Be_3 \cos\theta } \\

&= r \lr{ \sin\theta \Be_1 e^{\Be_{12} \phi } + \Be_3 \cos\theta } \\

&= r \Be_3 \lr{ \cos\theta + \sin\theta \Be_3 \Be_1 e^{\Be_{12} \phi } }.

\end{aligned}

\end{equation}

It is useful to name two of the bivector terms above, first, we write \( i \) for the azimuthal plane bivector sketched in fig. 3.

\begin{equation}\label{eqn:amomentum:180}

i = \Be_{12},

\end{equation}

and introduce a bivector \( j \) that encodes the \( \Be_3, \rcap \) plane as sketched in fig. 4.

\begin{equation}\label{eqn:amomentum:200}

j = \Be_{31} e^{i \phi}.

\end{equation}

Having done so, we now have a compact representation for our position vector

\begin{equation}\label{eqn:amomentum:220}

\begin{aligned}

\Br

&= r \Be_3 \lr{ \cos\theta + j \sin\theta } \\

&= r \Be_3 e^{j \theta}.

\end{aligned}

\end{equation}

This provides us with a nice compact representation of the radial unit vector

\begin{equation}\label{eqn:amomentum:240}

\rcap = \Be_3 e^{j \theta}.

\end{equation}

Just as was the case in cylindrical coordinates, our azimuthal plane unit vector is

\begin{equation}\label{eqn:amomentum:280}

\phicap = \Be_2 e^{i\phi}.

\end{equation}

Now we want to compute the velocity vector. As was the case in cylindrical coordinates, we have

\begin{equation}\label{eqn:amomentum:300}

\Bv = \dot{r} \rcap + r \dot{\rcap},

\end{equation}

but now we need the spherical representation for the \( \rcap \) derivative, which is

\begin{equation}\label{eqn:amomentum:320}

\begin{aligned}

\dot{\rcap}

&=

\PD{\theta}{\rcap} \dot{\theta} + \PD{\phi}{\rcap} \dot{\phi} \\

&=

\Be_3 e^{j\theta} j \dot{\theta} + \Be_3 \sin\theta \PD{\phi}{j} \dot{\phi} \\

&=

\rcap j \dot{\theta} + \Be_3 \sin\theta j i \dot{\phi}.

\end{aligned}

\end{equation}

We can reduce the second multivector term without too much work

\begin{equation}\label{eqn:amomentum:340}

\begin{aligned}

\Be_3 j i

&=

\Be_3 \Be_{31} e^{i\phi} i \\

&=

\Be_3 \Be_{31} i e^{i\phi} \\

&=

\Be_{33112} e^{i\phi} \\

&=

\Be_{2} e^{i\phi} \\

&= \phicap,

\end{aligned}

\end{equation}

so we have

\begin{equation}\label{eqn:amomentum:360}

\dot{\rcap}

=

\rcap j \dot{\theta} + \sin\theta \phicap \dot{\phi}.

\end{equation}

The velocity is

\begin{equation}\label{eqn:amomentum:380}

\Bv = \dot{r} \rcap + r \lr{ \rcap j \dot{\theta} + \sin\theta \phicap \dot{\phi} }.

\end{equation}

Now we can finally compute the angular momentum bivector, which is

\begin{equation}\label{eqn:amomentum:400}

\begin{aligned}

L &=

\Br \wedge \Bp \\

&=

m r \rcap \wedge \lr{ \dot{r} \rcap + r \lr{ \rcap j \dot{\theta} + \sin\theta \phicap \dot{\phi} } } \\

&=

m r^2 \rcap \wedge \lr{ \rcap j \dot{\theta} + \sin\theta \phicap \dot{\phi} } \\

&=

m r^2 \gpgradetwo{ \rcap \lr{ \rcap j \dot{\theta} + \sin\theta \phicap \dot{\phi} } },

\end{aligned}

\end{equation}

which is just

\begin{equation}\label{eqn:amomentum:420}

L =

m r^2 \lr{ j \dot{\theta} + \sin\theta \rcap \phicap \dot{\phi} }.

\end{equation}

I was slightly surprised by this result, as I naively expected the cylindrical coordinate result. We have a \( m r^2 \rcap \phicap \dot{\phi} \) term, as was the case in cylindrical coordinates, but scaled down with a \( \sin\theta \) factor. However, this result does make sense. Consider for example, some fixed circular motion with \( \theta = \mathrm{constant} \), as sketched in fig. 5.

The radius of this circle is actually \( r \sin\theta \), so the total angular momentum for that motion is scaled down to \( m r^2 \sin\theta \dot{\phi} \), smaller than the maximum circular angular momentum of \( m r^2 \dot{\phi} \) which occurs in the \( \theta = \pi/2 \) azimuthal plane. Similarly, if we have circular motion in the “j-plane”, sketched in fig. 6.

where \( \phi = \mathrm{constant} \), then our angular momentum is \( L = m r^2 j \dot{\theta} \).

]]>Why not just open the box and connect the wire properly? This is right under the electrical panel, so the shutoff for the circuit isn’t far away.

]]>For reasons that I can’t explain, I woke up this morning dreaming about the interior angles of regular polygons. i.e. the angles \( \pi – \theta \), as illustrated in fig. 1.

The logical way to calculate that angle would be to slice the polygon up into triangles from the center, since each slice would have an interior angle would be \( 2 \pi / N \), and then the problem is just trigonometric. However, in my dream, I was going around the outside, each time rotating by a constant angle, until reaching the original starting point. This was a vector algebra problem, instead of a trigonometric problem, as illustrated in

fig. 2.

I didn’t have the computational power in my dream to solve the problem, and had to write it down when I woke up, to do so. The problem has the structure of a recurrence relation:

\begin{equation}\label{eqn:regularNgon:20}

\Bp_k = \Bp_{k-1} + a \Be_1 \lr{ e^{i\theta} }^{k-1},

\end{equation}

where

\begin{equation}\label{eqn:regularNgon:40}

\Bp_N = \Bp_0.

\end{equation}

We can write these out explicitly for the first few \( k \) to see the pattern

\begin{equation}\label{eqn:regularNgon:60}

\begin{aligned}

\Bp_2

&= \Bp_{1} + a \Be_1 \lr{ e^{i\theta} }^{2-1} \\

&= \Bp_{0} + a \Be_1 \lr{ e^{i\theta} }^{1-1} + a \Be_1 \lr{ e^{i\theta} }^{2-1} \\

&= \Bp_{0} + a \Be_1 \lr{ 1 + \lr{ e^{i\theta} }^{2-1} },

\end{aligned}

\end{equation}

or

\begin{equation}\label{eqn:regularNgon:80}

\Bp_k = \Bp_{0} + a \Be_1 \lr{ 1 + e^{i\theta} + \lr{ e^{i\theta} }^{2-1} + \cdots + \lr{ e^{i\theta} }^{k-1} },

\end{equation}

so the equation to solve (for \(\theta\)) is

\begin{equation}\label{eqn:regularNgon:100}

\Bp_N = \Bp_0 + a \Be_1 \lr{ 1 + \cdots + \lr{ e^{i\theta} }^{N-1} } = \Bp_0,

\end{equation}

or

\begin{equation}\label{eqn:regularNgon:120}

1 + \cdots + \lr{ e^{i\theta} }^{N-1} = 0.

\end{equation}

The LHS is a geometric series of the form

\begin{equation}\label{eqn:regularNgon:140}

S_N = 1 + \alpha + \cdots \alpha^{N-1}.

\end{equation}

Recall that the trick to solve this is noting that

\begin{equation}\label{eqn:regularNgon:160}

\alpha S_N = \alpha + \cdots \alpha^{N-1} + \alpha^N,

\end{equation}

so

\begin{equation}\label{eqn:regularNgon:180}

\alpha S_N – S_N = \alpha^N – 1,

\end{equation}

or

\begin{equation}\label{eqn:regularNgon:200}

S_N = \frac{\alpha^N – 1}{\alpha – 1}.

\end{equation}

For our polygon, we seek a zero numerator, that is

\begin{equation}\label{eqn:regularNgon:220}

e^{N i \theta} = 1,

\end{equation}

and the smallest \( \theta \) solution to this equation is

\begin{equation}\label{eqn:regularNgon:240}

N \theta = 2 \pi,

\end{equation}

or

\begin{equation}\label{eqn:regularNgon:260}

\theta = \frac{2 \pi}{N}.

\end{equation}

The interior angle is the complement of this, since we are going around the outside edge. That is

\begin{equation}\label{eqn:regularNgon:280}

\begin{aligned}

\pi – \theta &= \pi – \frac{2 \pi}{N} \\ &= \frac{ N – 2 }{N} \pi,

\end{aligned}

\end{equation}

and the sum of all the interior angles is

\begin{equation}\label{eqn:regularNgon:300}

N \lr{ \pi – \theta } = \lr{N – 2 } \pi.

\end{equation}

Plugging in some specific values, for \( N = 3, 4, 5, 6 \), we find that the interior angles are \( \pi/3, \pi/2, 3 \pi/5, 4 \pi/6 \), and the respective sums of these interior angles for the entire polygons are \( \pi, 2 \pi, 3 \pi, 4 \pi \).

Like, I said, this isn’t the simplest way to solve this problem. Instead, we could solve for \( 2 \mu \) with respect to interior triangle illustrated in

fig. 3, where

\begin{equation}\label{eqn:regularNgon:320}

2 \mu + \frac{ 2\pi}{N} = \pi,

\end{equation}

or

\begin{equation}\label{eqn:regularNgon:340}

2 \mu = \frac{N – 2}{N} \pi,

\end{equation}

as found the hard way. The hard way was kind of fun though.

The toughest problem to solve would be “why on earth was my brain pondering this in the early morning?” I didn’t even go to bed thinking about anything math or geometry related (we finished the night with the brain-dead activity of watching an episode of “Stranger things”.)

]]>This used to happen with my previous Mac too (both work machines, intel generation cpus, not M1/M2.)

Today I crashed my VM/host pair trying to unpack a 4G tar.gz file, and found this great way to throttle the unpacking enough that my machine stayed alive.

I’m running RHEL8 on my VM, but was able to find a EPEL pv rpm (pv-1.6.6-7.el8.x86_64.rpm) to install on rpmsearch.

]]>Initially I had trouble generalizing the multivector Lagrangian to include both the electric and magnetic sources without using two independent potentials. However, this can be done, provided one is careful enough. Recall that we found that a useful formulation for the field in terms of two potentials is

\begin{equation}\label{eqn:maxwellLagrangian:2050}

F = F_{\mathrm{e}} + I F_{\mathrm{m}},

\end{equation}

where

\begin{equation}\label{eqn:maxwellLagrangian:2070}

\begin{aligned}

F_{\mathrm{e}} = \grad \wedge A \\

F_{\mathrm{m}} = \grad \wedge K,

\end{aligned}

\end{equation}

and where \( A, K \) are arbitrary four-vector potentials.

Use of two potentials allowed us to decouple Maxwell’s equations into two separate gradient equations. We don’t want to do that now, but let’s see how we can combine the two fields into a single multivector potential. Letting the gradient act bidirectionally, and introducing a dummy grade-two selection into the mix, we have

\begin{equation}\label{eqn:maxwellLagrangian:2090}

\begin{aligned}

F

&= \rgrad \wedge A + I \lr{ \rgrad \wedge K } \\

&= – A \wedge \lgrad – I \lr{ K \wedge \lgrad } \\

&= -\gpgradetwo{ A \wedge \lgrad + I \lr{ K \wedge \lgrad } } \\

&= -\gpgradetwo{ A \lgrad + I K \lgrad } \\

&= -\gpgradetwo{ \lr{ A + I K } \lgrad }.

\end{aligned}

\end{equation}

Now, we call

\begin{equation}\label{eqn:maxwellLagrangian:2110}

N = A + I K,

\end{equation}

(a 1,3 multivector), the multivector potential, and write the electromagnetic field not in terms of curls explicitly, but using a grade-2 selection filter

\begin{equation}\label{eqn:maxwellLagrangian:2130}

F = -\gpgradetwo{ N \lgrad }.

\end{equation}

We can now form the following multivector Lagrangian

\begin{equation}\label{eqn:maxwellLagrangian:2150}

\LL = \inv{2} F^2 – \gpgrade{ N \lr{ J – I M } }{0,4},

\end{equation}

and vary the action to (eventually) find our multivector Maxwell’s equation, without ever resorting to coordinates. We have

\begin{equation}\label{eqn:maxwellLagrangian:2170}

\begin{aligned}

\delta S

&= \int d^4 x \inv{2} \lr{ \lr{ \delta F } F + F \lr{ \delta F } } – \gpgrade{ \delta N \lr{ J – I M } }{0,4} \\

&= \int d^4 x \gpgrade{ \lr{ \delta F } F – \lr{ \delta N } \lr{ J – I M } }{0,4} \\

&= \int d^4 x \gpgrade{ -\gpgradetwo{ \lr{ \delta N} \lgrad } F – \lr{ \delta N } \lr{ J – I M } }{0,4} \\

&= \int d^4 x \gpgrade{ -\gpgradetwo{ \lr{ \delta N} \lrgrad } F +\gpgradetwo{ \lr{ \delta N} \rgrad } F – \lr{ \delta N } \lr{ J – I M } }{0,4}.

\end{aligned}

\end{equation}

The \( \lrgrad \) term can be evaluated using the fundamential theorem of GC, and will be zero, as \( \delta N = 0 \) on the boundary. Let’s look at the next integrand term a bit more carefully

\begin{equation}\label{eqn:maxwellLagrangian:2190}

\begin{aligned}

\gpgrade{ \gpgradetwo{ \lr{ \delta N} \rgrad } F }{0,4}

&=

\gpgrade{ \gpgradetwo{ \lr{ \lr{ \delta A } + I \lr{ \delta K } } \rgrad } F }{0,4} \\

&=

\gpgrade{ \lr{ \lr{\delta A} \wedge \rgrad + I \lr{ \lr{ \delta K } \wedge \rgrad }} F }{0,4} \\

&=

\gpgrade{ \lr{\delta A} \rgrad F – \lr{ \lr{\delta A} \cdot \rgrad} F + I \lr{ \delta K } \rgrad F – I \lr{ \lr{ \delta K } \cdot \rgrad} F }{0,4} \\

&=

\gpgrade{ \lr{\delta A} \rgrad F + I \lr{ \delta K } \rgrad F }{0,4} \\

&=

\gpgrade{ \lr{ \lr{\delta A} + I \lr{ \delta K} } \rgrad F }{0,4} \\

&=

\gpgrade{ \lr{ \delta N} \rgrad F }{0,4},

\end{aligned}

\end{equation}

so

\begin{equation}\label{eqn:maxwellLagrangian:2210}

\begin{aligned}

\delta S

&= \int d^4 x \gpgrade{ \lr{ \delta N} \rgrad F – \lr{ \delta N } \lr{ J – I M } }{0,4} \\

&= \int d^4 x \gpgrade{ \lr{ \delta N} \lr{ \rgrad F – \lr{ J – I M } } }{0,4}.

\end{aligned}

\end{equation}

for this to be zero for all variations \( \delta N \) of the 1,3-multivector potential \( N \), we must have

\begin{equation}\label{eqn:maxwellLagrangian:2230}

\grad F = J – I M.

\end{equation}

This is Maxwell’s equation, as desired, including both electric and (if desired) magnetic sources.

[Click here for a PDF version of this post]

Maxwell’s equations, with electric and fictional magnetic sources (useful for antenna theory and other engineering applications), are

\begin{equation}\label{eqn:maxwellLagrangian:220}

\begin{aligned}

\spacegrad \cdot \BE &= \frac{\rho}{\epsilon} \\

\spacegrad \cross \BE &= – \BM – \mu \PD{t}{\BH} \\

\spacegrad \cdot \BH &= \frac{\rho_\txtm}{\mu} \\

\spacegrad \cross \BH &= \BJ + \epsilon \PD{t}{\BE}.

\end{aligned}

\end{equation}

We can assemble these into a single geometric algebra equation,

\begin{equation}\label{eqn:maxwellLagrangian:240}

\lr{ \spacegrad + \inv{c} \PD{t}{} } F = \eta \lr{ c \rho – \BJ } + I \lr{ c \rho_{\mathrm{m}} – \BM },

\end{equation}

where \( F = \BE + \eta I \BH = \BE + I c \BB \), \( c = 1/\sqrt{\mu\epsilon}, \eta = \sqrt{(\mu/\epsilon)} \).

By multiplying through by \( \gamma_0 \), making the identification \( \Be_k = \gamma_k \gamma_0 \), and

\begin{equation}\label{eqn:maxwellLagrangian:300}

\begin{aligned}

J^0 &= \frac{\rho}{\epsilon}, \quad J^k = \eta \lr{ \BJ \cdot \Be_k }, \quad J = J^\mu \gamma_\mu \\

M^0 &= c \rho_{\mathrm{m}}, \quad M^k = \BM \cdot \Be_k, \quad M = M^\mu \gamma_\mu \\

\grad &= \gamma^\mu \partial_\mu,

\end{aligned}

\end{equation}

we find the STA form of Maxwell’s equation, including magnetic sources

\begin{equation}\label{eqn:maxwellLagrangian:320}

\grad F = J – I M.

\end{equation}

We can utilize two separate four-vector potential fields to split Maxwell’s equation into two parts. Let

\begin{equation}\label{eqn:maxwellLagrangian:1740}

F = F_{\mathrm{e}} + I F_{\mathrm{m}},

\end{equation}

where

\begin{equation}\label{eqn:maxwellLagrangian:1760}

\begin{aligned}

F_{\mathrm{e}} &= \grad \wedge A \\

F_{\mathrm{m}} &= \grad \wedge K,

\end{aligned}

\end{equation}

and \( A, K \) are independent four-vector potential fields. Plugging this into Maxwell’s equation, and employing a duality transformation, gives us two coupled vector grade equations

\begin{equation}\label{eqn:maxwellLagrangian:1780}

\begin{aligned}

\grad \cdot F_{\mathrm{e}} – I \lr{ \grad \wedge F_{\mathrm{m}} } &= J \\

\grad \cdot F_{\mathrm{m}} + I \lr{ \grad \wedge F_{\mathrm{e}} } &= M.

\end{aligned}

\end{equation}

However, since \( \grad \wedge F_{\mathrm{m}} = \grad \wedge F_{\mathrm{e}} = 0 \), by construction, the curls above are killed. We may also add in \( \grad \wedge F_{\mathrm{e}} = 0 \) and \( \grad \wedge F_{\mathrm{m}} = 0 \) respectively, yielding two independent gradient equations

\begin{equation}\label{eqn:maxwellLagrangian:1810}

\begin{aligned}

\grad F_{\mathrm{e}} &= J \\

\grad F_{\mathrm{m}} &= M,

\end{aligned}

\end{equation}

one for each of the electric and magnetic sources and their associated fields.

The electromagnetic field \( F \), is a vector-bivector multivector in the multivector representation of Maxwell’s equation, but is a bivector in the STA representation. The split of \( F \) into it’s electric and magnetic field components is observer dependent, but we may write it without reference to a specific observer frame as

\begin{equation}\label{eqn:maxwellLagrangian:1830}

F = \inv{2} \gamma_\mu \wedge \gamma_\nu F^{\mu\nu},

\end{equation}

where \( F^{\mu\nu} \) is an arbitrary antisymmetric 2nd rank tensor. Maxwell’s equation has a vector and trivector component, which may be split out explicitly using grade selection, to find

\begin{equation}\label{eqn:maxwellLagrangian:360}

\begin{aligned}

\grad \cdot F &= J \\

\grad \wedge F &= -I M.

\end{aligned}

\end{equation}

Further dotting and wedging these equations with \( \gamma^\mu \) allows for extraction of scalar relations

\begin{equation}\label{eqn:maxwellLagrangian:460}

\partial_\nu F^{\nu\mu} = J^{\mu}, \quad \partial_\nu G^{\nu\mu} = M^{\mu},

\end{equation}

where \( G^{\mu\nu} = -(1/2) \epsilon^{\mu\nu\alpha\beta} F_{\alpha\beta} \) is also an antisymmetric 2nd rank tensor.

If we treat \( F^{\mu\nu} \) and \( G^{\mu\nu} \) as independent fields, this pair of equations is the coordinate equivalent to \ref{eqn:maxwellLagrangian:1760}, also decoupling the electric and magnetic source contributions to Maxwell’s equation.

As observed above, we may choose to express the decoupled fields as curls \( F_{\mathrm{e}} = \grad \wedge A \) or \( F_{\mathrm{m}} = \grad \wedge K \). The coordinate expansion of either field component, given such a representation, is straight forward. For example

\begin{equation}\label{eqn:maxwellLagrangian:1850}

\begin{aligned}

F_{\mathrm{e}}

&= \lr{ \gamma_\mu \partial^\mu } \wedge \lr{ \gamma_\nu A^\nu } \\

&= \inv{2} \lr{ \gamma_\mu \wedge \gamma_\nu } \lr{ \partial^\mu A^\nu – \partial^\nu A^\mu }.

\end{aligned}

\end{equation}

We make the identification \( F^{\mu\nu} = \partial^\mu A^\nu – \partial^\nu A^\mu \), the usual definition of \( F^{\mu\nu} \) in the tensor formalism. In that tensor formalism, the Maxwell Lagrangian is

\begin{equation}\label{eqn:maxwellLagrangian:1870}

\LL = – \inv{4} F_{\mu\nu} F^{\mu\nu} – A_\mu J^\mu.

\end{equation}

We may show this though application of the Euler-Lagrange equations

\begin{equation}\label{eqn:maxwellLagrangian:600}

\PD{A_\mu}{\LL} = \partial_\nu \PD{(\partial_\nu A_\mu)}{\LL}.

\end{equation}

\begin{equation}\label{eqn:maxwellLagrangian:1930}

\begin{aligned}

\PD{(\partial_\nu A_\mu)}{\LL}

&= -\inv{4} (2) \lr{ \PD{(\partial_\nu A_\mu)}{F_{\alpha\beta}} } F^{\alpha\beta} \\

&= -\inv{2} \delta^{[\nu\mu]}_{\alpha\beta} F^{\alpha\beta} \\

&= -\inv{2} \lr{ F^{\nu\mu} – F^{\mu\nu} } \\

&= F^{\mu\nu}.

\end{aligned}

\end{equation}

So \( \partial_\nu F^{\nu\mu} = J^\mu \), the equivalent of \( \grad \cdot F = J \), as expected.

Because

\begin{equation}\label{eqn:maxwellLagrangian:200}

F^2 =

-\inv{2}

F^{\mu\nu} F_{\mu\nu}

+

\lr{ \gamma_\alpha \wedge \gamma^\beta }

F_{\alpha\mu}

F^{\beta\mu}

+

\frac{I}{4}

\epsilon_{\mu\nu\alpha\beta} F^{\mu\nu} F^{\alpha\beta},

\end{equation}

we may express the Lagrangian \ref{eqn:maxwellLagrangian:1870} in a coordinate free representation

\begin{equation}\label{eqn:maxwellLagrangian:1890}

\LL = \inv{2} F \cdot F – A \cdot J,

\end{equation}

where \( F = \grad \wedge A \).

We will now show that it is also possible to apply the variational principle to the following multivector Lagrangian

\begin{equation}\label{eqn:maxwellLagrangian:1910}

\LL = \inv{2} F^2 – A \cdot J,

\end{equation}

and recover the geometric algebra form \( \grad F = J \) of Maxwell’s equation in it’s entirety, including both vector and trivector components in one shot.

We will need a few geometric algebra tools to do this.

The first such tool is the notational freedom to let the gradient act bidirectionally on multivectors to the left and right. We will designate such action with over-arrows, sometimes also using braces to limit the scope of the action in question. If \( Q, R \) are multivectors, then the bidirectional action of the gradient in a \( Q, R \) sandwich is

\begin{equation}\label{eqn:maxwellLagrangian:1950}

\begin{aligned}

Q \lrgrad R

&= Q \lgrad R + Q \rgrad R \\

&= \lr{ Q \gamma^\mu \lpartial_\mu } R + Q \lr{ \gamma^\mu \rpartial_\mu R } \\

&= \lr{ \partial_\mu Q } \gamma^\mu R + Q \gamma^\mu \lr{ \partial_\mu R }.

\end{aligned}

\end{equation}

In the final statement, the partials are acting exclusively on \( Q \) and \( R \) respectively, but the \( \gamma^\mu \) factors must remain in place, as they do not necessarily commute with any of the multivector factors.

This bidirectional action is a critical aspect of the Fundamental Theorem of Geometric calculus, another tool that we will require. The specific form of that theorem that we will utilize here is

\begin{equation}\label{eqn:maxwellLagrangian:1970}

\int_V Q d^4 \Bx \lrgrad R = \int_{\partial V} Q d^3 \Bx R,

\end{equation}

where \( d^4 \Bx = I d^4 x \) is the pseudoscalar four-volume element associated with a parameterization of space time. For our purposes, we may assume that parameterization are standard basis coordinates associated with the basis \( \setlr{ \gamma_0, \gamma_1, \gamma_2, \gamma_3 } \). The surface differential form \( d^3 \Bx \) can be given specific meaning, but we do not actually care what that form is here, as all our surface integrals will be zero due to the boundary constraints of the variational principle.

Finally, we will utilize the fact that bivector products can be split into grade \(0,4\) and \( 2 \) components using anticommutator and commutator products, namely, given two bivectors \( F, G \), we have

\begin{equation}\label{eqn:maxwellLagrangian:1990}

\begin{aligned}

\gpgrade{ F G }{0,4} &= \inv{2} \lr{ F G + G F } \\

\gpgrade{ F G }{2} &= \inv{2} \lr{ F G – G F }.

\end{aligned}

\end{equation}

We may now proceed to evaluate the variation of the action for our presumed Lagrangian

\begin{equation}\label{eqn:maxwellLagrangian:2010}

S = \int d^4 x \lr{ \inv{2} F^2 – A \cdot J }.

\end{equation}

We seek solutions of the variational equation \( \delta S = 0 \), that are satisfied for all variations \( \delta A \), where the four-potential variations \( \delta A \) are zero on the boundaries of this action volume (i.e. an infinite spherical surface.)

We may start our variation in terms of \( F \) and \( A \)

\begin{equation}\label{eqn:maxwellLagrangian:1540}

\begin{aligned}

\delta S

&=

\int d^4 x \lr{ \inv{2} \lr{ \delta F } F + F \lr{ \delta F } } – \lr{ \delta A } \cdot J \\

&=

\int d^4 x \gpgrade{ \lr{ \delta F } F – \lr{ \delta A } J }{0,4} \\

&=

\int d^4 x \gpgrade{ \lr{ \grad \wedge \lr{\delta A} } F – \lr{ \delta A } J }{0,4} \\

&=

-\int d^4 x \gpgrade{ \lr{ \lr{\delta A} \lgrad } F – \lr{ \lr{ \delta A } \cdot \lgrad } F + \lr{ \delta A } J }{0,4} \\

&=

-\int d^4 x \gpgrade{ \lr{ \lr{\delta A} \lgrad } F + \lr{ \delta A } J }{0,4} \\

&=

-\int d^4 x \gpgrade{ \lr{\delta A} \lrgrad F – \lr{\delta A} \rgrad F + \lr{ \delta A } J }{0,4},

\end{aligned}

\end{equation}

where we have used arrows, when required, to indicate the directional action of the gradient.

Writing \( d^4 x = -I d^4 \Bx \), we have

\begin{equation}\label{eqn:maxwellLagrangian:1600}

\begin{aligned}

\delta S

&=

-\int_V d^4 x \gpgrade{ \lr{\delta A} \lrgrad F – \lr{\delta A} \rgrad F + \lr{ \delta A } J }{0,4} \\

&=

-\int_V \gpgrade{ -\lr{\delta A} I d^4 \Bx \lrgrad F – d^4 x \lr{\delta A} \rgrad F + d^4 x \lr{ \delta A } J }{0,4} \\

&=

\int_{\partial V} \gpgrade{ \lr{\delta A} I d^3 \Bx F }{0,4}

+ \int_V d^4 x \gpgrade{ \lr{\delta A} \lr{ \rgrad F – J } }{0,4}.

\end{aligned}

\end{equation}

The first integral is killed since \( \delta A = 0 \) on the boundary. The remaining integrand can be simplified to

\begin{equation}\label{eqn:maxwellLagrangian:1660}

\gpgrade{ \lr{\delta A} \lr{ \rgrad F – J } }{0,4} =

\gpgrade{ \lr{\delta A} \lr{ \grad F – J } }{0},

\end{equation}

where the grade-4 filter has also been discarded since \( \grad F = \grad \cdot F + \grad \wedge F = \grad \cdot F \) since \( \grad \wedge F = \grad \wedge \grad \wedge A = 0 \) by construction, which implies that the only non-zero grades in the multivector \( \grad F – J \) are vector grades. Also, the directional indicator on the gradient has been dropped, since there is no longer any ambiguity. We seek solutions of \( \gpgrade{ \lr{\delta A} \lr{ \grad F – J } }{0} = 0 \) for all variations \( \delta A \), namely

\begin{equation}\label{eqn:maxwellLagrangian:1620}

\boxed{

\grad F = J.

}

\end{equation}

This is Maxwell’s equation in it’s coordinate free STA form, found using the variational principle from a coordinate free multivector Maxwell Lagrangian, without having to resort to a coordinate expansion of that Lagrangian.

The generalization of the Lagrangian to include magnetic charge and current densities can be as simple as utilizing two independent four-potential fields

\begin{equation}\label{eqn:maxwellLagrangian:n}

\LL = \inv{2} \lr{ \grad \wedge A }^2 – A \cdot J + \alpha \lr{ \inv{2} \lr{ \grad \wedge K }^2 – K \cdot M },

\end{equation}

where \( \alpha \) is an arbitrary multivector constant.

Variation of this Lagrangian provides two independent equations

\begin{equation}\label{eqn:maxwellLagrangian:1840}

\begin{aligned}

\grad \lr{ \grad \wedge A } &= J \\

\grad \lr{ \grad \wedge K } &= M.

\end{aligned}

\end{equation}

We may add these, scaling the second by \( -I \) (recall that \( I, \grad \) anticommute), to find

\begin{equation}\label{eqn:maxwellLagrangian:1860}

\grad \lr{ F_{\mathrm{e}} + I F_{\mathrm{m}} } = J – I M,

\end{equation}

which is \( \grad F = J – I M \), as desired.

It would be interesting to explore whether it is possible find Lagrangian that is dependent on a multivector potential, that would yield \( \grad F = J – I M \) directly, instead of requiring a superposition operation from the two independent solutions. One such possible potential is \( \tilde{A} = A – I K \), for which \( F = \gpgradetwo{ \grad \tilde{A} } = \grad \wedge A + I \lr{ \grad \wedge K } \). The author was not successful constructing such a Lagrangian.

]]>