Hodge Star in Minkowski Spacetime¶
Electromagnetism is naturally expressed with differential forms on spacetime. With metric signature $(-,+,+,+)$, the Hodge star maps two-forms to two-forms, but time-like basis elements introduce signs:
$$\star(dt\wedge dx)=-dy\wedge dz,\qquad \star(dy\wedge dz)=dt\wedge dx.$$
Lorentzian metric¶
The determinant has negative sign, so the volume density uses $\sqrt{|\det g|}$. Raising a time index contributes the additional minus sign visible in the result.
declare symbol t, x, y, z : MathValue
def N : Integer := 4
def params : Vector MathValue := [| t, x, y, z |]
def g : Matrix MathValue :=
[| [| -1, 0, 0, 0 |]
, [| 0, 1, 0, 0 |]
, [| 0, 0, 1, 0 |]
, [| 0, 0, 0, 1 |] |]
def dt : DiffForm MathValue := [| 1, 0, 0, 0 |]
def dx : DiffForm MathValue := [| 0, 1, 0, 0 |]
def dy : DiffForm MathValue := [| 0, 0, 1, 0 |]
def dz : DiffForm MathValue := [| 0, 0, 0, 1 |]
Metric-dependent duality¶
The definition is the same contraction used in Euclidean space. Only the dimension and metric have changed.
def hodge (A : DiffForm MathValue) : DiffForm MathValue :=
let k := dfOrder A
in withSymbols [i, j]
sqrt (abs (M.det g_#_#)) *
foldl
(.)
((ε' N k)_(i_1)..._(i_N) . A..._(j_1)..._(j_k))
(map (\n -> g~(i_n)~(j_n)) [1..k])
First dualize a two-form containing the time direction.
hodge (wedge dt dx)
A purely spatial area form dualizes to a time-space area form.
hodge (wedge dy dz)
These signs imply $\star^2=-1$ on two-forms for this Lorentzian convention. They are also the signs that exchange electric and magnetic components when the electromagnetic field tensor is dualized.