2
$\begingroup$

I am trying to compute the Complex conjugate of two complex numbers multiplied together. However, when I go to define my complex numbers as $a+b I$ and $c+dI$ it does not like $b$ and $d$ because they are complex. I have tried to use Assumptions, but it also does not like that. Any ideas on how to define a and b to be real numbers?

z1 = a + b I, Assumptions -> {a, b} \[Element] Reals

Ideally what I would like is to have something of form

Simplify[Conjugate[z1 z2], {a,b,c,d} \[Element] Reals] \\Expand

which is what worked, but what does the \Expand part do? I know it expands it out but why the \ attached to it? What does that do to it?

$\endgroup$
  • $\begingroup$ Collect[(a + b j) (c + d j), j] /. j -> -I $\endgroup$ – Dr. belisarius Sep 17 '15 at 14:01
  • $\begingroup$ you are right. Now I would like to be able to define a and b as real numbers $\endgroup$ – Jack Armstrong Sep 17 '15 at 14:03
  • $\begingroup$ "define a and b as real numbers"? Mathematica isn't typed language... $\endgroup$ – Dr. belisarius Sep 17 '15 at 14:13
  • $\begingroup$ See also ComplexExpand. $\endgroup$ – ilian Sep 17 '15 at 14:30
  • 1
    $\begingroup$ As for your last question, \`Expand` is bad syntax. Probably you meant // Expand. In order to understand what // is, highlight it and hit F1. $\endgroup$ – march Sep 17 '15 at 16:22
2
$\begingroup$

I think Assumptions can be used in general like this

Method 1

First let us define the general list of reals

$Assumptions = {(a|b|c|d) \[Element] Reals}

Now you can check that it works.

Simplify[Conjugate[(a + b I) (c + d I)]]
(*(a - I b) (c - I d)*)

Method 2

Instead of defining all your variables separately, you can in fact define a real array and use the array elements as your variable

Here t is the real array

  $Assumptions = {(t[_]) \[Element] Reals}

Then you can use the array elements t

  Simplify[Conjugate[(t[1] + t[2] I) (t[3] + t[4] I)]]
  (*(t[1] - I t[2]) (t[3] - I t[4])*)

Method 3

I'm not sure if this is a good practice but it seems that I can make everything to be real like this

 $Assumptions = {(_) \[Element] Reals}
| improve this answer | |
$\endgroup$
2
$\begingroup$

How simple is this?

Conjugate[(a + b I) (c + d I)] // ComplexExpand
a c - b d + I (-b c - a d)
| improve this answer | |
$\endgroup$
1
$\begingroup$

Assumptions can not be used in general. It is specific to certain functions such as Simplify, Refine, Integrate ... as explained in the document here

In order to get the desired result use:

Simplify[Conjugate[(a + b I) (c + d I)],
 Assumptions -> a ∈ Reals && b ∈ Reals && c ∈ Reals && d ∈ Reals]

For Simplify the second argument is the assumptions so you don't have to specify that explicity.

Simplify[Conjugate[(a + b I) (c + d I)],
 a ∈ Reals && b ∈ Reals && c ∈ Reals && d ∈ Reals]
| improve this answer | |
$\endgroup$
  • $\begingroup$ When I use that, my output is (c - I d) (a + Conjugate[bI]) $\endgroup$ – Jack Armstrong Sep 17 '15 at 14:08
  • $\begingroup$ @JackArmstrong - If you are getting Conjugate[bI], you left out the space or asterisk between b and I $\endgroup$ – Bob Hanlon Sep 17 '15 at 14:51
1
$\begingroup$

You may do it this way:

z1 = a + I*b;
z2 = c + I*d;

expr = Simplify[z1*z2 // Conjugate, {a, b, c, d} \[Element] Reals] // 
  Expand

(*  a c - I b c - I a d - b d  *)

Then like this:

(expr /. Complex[0, -1] -> 0) + Factor[expr - (expr /. Complex[0, -1] -> 0)]

(*  a c - b d - I (b c + a d)   *)

Alternatively, like this:

expr[[1]] + expr[[4]] + Factor[Take[expr[[2 ;; 3]]]]

(*  a c - b d - I (b c + a d)   *)

But if you claim that it is uncomfortable not to have a simple function for this kind of things, I agree.

Have fun!

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.