# How to simplify the following expression of a matrix with complex conjugation?

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:

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

Edit

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

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π]]]

• Great answer, didn't know this was possible! Jul 27, 2023 at 15:21