Let $m_i \in \mathbb R^n$ be a vector with elements that are greater or equal $0$, and define the partitioned matrix $S \in \mathbb R^{n \times Nn}$ as $S \triangleq \begin{bmatrix} \mathrm{diag}(m_1)& \ldots& \mathrm{diag}(m_N) \end{bmatrix} $ with $N>1$. Is there a rigorous way to find $\textbf{rank}(S)$?
$\textbf{Observations:}$
1) Since $N>1$, $ \textbf{rank}(S) \le n$.
2) Let $\bar{m} \triangleq m_1 + \ldots + m_N \in \mathbb R^n$. Since elements of $m_i$ are greater or equal $0$ for $i=1,\ldots,N$, there is no cancellation that leads to $0$ element on $\bar{m}$. Therefore, the only way to get a $0$ elements in $\bar{m}$ is a zero row in $S$. Hence, $$\begin{align} \textbf{rank}(S) &= \text{number of positive elements in $\bar{m}$} \\ &= n - \text{number of $0$ elements in $\bar{m}$}. \end{align}$$ Is there a rigorous way to justify/prove this second observation?
The matrix $S$ can be put into row-echelon form by a sequence of operations:
(1) Scale each row to make the leading nonzero entry, if any, equal to $1$. This does not change the form of $S$ as it regards the diagonal blocks since we would divide a particular row of $S$ by a positive value. Call the resulting matrix $S'$. Now every nonzero row of $S'$ has a "leading one".
(2) Sort the resulting rows of $S'$ according to the rows leftmost positions of leading ones. Accordingly any all-zero rows of $S'$ will be sorted to the bottom rows, and we call this sorted matrix $R$. Now $R$ is in row-echelon form.
Noting that $\textbf{rank}(S) = \textbf{rank}(R)$ because these elementary row operations leave rank unchanged, we see that $\textbf{rank}(R)$ is evidently $n$ minus the number of all zero rows in $R$.
But a row in $R$ contains only zeros if and only if the original row in $S$ contained only zeros. Finally, the sum of corresponding entries in the non-negative vectors $m_i$ is zero if and only if all those corresponding entries of vectors $m_i$ are zero, so counting such zero sums is the same as counting the zero rows of $S$. QED