Consider the following matrix:

Pmatrix = 
  1/Sqrt[2] {{π0/Sqrt[2] + η/Sqrt[3] + ηpr/Sqrt[
      6], πplus, 
     Kplus}, {πminus, -π0/2 + η/Sqrt[3] + ηpr/Sqrt[
      6], K0}, {Kminus, 
     K0bar, -η/Sqrt[3] + 2 ηpr/Sqrt[6]}};
mmatrix = DiagonalMatrix[{mu, md, ms}];
ΣmatrixExpanded2[fπ_] = 
  IdentityMatrix[3] + 2*I*Pmatrix/fπ + 
     1/2 ((2*I)/fπ)^2*Pmatrix . Pmatrix // Expand // Simplify;

And the following list of rules:

rule := {Conjugate[πplus] :> πminus, 
  Conjugate[πminus] -> πplus, Conjugate[Kminus] -> Kplus, 
  Conjugate[Kplus] -> Kminus, Conjugate[π0] -> π0, 
  Conjugate[η] -> η, Conjugate[ηpr] -> ηpr, 
  Conjugate[K0] -> K0bar, Conjugate[K0bar] -> K0, 
  Conjugate[fπ] -> fπ}

I would like to calculate the trace Trace[mmatrix.ConjugateTranspose[ΣmatrixExpanded2[fπ]]]. This is how I do it:

(ConjugateTranspose[ΣmatrixExpanded2[fπ]] // 
   Expand) /. Evaluate[rule]

However, some of the matrix elements are not expanded and have the (...)* form:

enter image description here

Could you please tell me how to compute this product properly and apply rule?


Okay, so it works with TagDelayed, but not with the rule.


1 Answer 1


This appears to be the same as your immediate previous question, but with more detail. A potential approach is the same, through TagSetDelayed:

πplus /: Conjugate[πplus] := πminus
πminus /: Conjugate[πminus] := πplus
Kminus /: Conjugate[Kminus] := Kplus
Kplus /: Conjugate[Kplus] := Kminus
π0 /: Conjugate[π0] := π0
η /: Conjugate[η] := η
ηpr /: Conjugate[ηpr] := ηpr
K0 /: Conjugate[K0] := K0bar
K0bar /: Conjugate[K0bar] := K0
fπ /: Conjugate[fπ] := fπ

Your trace then runs, but some things are not expanded, mostly because they are inside ConjugateTranspose. The result is pretty ugly, but there are no more Conjugates:

Trace[mmatrix . ConjugateTranspose[ΣmatrixExpanded2[fπ]]]
  • 1
    $\begingroup$ Great answer, didn't know this was possible! $\endgroup$
    – Hans Olo
    Jul 27, 2023 at 15:21

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.