TITLE: Limit of alternated row and column normalizations
QUESTION [6 upvotes]: Let $E_0$ be a matrix with non-negative entries.
Given $E_n$, we apply the following two operations in sequence to produce $E_{n+1}$.
A. Divide every entry by the sum of all entries in its column (to make the matrix column-stochastic).
B. Divide every entry by the sum of all entries in its row (to make the matrix row-stochastic).
For example:
$E_0=\begin{pmatrix}
\frac{2}{5} & \frac{1}{5} & \frac{2}{5} & 0 & 0\\ 
\frac{1}{5} & 0 & \frac{7}{10} & \frac{1}{10} & 0\\ 
0 & 0 & 0 & \frac{3}{10} & \frac{7}{10}
\end{pmatrix}\overset{A}{\rightarrow}\begin{pmatrix}
\frac{2}{3} & 1 & \frac{4}{11} & 0 & 0\\ 
\frac{1}{3} & 0 & \frac{7}{11} & \frac{1}{4} & 0\\ 
0 & 0 & 0 & \frac{3}{4} & 1
\end{pmatrix}\overset{B}{\rightarrow}\begin{pmatrix}
\frac{22}{67} & \frac{33}{67} & \frac{12}{67} & 0 & 0\\ 
\frac{44}{161} & 0 & \frac{12}{23} & \frac{33}{161} & 0\\ 
0 & 0 & 0 & \frac{3}{7} & \frac{4}{7}
\end{pmatrix}=E_1$
What is the limit of $E_n$ as $n \to \infty$?

Additional remarks.
In my problem, the matrix has $c\in \{1,2,\dots,5\}$ rows and $r=5$ columns (note that the two letters are reversed, but in the original context of this problem these letters $r$ and $c$ do not actually stand for rows and columns). So $E_0$ can be $1\times 5$, $2\times 5$, ... or $5\times 5$.
We denote with $(e_n)_{ij}$ the entries of $E_{n}$; hence $(e_n)_{ij}\in[0;1]$ and $\forall i \sum_{j=1}^{r}(e_n)_{ij}=1$ for $n>0$.
I managed to express $(e_{n+1})_{ij}$ as a function of $(e_{n})_{ij}$ :
$$(e_{n+1})_{ij}=\frac{\frac{(e_{n})_{ij}}{\sum_{k=1}^{c}(e_n)_{kj}}}{\sum_{l=1}^{r}\frac{(e_n)_{il}}{\sum_{k=1}^{c}(e_n)_{kl}}}$$
What I can't seem to find now is an expression $(e_{n})_{ij}$ as a function of $(e_{0})_{ij}$, to be able to calculate $\underset{n \to +\infty }{lim}(e_n)_{ij}$
I wrote code to compute this iteration; when I ran it with the previous example $E_0$, I found out that:
$E_0=\begin{pmatrix}
\frac{2}{5} & \frac{1}{5} & \frac{2}{5} & 0 & 0\\ 
\frac{1}{5} & 0 & \frac{7}{10} & \frac{1}{10} & 0\\ 
0 & 0 & 0 & \frac{3}{10} & \frac{7}{10}
\end{pmatrix}\overset{n \rightarrow+\infty}{\rightarrow}E_n=\begin{pmatrix}
\frac{7}{25} & \frac{3}{5} & \frac{3}{25} & 0 & 0\\ 
\frac{8}{25} & 0 & \frac{12}{25} & \frac{1}{5} & 0\\ 
0 & 0 & 0 & \frac{2}{5} & \frac{3}{5}
\end{pmatrix}$
Not only do the row sums equal $1$, but the column sums equal $\frac{3}{5}$: it seems that in this process column sums converge to $\frac{c}{r}$.
I'm not a mathematician so I was looking for a simple inductive proof. I tried to express $E_2$ (and so on) as a function of $E_0$, but it quickly gets overwhelming, starting from $E_2$...

REPLY [5 votes]: When $E_0$ is square (i.e., $r = c$) this procedure is called Sinkhorn iteration or the Sinkhorn-Knopp algorithm (see this Wikipedia page). You can find a wealth of results by Googling those terms, the most well-known of which is that if $E_0$ has strictly positive entries (and again, is square) then the limit of $E_n$ indeed exists and is doubly stochastic.