What follows from this matrix equation? I would like to prove (if it is true) that from the equation
$$\mathcal{D}(r)Ac=\mathcal{D}(c)Ar$$ where $A$ is a non negative $n\times n$ matrix, $r,c\in\mathbb{R}^n$ are positive vectors and the operator $\mathcal{D}$ applied to a vector returns a diagonal matrix that has that vector on the main diagonal, it follows that $$r=c.$$
I tried to rearrange the first equation, but I cannot prove that result.
Any hint?
 A: Of course, the OP did not get tired by explaining his question. Firstly, if $A=0$, then it is clearly false. Secondly, as he notes in a comment, the conclusion is not the one requested.
Proposition. Let $A\ge 0$ s.t. if $i\not= j$, then $a_{i,j}>0$. Then $r>0,c>0,D(r)Ac=D(c)Ar$ implies that $c=\lambda r$ where $\lambda>0$.
Proof. One has, $Ac=D(r)^{-1}D(c)Ar$, that is, for every $i$: $\sum_ja_{i,j}c_j=c_i/r_i\sum_ja_{i,j}r_j$.
Let $i$ s.t. $c_i/r_i=\sup_j(c_j/r_j)$. For this $i$
$\sum_ja_{i,j}c_j=c_i/r_i\sum_ja_{i,j}r_j\geq \sum_ja_{i,j}r_jc_j/r_j=\sum_ja_{i,j}c_j$. Then, for every $j$, $a_{i,j}r_jc_i/r_i=a_{i,j}r_jc_j/r_j$, that implies $a_{i,j}=0$ or $c_i/r_i=c_j/r_j$. Finally, for $j\not= i$, $c_i/r_i=c_j/r_j$ and we are done.
A: Assume $r\neq c$. If we prove that
$$D(r)Ac \neq D(c)Ar$$
then we have proven the theorem.
$D(r)$ and $D(c)$ cannot be singular (according to the assumption that all their diagonals are positive numbers). If $A$ is full rank then both $D(r)A$ and $D(c)A$ are full rank. therefore, it is always true that
$$D(r)Ac \neq D(c)Ar$$
when $r\neq c$.
In the second case, we assume that $A$ is singular. Then, there are $r$ and $c$ such that $r\neq c$ and $Ac=Ar=0$ ($r$ and $c$ are in the null-space of $A$). Therefore, we cannot assume that if $r \neq c$ then $D(r)Ac \neq D(c)Ar$. 
Consequently, the theorem is true, if $A$ is not singular.
