Let $\mathbf{x},\mathbf{y} \in \mathbb{R}^n$. We say that $\mathbf{x} \leq \mathbf{y}$ iff $x_{(1)} \geq y_{(1)}, x_{(1)}+x_{(2)} \geq y_{(1)}+y_{(2)},\cdots,x_{(1)}+\cdots+x_{(n-1)} \geq y_{(1)}+\cdots+y_{(n-1)}$ and $x_{(1)}+\cdots+x_{(n)} = y_{(1)}+\cdots+y_{(n)}$. Then, I have to show that : $$\mathbf{x} \leq \mathbf{y} \text{ iff } \mathbf{x}=M\mathbf{y},$$ where $M \in \mathbb{R}^{n \times n}$ such that each row and column of $M$ adds up to $1$, i.e. $\sum_im_{ij}=1$ for all $j$ and $\sum_jm_{ij}=1$ for all $i$.
For the if part : I have shown that $x_{(1)} \geq y_{(1)}$ and $x_{(1)}+\cdots+x_{(n)} = y_{(1)}+\cdots+y_{(n)}$, but I cannot figure out how to show the middle conditions. And I cannot progress on the only if part. Any help would be much appreciated.