linear algebra question about perpendicular and parallel vectors notations: $v^\bot$ be the perpendicular part of $v$ to $1_n$ and $v^\|$ the parallel part of $v$ to $1_n$ such that $v=v^\bot + v^\|$
Let $x$ be a vector parallel to $1_n=(\frac{1}{n}, \frac{1}{n}, ..., \frac{1}{n})$ and $y$ perpendicular to $1_n$.
$B\subseteq \{1,...,n\}$ and P be an $n\times n$ matrix such that $P_{i,i}=1$ for $i\in B$ and 0 anywhere else, $|B|=\gamma n$.
prove that:
$\| (Px)^\bot \| \leq \sqrt{\gamma (1 - \gamma)} \|x\|$ 
$\| (Py)^\| \| \leq \sqrt{\gamma (1 - \gamma)} \|y\|$ 
i was able to prove the first inequality by just writing x as $c 1_n$ for some $c$ (and i got that they actually equal is that possible?) and for the second inequality i managed to find out that $\| (Py)^\| \| \leq \sqrt{\gamma} \|y\|$ and $\| (Py)^\| \| \leq \sqrt{1-\gamma} \|y\|$ using cauchy shwartz inequality but i cant find out how to prove the $\| (Py)^\| \| \leq \sqrt{\gamma (1 - \gamma)} \|y\|$  ineqality
 A: Let $N = \{1,\ldots,n\}$, define the vector $1_B \in \mathbb{R}^n$ by
$$
(1_B)_i = \left\{
\begin{array}{ll}
1, & i \in B\\
0, & i \in N\setminus B
\end{array}\right.
$$
and the vector $1_{N\setminus B} = e - 1_B$, where $e$ is the $n$-vector of all ones.
Clearly we have $e = 1_B + 1_{N\setminus B}$ and $1_{N\setminus B} = 1_B^{\perp}$. Now it is easy to see that
$$
\|(Py)^\parallel\| = \frac{1}{\sqrt{n}}|y^T1_B|
$$
Let $S$ be the space spanned by $1_B$ and $1_{N\setminus B}$. Then $y = \operatorname*{proj}_S y + \operatorname*{perp}_S y$ and 
$$
\|(Py)^\parallel\| = \frac{1}{\sqrt{n}}|(\operatorname{proj}_S y)^T1_B|
$$
since $\operatorname*{perp}_S y$ is orthogonal to $1_B\in S$.
Thus
$$
\|(Py)^\parallel\| = \frac{1}{\sqrt{n}}\|\operatorname{proj}_S y\|\cdot\|1_B\|\cos\theta = \sqrt{\gamma}\|\operatorname{proj}_S y\|\cos\theta,
$$
where $\theta$ is the angle between $\operatorname{proj}_S y$ and $1_B$. Since $y^Te = 0$ and $e\in S$ we have $e^T\operatorname*{proj}_Sy = 0$. Therefore, by the geometry of $e$, $1_B$, $1_{N\setminus B}$, and $\operatorname*{proj}_Sy$ it follows that 
$$
\cos\theta = \frac{\|1_{N\setminus B}\|}{\|e\|} = \sqrt{1-\gamma}
$$
Hence
$$
\|(Py)^\parallel\| = \sqrt{\gamma(1-\gamma)}\,\|\operatorname{proj}_S y\| \leq \sqrt{\gamma(1-\gamma)}\,\|y\| 
$$
