Simplify equation of single pole IIR transfer function Example - Consider the causal stable IIR transfer function 
  $$
H(z)=\frac{K}{1-\alpha z^{-1}}, \quad 0 &lt; \lvert \alpha\rvert 1
$$ 
  where $K$ and $\alpha$ are real constants
  Its square-magnitude function is given by
  $$
\lvert H\left(e^{j\omega}\right)\rvert^2 = H(z)H\left(z^{-1}\right)\bigg\vert_{z=e^{j\omega}}=\frac{K^2}{\left(1+\alpha^2\right)-2\alpha\cos\omega}
$$
  


Can anyone please explain how to simplify the equation to get this form? I am not able to understand it.
$$H(z)\cdot H(z^{-1})= \frac{K}{1-\alpha \cdot e^{-j \omega}} \cdot \frac{K}{1-\alpha \cdot e^{+j \omega}}$$

$$= \frac{K^2}{1-\alpha \cdot (e^{-j \omega}+e^{+j \omega})+ \alpha^2} = \frac{K^2}{1 + \alpha^2- 2 \cdot \alpha \cdot Re\{e^{j \omega}\}} = \frac{K^2}{1 + \alpha^2- 2 \cdot \alpha \cdot \cos( \omega)} $$