I have 2 questions about using LeviCivitaTensor, based on the following session:

enter image description here

  1. The signs for the cross product seems to come out "opposite" of what I expected. Why is that? Did I miss anything? I thought the usual definition of the cross product of 2 vectors was $(\textbf{a}\times\textbf{b})_i=\epsilon_{ijk}\textbf{a}_j\textbf{b}_k$, which seems to use the Levi-Civita tensor directly (not transposing it).
  2. In the second expression, I'm confused about the operation being performed. The reason I sandwiched the LeviCivitaTensor in the first expression is that I'm used to $\textbf{a}\ M\ \textbf{b}$ to compute e.g. inner products, but I wouldn't know how to understand $M\ \textbf{a}\ \textbf{b}$, unless maybe it should be read $(M\ \textbf{a})\ \textbf{b}$?
  • $\begingroup$ Is this answer the answer? Using the epsilon tensor in Mathematica $\endgroup$ – Kuba Apr 26 '15 at 17:25
  • 1
    $\begingroup$ Using Trace confirms that the second expression corresponds to $(M \mathbf{a})\mathbf{b}$ $\endgroup$ – Marius Ladegård Meyer Apr 26 '15 at 17:41
  • 1
    $\begingroup$ One of the basic examples in the docs for LeviCivitaTensor is "Build a cross product", in which the code is the same the OP's, changing a, b to x, y. Of course they get the opposite of the cross product, which is clear in the example because they include the cross product. But no mention of the discrepancy nor of the fact that they haven't built the cross product. It looks as though didn't even compare the outputs. $\endgroup$ – Michael E2 Apr 26 '15 at 22:24
  • $\begingroup$ @MichaelE2 That's a good point - the documentation is a little confusing on that issue. If one doesn't look carefully, it creates the wrong impression about the order of arguments. $\endgroup$ – Jens Apr 27 '15 at 4:24

I believe the reason for the confusion is the way the Dot product operates. It is a Flat but non-commutative operation when the factors aren't just vectors. In particular, it contracts the last index of the first factor with the first index of the next factor, going from left to right. But in the form $a\cdot\varepsilon\cdot b$, this means that the contraction between $a$ and $\varepsilon$ occurs too early. It then doesn't correspond to the desired summation.

You want the summation over the last index of $\varepsilon$ to occur first, multiplied by the components of the second vector. This can be enforced by simply changing the order of the factors in the dot product so that the innermost sum is done first and the next sum is again over the last index of the result, multiplied by the first vector:

LeviCivitaTensor[3].b.a == Cross[a, b]

(* ==> True *)

Now that we have arranged things so that it's always the last index of the product involving $\varepsilon$ that gets summed over with the next dot operation, we can further use the special symmetry of $\varepsilon$ to change the order in the first factor, to make the expression look like this:

b.LeviCivitaTensor[3].a == Cross[a, b]

(* ==> True *)

If you now rename a to b and vice versa, you have the result

a.LeviCivitaTensor[3].b == Cross[b, a]

which is the expression with the opposite sign that you were confused by.


I believe you seek:

  • 3
    $\begingroup$ I believe it might help the OP if you could explain why it should be written this way. $\endgroup$ – Sjoerd C. de Vries Apr 26 '15 at 17:45
  • $\begingroup$ Yes - I totally believe it - but the formula for the cross product uses $\epsilon_{ijk}$ directly, not its transpose, hence my surprise. $\endgroup$ – Frank Apr 26 '15 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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