Im reading a paper by Matomaki [here](https://link.springer.com/content/pdf/10.1007/s10474-009-8163-5.pdf), and the following is stated (I'm paraphrasing):


"By the Cauchy-Schwarz inequality and the large sieve, we have
$$\sum\_{q \leq Q}\frac{q}{\phi(q)}\sum\_{\substack{\chi\text{(mod $q$)}\\\text{primtiive}}} \big{|}\sum\_{a \in \mathcal{A}}\chi(a)\sum\_{b \in \mathcal{B}}\chi(b) \big{|} \leq (Q^2 + N)(AB)^{1/2}$$
where $Q,N$ are positive integers and $\mathcal{A}, \mathcal{B}\subseteq \{1,...,N\}$ and $|\mathcal{A}| = A$ and $|\mathcal{B}| = B$."


Now I am not so concerned with the application of the large sieve, but I am a little confused about how she applied Cauchy-Schwarz. Of course the large sieve she is referring to states
$$\sum\_{q \leq Q}\frac{q}{\phi(q)}\sum\_{\substack{\chi\text{(mod $q$)}\\\text{primtiive}}} \big{|}\sum\_{n \leq N }a\_n\chi(n)\big{|}^2 \leq (Q^2 + N)\sum\_{n \leq N}|a\_n|^2.$$


But I am unsure of how she used Cauchy-Schwarz, especially with multiplicative characters. Does anyone have any thoughts?



Specific application of Cauchy-Schwarz and Large Sieve
As she writes, first apply Cauchy-Schwarz, and only then apply the large sieve (twice).
The relevant instance of Cauchy-Schwarz is
$$|x\_1 x\_2| \le \frac{|x\_1|^2+|x\_2|^2}{2},$$
which, by replacing $x\_1$ and $x\_2$ by $x\_1\sqrt{C}$ and $x\_2/\sqrt{C}$ ($C>0$) becomes
$$|x\_1 x\_2| \le \frac{C |x\_1|^2 + C^{-1} |x\_2|^2}{2}.$$
We apply it with $x\_1=\sum\_{a \in \mathcal{A}} \chi(a)$ and $x\_2 = \sum\_{b \in \mathcal{B}}\chi(b)$ and with $C$ to be determined later (but independent of $\chi$). We obtain that the relevant sum is
$$\le \frac{1}{2}\left( C\sum\_{q \le Q} \frac{q}{\phi(q)}\sum\_{\substack{\chi \bmod q\\ \text{primitive}}}\left|\sum\_{a \in \mathcal{A}} \chi(a)\right|^2 + C^{-1}\sum\_{q \le Q} \frac{q}{\phi(q)}\sum\_{\substack{\chi \bmod q\\ \text{primitive}}} \left|\sum\_{b \in \mathcal{B}} \chi(b)\right|^2 \right),$$
which, by two applications of the large sieve, is
$$\le \frac{1}{2}(Q^2 + N)\left( CA+ C^{-1} B\right).$$
Now take $C=\sqrt{B/A}$.


