Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
{Subscript[g, 1],Subscript[e, 1]}\[TensorProduct]{Subscript[g, 2],Subscript[e, 2]}\[TensorProduct]{Subscript[g, 3],Subscript[e, 3]}

I am expecting answer like ...

{{{Subscript[g, 1] Subscript[g, 2] Subscript[g, 3], 
 Subscript[g, 1] Subscript[g, 2] Subscript[e, 3]}, { 
 Subscript[g, 1] Subscript[e, 2] Subscript[g, 3], 
 Subscript[g, 1] Subscript[e, 2] Subscript[e, 3] }}, {{Subscript[e, 
 1] Subscript[g, 2] Subscript[g, 3], 
Subscript[e, 1] Subscript[g, 2] Subscript[e, 3] }, {Subscript[e, 1]
  Subscript[e, 2] Subscript[g, 3], 
Subscript[e, 1] Subscript[e, 2] Subscript[e, 3]}}}

Why it change the sequence in the product?

share|improve this question
up vote 2 down vote accepted

Any product gets reordered alphabetically by Mathematica, apparently. Try entering g*e and e*g, and you'll see they are both reordered to e g, which works just fine when all multiplications are commutative.

If you really want the g terms to come before the e terms, then you might find some of the solutions here to be of use. Conversely, if you just use h or any other letter after g in place of e then that also solves your problem I think.

share|improve this answer
Nice explanation in that link! – ciao Jan 23 '14 at 1:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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