BasicsFor addition and subtraction, add and subtract the real and imaginary parts.
In[2]:=
(2+3 I)+(1+2 I)
Out[2]=
3 + 5 I
In[3]:=
(4-6 I)-(6-4 I)
Out[3]=
-2 - 2 I
FOIL is used, along with i^2=-1, to do multiplication.
In[4]:=
(2-3 I) (1+4 I)
Out[4]=
14 + 5 I
In[5]:=
(2-I)/(5+2 I)
Out[5]=
8 9 I -- - --- 29 29
Rationalizing the denominator was used in this calculation. The number 29 in the above calculation is the square of the modulus (absolute value) of (5+2i). In general, if z=a+bi, |z|=Sqrt[a^2+b^2]. Alternately,
|z|=Sqrt[ [Re(z)]^2+[Im(z)]^2 ].
In[6]:=
z=5+2 I
Out[6]=
5 + 2 I
In[7]:=
Re[z]
Im[z]
Abs[z]
Out[7]=
5
Out[8]=
2
Out[9]=
Sqrt[29]
The complex conjugate of z=a+bi, denoted z bar (z with a bar over it), is
a-bi.
In[10]:=
Conjugate[z]
Out[10]=
5 - 2 I
Up to Complex Numbers