# Complex conjugation and mod of a complex expression

**URL:** <https://community.wolfram.com/t/complex-conjugation-and-mod-of-a-complex-expression/23662>\
**Category:** Questions\
**Tags:** algebra\
**Created:** [March 1, 2024, 6:12am UTC](https://community.wolfram.com/t/complex-conjugation-and-mod-of-a-complex-expression/23662 "2024-03-01T06:12:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zohaibrehmani](https://avatars.discourse-cdn.com/v4/letter/z/ee59a6/32.png) [@zohaibrehmani](https://community.wolfram.com/u/zohaibrehmani)\
**Post date:** [March 1, 2024, 6:12am UTC](https://community.wolfram.com/t/complex-conjugation-and-mod-of-a-complex-expression/23662/1 "2024-03-01T06:12:54Z")

</div>

Hello All  
I am doing an analytical calculation with a bit longer expression which is complex in nature.

```
Mp =-(1/((mb + mc) (mB + mDs) q))
 Sqrt[1 - ml^2/
   q^2] (-2 A0 E^(-I \[Chi]) (mB + mDs) (-((-1 + gA) (mb + mc) ml) + 
       gP q^2) Sqrt[\[Lambda]Ds] + 
    16 E^(-I \[Chi])
      mB (mb + 
       mc) mDs (A12 (-1 + gA) (mB + mDs) ml + (gT - gT5) q^2 T23) Cos[
      thl] + Sqrt[2]
      E^(-2 I \[Chi]) (mb + mc) q (-A1 (-1 + gA) (mB + mDs)^2 ml - 
       2 (gT - gT5) (mB + mDs) (mB^2 T2 - mDs^2 T2 + 
          T1 Sqrt[\[Lambda]Ds]) - (1 + 
          gV) ml V Sqrt[\[Lambda]Ds]) Sin[thl] + 
    Sqrt[2] (mb + mc) q (-A1 (-1 + gA) (mB + mDs)^2 ml - 
       2 (gT - gT5) (mB + mDs) (mB^2 T2 - mDs^2 T2 - 
          T1 Sqrt[\[Lambda]Ds]) + (1 + 
          gV) ml V Sqrt[\[Lambda]Ds]) Sin[thl])

```

Then I take the complex conjugate of Mp as

```
CMp = Conjugate[Mp] // FullSimplify

```

I want to find the absolute value of the expression Mp. I multiply conjugate of Mp with Mp as

```
Mp2 = CMp *Mp

```

which should give me a real expression but it does not give me a real answer and iotas and exponentials are still there. I have tried ComplexExpand and FullSimplify but nothing seems to work properly. If I use ComplexExpand it gives me thousands of terms which ultimately cannot be simplified which is useless expression. What is wrong with my approach and how to correct it? Thank you.

[B to Ds simplified.nb](https://community.wolfram.com/uploads/short-url/lMN0IWJ003O6uPZPjIcaUW05k4m.nb) (96.8 KB)

---

<div class="post-metadata">

**Author:** ![gianlucagorni](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@gianlucagorni](https://community.wolfram.com/u/gianlucagorni)\
**Post date:** [March 1, 2024, 8:55am UTC](https://community.wolfram.com/t/complex-conjugation-and-mod-of-a-complex-expression/23662/2 "2024-03-01T08:55:27Z")

</div>

I have to guess what your question is. I suppose you should learn about `ComplexExpand`, which is tricky, because it does not use the `$Assumptions`. A workaround could be this:

```
FullSimplify[ComplexExpand[ReIm[CMp]]] . {1, I}

```

Maybe there is a more elegant way, I am curious.

---

<div class="post-metadata">

**Author:** ![gianlucagorni](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@gianlucagorni](https://community.wolfram.com/u/gianlucagorni)\
**Post date:** [March 1, 2024, 9:02am UTC](https://community.wolfram.com/t/complex-conjugation-and-mod-of-a-complex-expression/23662/3 "2024-03-01T09:02:19Z")

</div>

Sorry, I see your text only now. Here is a solution:

```
{reMp, imMp} = Simplify[ComplexExpand[ReIm[Mp]]]
absMp = Sqrt[reMp^2 + imMp^2]

```

`ReIm` separates the two parts, so that `Simplify` does cannot remix them again.

---

<div class="post-metadata">

**Author:** ![zohaibrehmani](https://avatars.discourse-cdn.com/v4/letter/z/ee59a6/32.png) [@zohaibrehmani](https://community.wolfram.com/u/zohaibrehmani)\
**Post date:** [March 1, 2024, 9:13am UTC](https://community.wolfram.com/t/complex-conjugation-and-mod-of-a-complex-expression/23662/4 "2024-03-01T09:13:28Z")

</div>

It did work. Thanks a lot.
