# Complex numbers

**Complex numbers**have 2 distinct parts: a

**real part**and an

**imaginary part**. In general a complex number

*z*has the form

*z = x + iy*

where *x*, *y* are real numbers. The **real part** of *z*,
written *Re*{*z*}, is *x*. The **imaginary part** of
*z*, written *Im*{*z*}, is *y*. *Notice that,
confusingly, the imaginary part is a real number*. The imaginary part times
*i* is an imaginary number. So

*z*=

*Re*{

*z*} +

*iIm*{

*z*}.

The set of complex numbers, therefore, is defined by

*Complex*= {

*x + iy | x*∈

*Reals*, y ∈

*Reals*, and

*i*= √-1}.

Every real number is in *Complex*, because *x = x + i*0; and every
imaginary number *iy* is in *Complex*, because *iy* = 0 +
*iy*.

*z*

_{1}=

*x*

_{1}+

*iy*

_{1}and

*z*

_{2}=

*x*

_{2}+

*iy*

_{2}are equal if and only if their real parts are equal and their imaginary parts are equal, that is,

*z*

_{1}=

*z*

_{2}if and only if

*Re*{

*z*

_{1}} =

*Re*{

*z*

_{2}}, and

*Im*{*z*_{1}} = *Im*{*z*_{2}}.