0
$\begingroup$

I am trying to contract two Levi-Civita symbols in tensor format like so:

$\epsilon_{a b} \epsilon_{c d}$

This code generates the Levi-Civita:

n = 2;
LevCiv := LeviCivitaTensor[2, List];

listLevCiv := 
 Table[If[UnsameQ[LevCiv[[a, b]], 0], {ToString[LeCi[a, b]], 
    LevCiv[[a, b]]}] 
  , {a, 1, n}, {b, 1, n}]
TableForm[Partition[DeleteCases[Flatten[listLevCiv], Null], 2], 
 TableSpacing -> {2, 2}]
LevCiv // MatrixForm

I would like something of this form:

    Output = Simplify[
   Table[LevCiv[[a, b]]*LevCiv[[c, d]], {a, 1, n}, {b, 1, n}, {c, 1, 
     n}, {d, 1, n}]];
Output // MatrixForm

Does anyone have experience working with such tensors and how to generate one output please?

Thanks

$\endgroup$
3
  • $\begingroup$ Is what you're looking for Outer[Times, LevCiv, LevCiv]? $\endgroup$
    – evanb
    Commented Aug 21, 2017 at 10:57
  • $\begingroup$ Also, you should turn LevCiv := into =---no need to re-generate the tensor every time you want to mention it. $\endgroup$
    – evanb
    Commented Aug 21, 2017 at 10:58
  • $\begingroup$ See also mathematica.stackexchange.com/q/138167/7936 $\endgroup$
    – evanb
    Commented Aug 21, 2017 at 10:59

1 Answer 1

1
$\begingroup$

You can get this by using TensorProduct directly on your LeviCivitaTensor

TensorProduct[LeviCivitaTensor[2, List], LeviCivitaTensor[2, List]] // MatrixForm

or more concise

#\[TensorProduct]# &[LeviCivitaTensor[2]] // Normal // MatrixForm

The infix version of TensorProduct can be entered as ESCt*ESC.

$\endgroup$
1
  • $\begingroup$ Thank you for your answer. It looks great. I hope it holds up when I perform metric tensor contractions on it. Thanks sir! $\endgroup$
    – Mark Pace
    Commented Aug 21, 2017 at 11:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.