Let $a_1, a_2, \dots, a_n$ given with $a_i = \pm 1$. Let $f(x) = \sum_{k=1}^n a_k e^{ikx}$. I need to prove that $\lVert f \rVert_\infty \geq \sqrt{n}$ where $\lVert f \rVert_\infty$ is defined as the maximum value of $|f|$ in the interval $[0,2\pi]$.
Attempt: I tried experimenting with all $a_i$ being $1$ or $-1$ but I couldn't generalize it. Any hint would be appreciated. No need for the full solution.