I am trying to find frequency response and magnitude of the frequency response of the following system impulse response: $$h[n] = 2\delta [n] + 2\delta [n-1]$$
I understand, that through the DTFT: $$H(\omega ) = 2(1 + e^{-j\omega})$$
However, I am unsure how to find the magnitude of the frequency response. The solution is: $$|H(\omega )| = 4 \left| \cos \left(\frac{\omega }{2} \right) \right|$$
What steps are needed in order to convert the above frequency response to the magnitude of the frequency response?