# Sums of complex numbers - proof in Rudin's book

I have one question about a proof in Rudin's book:

If $z_1 ..., z_N$ are complex numbers then there is a subset $S$ of $\{1,..., N \}$ for which $|\sum_{k \in S} z_k| \ge \frac{1}{\pi} \sum_{1}^N |z_k|$

Proof:

Write $z_k = |z_k| e^{i \alpha_k}$.

For $\phi \in [- \pi, \pi]$ let $\ \ S(\phi):= \{ k | \cos (\alpha_k - \phi)>0 \}$.

Then $|\sum _{S(\phi)} z_k| = |\sum_{S(\phi) } e^{-i \phi} z_k| \ge Re(\sum_{S(\phi) } e^{-i \phi} z_k) = \sum_1^N |z_k| \cos ^+ (\alpha_k - \phi)$.

Could you tell me why the two equations hold (the inequality is quite obvious) and what $\cos ^+$ stands for?

$\cos^+$ is the positive part of the cosine. Generally, for a real-valued function $f$, we have the positive and negative parts of $f$:

\begin{align} f^+(x) &= \max \{ 0, f(x)\} = \begin{cases} f(x) &, f(x) \geqslant 0 \\ 0 &, f(x) < 0,\end{cases}\\ f^-(x) &= \max \{ 0, -f(x)\} = \begin{cases} -f(x) &, f(x) < 0 \\ 0 &, f(x) \geqslant 0. \end{cases} \end{align}

Note that both, the psoitive part and the negative part are non-negative (somewhat confusing at first), and we have $f(x) = f^+(x) - f^-(x)$ as well as $\lvert f(x)\rvert = f^+(x) + f^-(x)$.

We have the first equality

$$\left\lvert \sum_{k\in S(\phi)} z_k\right\rvert = \left\lvert \sum_{k\in S(\phi)} e^{-i\phi}z_k\right\rvert$$

since $\lvert e^{-i\phi}\rvert = 1$, and every term in the sum is multiplied with the same factor, so that means the entire sum is multiplied with $e^{-i\phi}$, which has modulus $1$. Since $\lvert ab\rvert = \lvert a\rvert\cdot \lvert b\rvert$, multiplying with a number of modulus $1$ doesn't change the modulus.

The second equality comes from writing $z_k$ in polar form, so

$$e^{-i\phi}z_k = e^{-i\phi} \lvert z_k\rvert e^{i\alpha_k} = \lvert z_k\rvert e^{i(\alpha_k-\phi)},$$

and taking the real part gives

$$\operatorname{Re} \left(e^{-i\phi}z_k\right) = \lvert z_k\rvert\cos (\alpha_k-\phi).$$

Since for $k\in S(\phi)$ we have $\cos (\alpha_k-\phi) = \cos^+(\alpha_k-\phi)$, and $\cos^+(\alpha_k-\phi) = 0$ for $k\notin S(\phi)$, we have

$$\sum_{k\in S(\phi)} \lvert z_k\rvert \cos (\alpha_k-\phi) = \sum_{k\in S(\phi)} \lvert z_k\rvert \cos^+ (\alpha_k-\phi) = \sum_{k=1}^N \lvert z_k\rvert \cos^+ (\alpha_k-\phi).$$