Given a non-negative real matrix $A \in \Bbb R_+^{m \times n}$, how do I convert it to a doubly stochastic matrix (each row and column sums to $1$)
$$\sum_{j=1}^n A_{ij}= 1, \qquad \forall i = 1, \dots, m \tag{row sum}$$
$$\sum_{i=1}^m A_{ij}= 1, \qquad \forall j = 1, \dots, n \tag{column sum}$$
Is the conversion possible? If not, can we find a nearest matrix that is doubly stochastic matrix?