# Complex Number
**An extension of real numbers using the imaginary unit.**
> [!NOTE] Rectangular form of a complex number
> $z=x+iy$
> - $x,y\in\mathbb{R}$ - *real* and *imaginary part*
> - $i=\sqrt{-1}$ - *imaginary unit*
The imaginary unit is so called as no real number can satisfy the equation $x^{2}=-1$. It is represented by $j$ in electrical engineering, as $i$ is used to denote electric current.
The set of complex numbers is denoted $\mathbb{C}$. The complex numbers also form a *real vector space* of dimension two with $[1,i]$ as its [[Basis#Standard basis|standard basis]]. Thus every complex number can be represented as a [[vector]].
Every complex number also has its own [[complex conjugate]].
![[ComplexNumber.svg|550]]
*A complex number represented as a vector; the argument $\phi$ is notated and is used in polar form*
## Polar form
Complex numbers are also commonly expressed in *[[Polar Coordinate System|polar]] form*, either using [[Euler's formula]] or angle notation. Angle notation is the more common form of representing a [[phasor]].
> [!NOTE] Polar form of a complex number
> $z=re^{i\phi}=r\angle \phi$
> - $r=|z|=\sqrt{x^2+y^2}$ - *modulus* or *magnitude* - the distance from the origin to the point $z$.
> - $\phi=\tan^{-1}\frac{y}{x}$ - *argument* or *[[phase]]* - the angle between the vector $z$ and the positive real axis.
The argument, $\phi$ or $\arg (z)$, can take *infinitely many values*, with values separated by integer multiples of $2\pi$.
### Principal argument
The *principal argument*, $\text{Arg}(z)$, is the typical choice for a well-defined *single-valued* argument function. It is defined over a restricted range $-\pi<\text{Arg}(z)\le\pi$.
$\text{Arg}(z)=\tan^{-1}\left(\frac{y}{x}\right)+
{\begin{cases} 0, & z\text{ in 1st or 4th quadrant} \\
\pi, & z\text{ in 2nd quadrant} \\
-\pi, & z\text{ in 3rd quadrant}
\end{cases}}$
## Operations
> [!Addition and subtraction]
$z_{1}\pm z_{2}=(x_{1}\pm x_{2})+i(y_{1}\pm y_{2})$
> [!Multiplication]
$z_{1}z_{2}=r_{1}r_{2}\angle(\phi_{1}+\phi_{2})$
^e47b34
> [!Division]
$\frac{z_{1}}{z_{2}}=\frac{r_{1}}{r_{2}}\angle(\phi_{1}-\phi_{2})$
^e3a9f7
> [!Inversion]
$\frac{1}{z}=\frac{\bar{z}}{|z|^2}=\frac{1}{r}\angle{-\phi}$
> [!NOTE] Integer [[Exponentiation#Complex base with rational exponents|exponentiation]]
> $z^{n}=r^{n}\angle n\phi$
> [[De Moivre's formula]] can be used to simplify the calculation of the integer exponentiation of complex numbers.
> [!Fractional exponentiation or root extraction]
Fractional exponentiation is [[Exponentiation#Complex base with rational exponents|multi-valued]] but its *principal value* is
$z^{\frac{1}{n}}=\sqrt[n]{z}=\sqrt[n]{r}\angle{\frac{\phi}{n}}$
For other values, the root can be found by *extending* [[de Moivre's Formula|de Moivre's formula]].