Basics

A complex number is an expression of the form z=a+bi where a and b are real numbers and i=Sqrt[-1]. The number a is called the real part, denoted Re(z) and b is called the imaginary part, denoted Im(z). Note that i^2=-1. You add, subtract, multiply and divide complex numbers in the manner that you would think from elementary algebra. In Mathematica, the CAPITAL letter I denotes Sqrt[-1].

For addition and subtraction, add and subtract the real and imaginary parts.


  (2+3 I)+(1+2 I)


  (4-6 I)-(6-4 I)

FOIL is used, along with i^2=-1, to do multiplication.


  (2-3 I) (1+4 I)


  (2-I)/(5+2 I)

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


  z=5+2 I


  Re[z]
  Im[z]
  Abs[z]

The complex conjugate of z=a+bi, denoted z bar (z with a bar over it), is
a-bi.


  Conjugate[z]

Up to Complex Numbers