1

I have: $$p=iab$$ $p,a,b$ are operators. So in mathematica I am writing this as:

p=I*a**b

Conjugate of above is $$-iba$$ In mathematica I tried ConjugateTranspose, but not working on p to find it's conjugate transpose.

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
Jasmine
  • 1,225
  • 3
  • 10
  • 2
    NonCommutativeMultiply (i.e., **) has essentially no built-in meaning. You have to either give it that meaning or develop replacement rules for transforming expressions involving **. Alternatively, you might try the NCAlgebra package. – march Sep 07 '21 at 22:23
  • If I define conj[Ia_ * b_] := -Ib * a, This rule isn't working. – Jasmine Sep 08 '21 at 03:49
  • Jasmine, you’ll need to individually define all of your replacement rules. What you suggest is close, but still not sufficient. Check the documentation of NonCommutativeMultiply for some hints on how to do this. Also I recommend you search the function name on this SE for related questions (they do exist). – CA Trevillian Sep 08 '21 at 14:57
  • @Jasmine. That rule works just fine. I suspect you didn't leave a space between the I and a on the left-hand side and the I and the b on the right-hand side. An alternative thing to do (which is what I do when doing these kinds of calculations), is to define replacement rules instead. I.e., make a list of things like conj[I a_**b_] :> -I b**a and then using ReplaceAll (/.) to transform the expressions. – march Sep 08 '21 at 21:58
  • 1
    Here are some ideas for how to go about doing this. You can ignore the first part about the basis elements if you want (unless you're actually doing geometric algebra!), but the set of rules later for implementing linearity and such might be useful. – march Sep 08 '21 at 22:17

1 Answers1

1

As @march pointed out, NCAlgebra is able to handle this issue out of the box. Indeed

aj[I a ** b]

evaluates to

I aj[b] ** aj[a]

as you want.

Mauricio de Oliveira
  • 2,001
  • 13
  • 15