Is there a way you can set a symbolic function to be non-commutative in NCAlgebra? For example SetCommutative[f[t]] returns CommutativeQ: Tried to set the expression "f[t]" to be commutative".


2 Answers 2


Couldn't get it to work exactly: using subscripts is the best I could get i.e. Subscript[f, t]. Setting the symbol f commutative makes all Subscript[f, t] (where t is any other symbol) commutative.


In NCAlgebra, functions of a noncommutative symbol are assumed to be noncommutative. So you just have to define f to be noncommutative as in


(in your example you can skip step because all small caps single letters are set noncommutative by default).

Then if you evaluate

g ** f[t]

you will get

NonCommutativeMultiply[g, f[t]]

Also functions of noncommutative variables are assumed to be noncommutative as well and

g ** F[t]

will also evaluate to

NonCommutativeMultiply[g, F[t]]

even though F is commutative because t is noncommutative. However

g ** F[T]

will evaluate to

Times[g, F[T]]


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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