Canonical bivectors in spacetime algebra.

December 5, 2022 math and physics play , , , , ,

[Click here for a PDF version of this post]

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:
\begin{equation}\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}
\end{equation}
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
\begin{equation}\label{eqn:canonicalbivectors:40}
F = f e^{I \phi},
\end{equation}
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
\begin{equation}\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}
\end{equation}

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
\begin{equation}\label{eqn:canonicalbivectors:80}
F^2 = \Abs{F^2} e^{2 \phi I},
\end{equation}
we can then form
\begin{equation}\label{eqn:canonicalbivectors:100}
f = F e^{-\phi I}.
\end{equation}

If we want an equation for \( \phi \), we can just write
\begin{equation}\label{eqn:canonicalbivectors:120}
2 \phi = \mathrm{Arg}( F^2 ).
\end{equation}
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
\begin{equation}\label{eqn:canonicalbivectors:140}
2 \phi = \pi – \arctan(4/3).
\end{equation}
The exponential expands to
\begin{equation}\label{eqn:canonicalbivectors:160}
e^{-\phi I} = \inv{\sqrt{5}} \lr{ 1 – 2 I }.
\end{equation}

Multiplying each of the bivector components by \(1 – 2 I\), we find
\begin{equation}\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}
\end{equation}
and
\begin{equation}\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}
\end{equation}
leaving
\begin{equation}\label{eqn:canonicalbivectors:220}
f = \sqrt{5} \gamma_{10},
\end{equation}
so the canonical form is
\begin{equation}\label{eqn:canonicalbivectors:240}
F = \gamma_{10} – 2 \gamma_{23} = \sqrt{5} \gamma_{10} \frac{1 + 2 I}{\sqrt{5}}.
\end{equation}

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,
\begin{equation}\label{eqn:canonicalbivectors:260}
F = 4 \gamma_{10} + \gamma_{13} = 4 \gamma_{10} + \gamma_{20} I,
\end{equation}
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.

Spoiling Karl: a productive day of fishing for cat6 flavoured wall trout.

November 13, 2022 Uncategorized

When we moved into the new house, we said to Karl that we could probably run ethernet wiring up to his room from my office where the router lives.  He’s been anxious for us to try that project, to say the least.

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.)

 

 

 

 

Verifying dimensions of Planck length

October 31, 2022 math and physics play

[Click here for a PDF version of this post]

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.

References

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

C++ compiler diagnostic gone horribly wrong: error: explicit specialization in non-namespace scope

September 23, 2022 C/C++ development and debugging. , , , , , , , ,

Here is a g++ error message that took me an embarrassingly long time to figure out:

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:

        Flags(N->getFlags(), DecimalAttrInfo(N->getDecimalInfo()) {}

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:

error: explicit specialization in non-namespace scope

as it states that the scope is:

‘struct llvm::MDNodeKeyImpl

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.

More “interesting” electrical.

September 17, 2022 Home renos

We naively thought we could swap a couple of sconce lights, but this is what we found

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.”

%d bloggers like this: