Suppose I have a Matrix here, if you add up all the cells, it equal to $1$.
$A=\begin{pmatrix} 0.4167 & 0.0833 \\ 0.0833 & 0.04167 \\ 0.125 & 0.25 \end{pmatrix}$
Then, we know the share of rows (add up the row/column ) are $Row=(0.5,0.125,0.375)$ and the share of columns are $Column=(0.625,0.375)$.
Now, if we calculate:
$B= Row'*Column =\begin{pmatrix} 0.3125 & 0.1875 \\ 0.078125 & 0.046875 \\ 0.234375 & 0.140625 \end{pmatrix}$
We see Matrix A is not equal to Matrix B, but they can all create the same row share and column share. But the row share & column share can only create Matrix B. The relationship is $A\rightarrow ROW/Column \leftrightarrow B$
My question is whether we have any method to figure out all the A (I mean all the combinations, maybe $A_1$ $A_2$) if we have a Matrix B. And can we know the number of A? Does it countable?
Thank you!
Here is the edition of the second time, because I figure out some of the problems.
If we transform the question into a Matrix calculation:
Let's define the matrix A, B has i columns and j rows: $A_{ij}$ $B_{ij}$ , and $p_{j1}$ $q_{1i}$ is the vector that every cell equal to 1.
The problem is
\begin{cases} A_{ij} * p_{j1} = B_{ij} * p_{j1} \\ q_{1i} * A_{ij} = q_{1i} * B_{ij} \end{cases}
Then:
\begin{cases} (A_{ij}-B_{ij}) * p_{j1} = 0 \\ q_{1i} * (A_{ij}-B_{ij}) = 0 \end{cases}
If we make $T_{ij} = A_{ij}-B_{ij}$ ,
\begin{cases} T_{ij} * p_{j1} = 0 \\ q_{1i} * T_{ij} = 0 \end{cases}
We are actually trying to find $T_{ij}$, which is obviously countless and continuous.
So, my question here is how to generate $T_{ij}$ matrix satisfied the equations, any algorithm or any paper discussing it's properties?
Thank you!
Let $N$ be a matrix of all ones, the same size as $A$, then the expected value of $A$ is $$B = {\mathbb E}(A) = \frac{AN^TA}{{\rm Tr}(AN^T)}$$ The matrix $B$ preserves the marginal totals (row and column sums) of $A$, and there are an infinite number of different $A$ matrices with the same expected value $\,{\mathbb E}(A)$.
Given $$\eqalign{ &\lambda \in{\mathbb R},\quad e_i\in{\mathbb R}^{m},\quad \varepsilon_k\in{\mathbb R}^{n},\quad A\in{\mathbb R}^{m\times n} \cr }$$ where $\,\{e_i,\,\varepsilon_k\}$ are the standard basis vectors for their respective dimension.
Define the matrix $$\eqalign{ &G_{hijk} = (e_h-e_i)(\varepsilon_j-\varepsilon_k)^T\quad {\rm e.g.}\quad G_{1312}=\pmatrix{\;\;1&-1\\\;\;0&\;\;0\\-1&\;\;1} }$$ Note that $N^TG_{hijk}=0\,$ and $\,G_{hijk}N^T=0$.
Finally, the family of matrices $$\eqalign{ F &= A + \lambda\,G_{hijk} \cr }$$ has the same expected value for any combination of $\big\{h,i,j,k,\lambda\big\}$.
In particular, $\lambda=0\,$ recovers $A$.