\begin{align*}
    P 1_{M_\mathrm{r}} &= \frac{1}{M_\mathrm{g}}\left( 1, \cdots, 1\right)^\top \in \mathbb R^{M_g}\\
    P^\top 1_{M_\mathrm{g}} &= \frac{1}{M_\mathrm{r}}\left( 1, \cdots, 1\right)^\top  \in \mathbb R^{M_r},
\end{align*}
