We know that the square of a real number (whether positive, negative or zero) is non-negative. Hence the equations $x^{2}=-1$, $x^{2}=-5$, $x^{2}+7=0$  etc. are not solvable in real number system. Therefore, complex number system is used to solve these equations.

Complex Numbers
We know that the equation $x^{2}+1=0$ is not solvable in real number system i.e. it has no real roots. Euler introduced the symbol $i$  to represent $\sqrt{-1}$, and he defined $i^{2}=-1$.
Also $(-i)^{2}=i^{2}=-1$ .
$i$ is a solution of the equation $x^{2}+1=0$.  Thus the equation $x^{2}+1=0$ has two solutions, $x=\pm i$, where $i=\sqrt{-1}$.
The number $i$ is called an imaginary number. In general, the square roots of all negative real numbers are called imaginary numbers.

A number of the form $a+ib$, where a and b are real numbers, is called a complex number.
Ex: $3+5i$, $-2+i\sqrt{5}$, $7+i(-\frac{2}{3})$
If $z=a+ib$  is a complex number, then a is called the real part, denoted by Re(z) and b is called the imaginary part, denoted by Im(z).
Examples:
(i) If $z=-3+i\sqrt{5}$ , then Re(z)=-3 and Im(z)=$\sqrt{5}$
(ii) If z=7, then $z=7+0i$, so Re(z)=7 and Im(z)=0
(iii) If z=-5i, then $z=0+(-5)i$ , so Re(z)=0 and Im(z)=-5

Equality of two complex numbers
Two complex numbers $z_{1}=a+ib$  and $z_{2}=c+id$  are called equal, written as $z_{1}=z_{2}$ , if and only if a=c and b=d. [Re($z_{1}$)=Re($z_{2}$) and Im($z_{1}$)=Im($z_{2}$)]

Algebra of complex numbers
Addition of two complex numbers
Let $z_{1}=a+ib$ and $z_{2}=c+id$ be any two complex numbers, then their sum $z_{1}+z_{2}$ is defined as,
$z_{1}+z_{2}=(a+c)+i(b+d)$

Example: $z_{1}=2+i3$ and $z_{2}=-5+i4$
$z_{1}+z_{2}=(2+(-5))+i(3+4)$ $=-3+i7$

Properties of addition of complex numbers
(i) Closure Law
The sum of two complex numbers is a complex number.
If $z_{1}$ and $z_{2}$ are any two complex numbers, then $z_{1}+z_{2}$ is always a complex number.

(ii) Commutative Law
If $z_{1}$ and $z_{2}$ are any two complex numbers, then $z_{1}+z_{2}$=$z_{2}+z_{1}$

(iii) Associative Law
If $z_{1}$, $z_{2}$ and $z_{3}$ are any three complex numbers, then
$(z_{1}+z_{2})+z_{3}=z_{1}+(z_{2}+z_{3})$

(iv) The existence of additive identity
Let $z=x+iy$, x,y∈R, be any complex number, then
$(x+iy)+(0+i0)=x+iy$ and
$(0+i0)+(x+iy)=x+iy$
Therefore $0+i0$ acts as the additive identity written as 0.
Thus $z+0=z=0+z$ for all complex numbers z.

(v) The existence of additive inverse
For a complex number $z=a+ib$, its negative is defined as $-z=-a-ib$.
We observe that $z+(-z)=0$, thus $-z$  acts as an additive inverse of $z$.

Subtraction of complex numbers
Let $z_{1}=a+ib$ and $z_{2}=c+id$ be any two complex numbers, then their difference $z_{1}-z_{2}$ is defined as,
$z_{1}-z_{2}=(a-c)+i(b-d)$

Example: $z_{1}=2-i$ and $z_{2}=-6-i3$
$z_{1}-z_{2}=(2-(-6))+i(-1-(-3))$ $=8+i2$

Multiplication of two complex numbers
Let $z_{1}=a+ib$ and $z_{2}=c+id$ be any two complex numbers, then their product $z_{1}z_{2}$ is defined as,
$z_{1}z_{2}=(ac-bd)+i(ad+bc)$

Example: $z_{1}=3+i7$ and $z_{2}=-2+i5$
$z_{1}z_{2}=(3×(-3)-7×5)$ $+i(3×5+7×(-2))$ $=-41+i$

Properties of multiplication of complex numbers
(i) Closure Law
The product of two complex numbers is a complex number.
If $z_{1}$ and $z_{2}$ are any two complex numbers, then $z_{1}z_{2}$ is always a complex number.

(ii) Commutative Law
If $z_{1}$ and $z_{2}$ are any two complex numbers, then $z_{1}z_{2}$=$z_{2}z_{1}$

(iii) Associative Law
If $z_{1}$, $z_{2}$ and $z_{3}$ are any three complex numbers, then
$(z_{1}z_{2})z_{3}=z_{1}(z_{2}z_{3})$

(iv) The existence of multiplicative identity
Let $z=x+iy$, x,y∈R, be any complex number, then
$(x+iy)(1+i0)=x+iy$ and
$(1+i0)(x+iy)=x+iy$
Therefore $1+i0$ acts as the multiplicative identity written as 1.
Thus $z.1=z=1.z$ for all complex numbers z.

(v) The existence of multiplicative inverse
For every non zero complex number $z=a+ib$, we have the complex number $\frac{a}{a^{2}+b^{2}}+i\frac{-b}{a^{2}+b^{2}}$ (denoted by $\frac{1}{z}$ or $z^{-1}$ ) such that $z.\frac{1}{z}=1=\frac{1}{z}.z$ .
$\frac{1}{z}$ is called the multiplicative inverse of $z$.

(vi) Distributive Law
If $z_{1}$, $z_{2}$ and $z_{3}$ are any three complex numbers, then
(a) $z_{1}(z_{2}+z_{3})=z_{1}z_{2}+z_{1}z_{3})$
(b) $(z_{1}+z_{2})z_{3}=z_{1}z_{3}+z_{2}z_{3})$

Division of complex numbers
Let $z_{1}=a+ib$ and $z_{2}=c+id$ be any two complex numbers where $z_{2}\neq 0$, the quotient $\frac{z_{1}}{z_{2}}$  is defined by,
$\frac{z_{1}}{z_{2}}=z_{1}.\frac{1}{z_{2}}=z_{1}.z_{2}^{-1}$  

Example: $z_{1}=3+i4$ and $z_{2}=5-i6$
$\frac{z_{1}}{z_{2}}=\frac{3+i4}{5-i6}$
= $\frac{3+i4}{5-i6}\times \frac{5+i6}{5+i6}$
= $\frac{(3+i4)(5+i6)}{5^{2}-i^{2}6^{2}}$
= $\frac{(3.5-4.6)+i(3.6+4.5)}{25-(-1)36}$
= $\frac{(15-24)+i(18+20)}{25+36}$
= $\frac{-9+i38}{61}$
= $\frac{-9}{61}+i\frac{38}{61}$

Powers of $i$
We know that,
$i^{0}=1$, $i^{1}=i$, $i^{2}=-1$
⇒ $i^{3}=i^{2}.i=(-1)i=-i$,
$i^{4}=(i^{2})^{2}=(-1)^{2}=1$,
$i^{5}=i^{4}.i=1.i=i$,
$i^{6}=i^{4}.i^{2}=1.(-1)=-1$  and so on.
$i^{-1}=\frac{1}{i}=\frac{1}{i}\frac{i}{i}$ $=\frac{i}{-1}=-i$
$i^{-2}=\frac{1}{i^{2}}=-1$
$i^{-3}=\frac{1}{i^{3}}=\frac{1}{i^{3}}\frac{i}{i}$ $=\frac{i}{i^{4}}=\frac{i}{1}=i$
$i^{-4}=\frac{1}{i^{4}}=\frac{1}{1}=1$   and so on.
In general, for any integer k, $i^{4k}=1$, $i^{4k+1}=i$, $i^{4k+2}=-1$, $i^{4k+3}=-i$

The square roots of a negative real number
We know that,  $i^{2}=-1$ and $(-i)^{2}=i^{2}=-1$
Therefore, the square roots of -1 are $i$ and $-i$
Similarly,
$(\sqrt{5i})^{2}=(\sqrt{5})^{2}i^{2}$ $=5(-1)=-5$ 
$(\sqrt{-5i})^{2}=(-\sqrt{5})^{2}i^{2}$ $=5(-1)=-5$
Therefore, the square roots of -1 are $i$ and $-i$
However, the symbol $\sqrt{-1}$ mean $i$ only i.e. $\sqrt{-1}=i$
Similarly, $\sqrt{-5}=\sqrt{5}i$
In general, if a is any positive real number, then $\sqrt{-a}=\sqrt{a}\sqrt{-1}=\sqrt{a}i$ 
We already know that $\sqrt{a}\times \sqrt{b}= \sqrt{ab}$  for all positive real numbers a and b. This result is also true when either a>0,b<0 or a<0, b>0.
But, when a<0 and b<0 ⇒ $\small i^{2}=\sqrt{-1}\sqrt{-1}=\sqrt{(-1)(-1)}=1$ , which is a contradiction to the fact that $i^{2}=-1$.
Therefore, $\sqrt{a}\times \sqrt{b}\neq \sqrt{ab}$ if both a and b are negative real numbers.
Further, if any of a and b is zero, then $\sqrt{a}\times \sqrt{b}= \sqrt{ab}=0$

Identities
If $z_{1}$ and $z_{2}$ are any two complex numbers, then
(i) $(z_{1}+z_{2})^{2}=z_{1}^{2}+2z_{1}z_{2}+z_{2}^{2}$
(ii) $(z_{1}-z_{2})^{2}=z_{1}^{2}-2z_{1}z_{2}+z_{2}^{2}$
(iii) $(z_{1}+z_{2})(z_{1}-z_{2})=z_{1}^{2}-z_{2}^{2}$
(iv) $(z_{1}+z_{2})^{3}$ $=z_{1}^{3}+3z_{1}^{2}z_{2}+3z_{1}z_{2}^{2}+z_{2}^{3}$
(v) $(z_{1}-z_{2})^{3}$ $=z_{1}^{3}-3z_{1}^{2}z_{2}+3z_{1}z_{2}^{2}-z_{2}^{3}$

Modulus of a complex number
Modulus of a complex number $z=a+ib$, denoted by mod($z$) or $|z|$, is defined as
$|z|=\sqrt{a^{2}+b^{2}}$, where a=Re($z$) and b=Im($z$).
Properties of modulus of a complex number
If $z$, $z_{1}$ and $z_{2}$ are complex numbers then,
(i) $|-z|=|z|$
(ii) $|z|=0$, if and only if $z=0$
(iii) $|z_{1}z_{2}|=|z_{1}||z_{2}|$
(iv) $\large |\frac{z_{1}}{z_{2}}|=\frac{|z_{1}|}{|z_{2}|}$, provided $z_{2}\neq 0$

Conjugate of a complex number
Conjugate of a complex number $z=a+ib$, denoted by $\bar{z}$, is defined as
$\bar{z}=a-ib$

Multiplicative Inverse of a complex number
 Multiplicative Inverse of the non-zero complex number $z$ is given by,
$z^{-1}$ $\large =\frac{\bar{z}}{|z|^{2}}$