1
$\begingroup$

The 4x1 matrix is defined as:

q1 = {{-((
 I (-I p0 p1 + p1^2 - p0 p2 + p2^2 + e (p0 - I p1 - p2 - p3) + 
    m (p0 - I p1 - p2 - p3) - p0 p3 + p3^2))/(
 2 m^(3/2) Sqrt[(e + m)/m]))}, {(
I p0 p1 + p1^2 - p0 p2 + p2^2 + p0 p3 + p3^2 + 
 e (p0 + I p1 - p2 + p3) + m (p0 + I p1 - p2 + p3))/(
2 m^(3/2) Sqrt[(e + m)/m])}, {(
I p0 p1 + p1^2 + p0 p2 + p2^2 + p0 p3 + p3^2 + 
 e (p0 + I p1 + p2 + p3) + m (p0 + I p1 + p2 + p3))/(
2 m^(3/2) Sqrt[(e + m)/m])}, {(
I (-I p0 p1 + p1^2 + p0 p2 + p2^2 + e (p0 - I p1 + p2 - p3) + 
   m (p0 - I p1 + p2 - p3) - p0 p3 + p3^2))/(
2 m^(3/2) Sqrt[(e + m)/m])}};

Now to get conjugate transpose:

r1 = MatrixForm[Assuming[{p0, p1, p2, p3, e, m} \[Element] Reals, Simplify@ConjugateTranspose[q1]]]

But the above code doesn't seem to evaluate the expression fully. What to do?

$\endgroup$
5
  • $\begingroup$ Try Assuming[{p0, p1, p2, p3, e, m} \[Element] Reals && e > 0 && m > 0, FullSimplify @ ConjugateTranspose[q1]] $\endgroup$ Commented Nov 10, 2020 at 14:23
  • 2
    $\begingroup$ I also recommend you take heed of tip number 8 in this answer. $\endgroup$ Commented Nov 10, 2020 at 14:28
  • $\begingroup$ @SjoerdSmit Thanks man but, still some issue persists, 2 of the elements in the matrix output comes as: {-((I (p1^2 + p2^2 + p3^2 + Conjugate[ p0 (I p1 + p2 - p3) + e (p0 + I p1 + p2 - p3) + m (p0 + I p1 + p2 - p3)]))/(2 m Sqrt[e + m])) $\endgroup$ Commented Nov 10, 2020 at 14:49
  • $\begingroup$ How about ComplexExpand@ConjugateTranspose[q1]? $\endgroup$
    – user64494
    Commented Nov 10, 2020 at 15:12
  • $\begingroup$ @user64494 Yeah it does evaluate the expression and makes it more complicated by outputting cos and sin. I have to further multiply the matrix and simplify it. Does both the matrices need to be in ComplexExpand form?. The end result is still not coming. $\endgroup$ Commented Nov 10, 2020 at 15:26

3 Answers 3

1
$\begingroup$

To get rid of all Conjugate heads, you sometimes need to give Mathematica an extra push because there is no measure of "simplicity" that always does what people want. Here's an example:

Assuming[{p0, p1, p2, p3, e, m} \[Element] Reals && e > 0 && m > 0,
 FullSimplify[
  ConjugateTranspose[q1],
  ComplexityFunction -> Function[LeafCount[#] + 100*Count[#, _Conjugate, {0, Infinity}]]
  ]
]

enter image description here

The ComplexityFunction is effectively a way of telling Mathematica that you'll get very cross every time you see Conjugate appear in the output.

$\endgroup$
4
  • $\begingroup$ One sees Conjugate[(0. - 1. I) p0 p1 - 1. p0 p2 + 0.002 (p0 - (0. + 1. I) p1 - 1. p2 - 1. p3) and similar terms in the output. $\endgroup$
    – user64494
    Commented Nov 10, 2020 at 16:53
  • $\begingroup$ @user64494 Huh? That's not what I'm getting at all. See screenshot included in the edit. Are you sure you cleared all variables before trying this? $\endgroup$ Commented Nov 10, 2020 at 17:22
  • $\begingroup$ Sjoerd Smit: You are right: after cleaning your code and mine perform the same. $\endgroup$
    – user64494
    Commented Nov 10, 2020 at 18:02
  • $\begingroup$ I got the conjugate. Although I don't really understand how the complexity function command works. I have to further multiply 1x4 matrix with 4x1 matrix and get a scalar. But the answer is not correct. $\endgroup$ Commented Nov 10, 2020 at 19:40
0
$\begingroup$
FullSimplify[ComplexExpand@ConjugateTranspose[q1], Assumptions -> {p0, p1, p2, p3, e, m} \[Element] Reals && e > 0 &&  m > 0]

$$\left( \begin{array}{cccc} \frac{i \left(-\text{p3} (e+m+\text{p0})+e \text{p0}+i e \text{p1}-e \text{p2}+m \text{p0}+i m \text{p1}-m \text{p2}+i \text{p0} \text{p1}-\text{p0} \text{p2}+\text{p1}^2+\text{p2}^2+\text{p3}^2\right)}{2 m \sqrt{e+m}} & \frac{e (\text{p0}-i \text{p1}-\text{p2}+\text{p3})+m (\text{p0}-i \text{p1}-\text{p2}+\text{p3})-i \text{p0} \text{p1}-\text{p0} \text{p2}+\text{p0} \text{p3}+\text{p1}^2+\text{p2}^2+\text{p3}^2}{2 m \sqrt{e+m}} & \frac{e (\text{p0}-i \text{p1}+\text{p2}+\text{p3})+m (\text{p0}-i \text{p1}+\text{p2}+\text{p3})-i \text{p0} \text{p1}+\text{p0} \text{p2}+\text{p0} \text{p3}+\text{p1}^2+\text{p2}^2+\text{p3}^2}{2 m \sqrt{e+m}} & -\frac{i \left(-\text{p3} (e+m+\text{p0})+e \text{p0}+i e \text{p1}+e \text{p2}+m \text{p0}+i m \text{p1}+m \text{p2}+i \text{p0} \text{p1}+\text{p0} \text{p2}+\text{p1}^2+\text{p2}^2+\text{p3}^2\right)}{2 m \sqrt{e+m}} \\ \end{array} \right)$$

$\endgroup$
0
$\begingroup$

What about

Transpose[q1] // Expand /. I -> -I

LeafCount[FullSimplify[%,{e>0,m>0}]]
(*258*)
$\endgroup$
2
  • $\begingroup$ LeafCount[%] performs 1570 in comparison to 258 produced by other answers.. $\endgroup$
    – user64494
    Commented Nov 10, 2020 at 19:03
  • $\begingroup$ Simplification gives the same leafcount ! $\endgroup$ Commented Nov 10, 2020 at 19:12

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.