HodgeDual
Details
- HodgeDual[tensor] requires all slots of tensor to have the same dimension dim, which will be taken as the implied second argument. The result will have rank dim-r, where r is the rank of tensor.
- HodgeDual[tensor,dim] dualizes tensor in all slots with the given dimension, leaving the rest as the last slots of the result.
- HodgeDual[tensor,dim,slots] requires the given slots of tensor to have dimension dim.
- HodgeDual effectively antisymmetrizes in advance the slots to be dualized.
Examples
open all close allBasic Examples (2)
Scope (5)
Hodge dual of an antisymmetric array:
sa = SymmetrizedArray[pos_ :> Subscript[a, pos], {5, 5, 5}, Antisymmetric[{1, 2, 3}]]SymmetrizedArrayRules[sa]HodgeDual[sa]SymmetrizedArrayRules[%]HodgeDual[1, 4]The second argument is needed in this case:
HodgeDual[1]Hodge dual of an array that is antisymmetric only in some slots:
sa = SymmetrizedArray[pos_ :> Subscript[a, pos], {3, 3, 2, 2}, Antisymmetric[{1, 2}]]Specify in which slots to dualize:
HodgeDual[sa, 3]//SymmetrizedArrayRulesHodge dual in some slots only:
sa = SymmetrizedArray[pos_ :> Subscript[a, pos], {3, 3, 3}, Antisymmetric[{1, 2}]]SymmetrizedArrayRules[sa]HodgeDual[sa, 3, {1, 2}]SymmetrizedArrayRules[%]HodgeDual of a symbolic array:
$Assumptions = A∈Arrays[{5, 5, 5}, Reals, Antisymmetric[{1, 2, 3}]];Properties when using the single-argument form or a redundant second argument:
HodgeDual[A]//TensorDimensionsHodgeDual[A, 5]//TensorSymmetryUsing the two-argument from to dualize in a different dimension:
HodgeDual[A, 4]//TensorDimensionsHodgeDual[A, 4]//TensorSymmetryHodgeDual[A, 5, {1, 2}]//TensorDimensionsHodgeDual[A, 5, {1, 2}]//TensorSymmetryProperties & Relations (6)
The LeviCivitaTensor in dimension
is the HodgeDual of 1 in that dimension:
Normal@LeviCivitaTensor[4] === Normal@HodgeDual[1, 4]a = Array[x, {3, 3}]This is an alternative way to compute its determinant:
HodgeDual[TensorWedge@@a] === Det[a]Take a three-dimensional vector field:
v = {v1[x, y, z], v2[x, y, z], v3[x, y, z]};This is an alternative way to compute its curl:
-2Normal@HodgeDual[D[v, {{x, y, z}}]]% === Curl[v, {x, y, z}]Hodge duality can also be computed by contraction with the LeviCivitaTensor:
A = SymmetrizedArray[pos_ :> a@@pos, {5, 5, 5}, Antisymmetric[{1, 2, 3}]]HodgeDual[A, 5]% === 1 / 3!TensorContract[ALeviCivitaTensor[5], {{1, 4}, {2, 5}, {3, 6}}]A double Hodge dual of an antisymmetric array equals the original array, except possibly for a sign:
sa = SymmetrizedArray[pos_ :> Subscript[a, pos], {4, 4, 4}, Antisymmetric[{1, 2, 3}]]HodgeDual[sa]HodgeDual[%] === -sa$Assumptions = A∈Arrays[{4, 4, 4}, Antisymmetric[{1, 2, 3}]];HodgeDual[A]HodgeDual[%]Cross of
vectors in dimension
is (
times the Hodge dual of their tensor product:
{a, b, c, d}⨯{d, e, f, g}⨯{h, i, j, k}(4 - 1)!HodgeDual[{a, b, c, d}{d, e, f, g}{h, i, j, k}]% == %%Similarly, the Cross of
vectors in dimension
is simply the Hodge dual of their wedge product:
{a, b, c, d}⨯{d, e, f, g}⨯{h, i, j, k} == HodgeDual[{a, b, c, d}{d, e, f, g}{h, i, j, k}]Tech Notes
Related Guides
History
Text
Wolfram Research (2012), HodgeDual, Wolfram Language function, https://reference.wolfram.com/language/ref/HodgeDual.html.
CMS
Wolfram Language. 2012. "HodgeDual." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/HodgeDual.html.
APA
Wolfram Language. (2012). HodgeDual. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/HodgeDual.html
BibTeX
@misc{reference.wolfram_2026_hodgedual, author="Wolfram Research", title="{HodgeDual}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/HodgeDual.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_hodgedual, organization={Wolfram Research}, title={HodgeDual}, year={2012}, url={https://reference.wolfram.com/language/ref/HodgeDual.html}, note=[Accessed: 13-June-2026]}