MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Replacements in NonCommutativeMultiply

  • To: mathgroup at
  • Subject: [mg72558] Replacements in NonCommutativeMultiply
  • From: "David Park" <djmp at>
  • Date: Mon, 8 Jan 2007 05:00:36 -0500 (EST)

Can anyone explain the following result?

Times[a, NonCommutativeMultiply[], NonCommutativeMultiply[i, c]];
% /. NonCommutativeMultiply[] -> 1 // FullForm


Times[a, NonCommutativeMultiply[1, i, c]]

I believe the result should be

Times[a, NonCommutativeMultiply[i, c]]

The reason I get an empty argument sequence is that the factors contain 'scalars' and 'vectors' and the scalars get factored out. Only the vector part is noncommutative.

The result Mathematica gives is definitely a problem because when the 1 is factored out again to simplify we arrive back at the starting point.

A similar replacement is done with CircleDot works properly.

Times[a, CircleDot[], CircleDot[i, c]];
% /. CircleDot[] -> 1 // FullForm

Times[a, CircleDot[i, c]]

David Park
djmp at 

  • Prev by Date: Where can I get MathGL3D Version 3.0 for windows?
  • Next by Date: Re: speed of multiplying polynomials
  • Previous by thread: Re: Where can I get MathGL3D Version 3.0 for windows?
  • Next by thread: Re: Replacements in NonCommutativeMultiply