TITLE: Cauchy-Schwarz and pigeonhole
QUESTION [25 upvotes]: I've occasionally heard it stated (most notably on Terry Tao's blog) that "the Cauchy-Schwarz inequality can be viewed as a quantitative strengthening of the pigeonhole principle." I've certainly seen the inequality put to good use, but I haven't seen anything to make me believe that statement on the same level that I believe that the probabilistic method can be used as a (vast) strengthening of pigeonhole. 
So, how exactly can Cauchy-Schwarz be seen as a quantitative version of the pigeonhole principle? And for extra pigeonholey goodness, are there similarly powered-up versions of the principle's other generalizations? (Linear algebra arguments [particularly dimension arguments], the probabilistic method, etc.)

REPLY [2 votes]: The contrapositive of PH is: If you put at most one pigeon per hole, then you have at most $n$ pigeons. Letting $a = (1,\dots,1)$ and $b_i$ be the number of pigeons in hole $i$ with $b_i \in \{0,1\}$, then Cauchy-Schwarz is
$$ \text{number of pigeons} = \sum_i b_i \leq \sqrt{n} \|b\| . $$
We have $\|b\| \leq \sqrt{n}$ so this relaxes to say there are at most $n$ pigeons. So, maybe this is a good generalization of PH:
Theorem. Suppose that pigeon species $i$ weighs $a_i$ pounds. If the total weight of your pigeons exceeds $\|a\| \|B\|$ where $B \geq \vec{0}$, then there exists a species $i$ for which you have more than $B_i$ pigeons.
Proof. By contrapositive, if you have $b_i \in [0,B_i]$ pigeons of each species, then the total weight is $\sum_i a_i b_i \leq \|a\| \|b\| \leq \|a\| \|B\|$.