First of all i hope I'm at the right place to ask for help with this problem!
Let's assume a simple 2x2 grid in where all x and y values are not known. The total values are known though.
x1 | x2 | xTotal
y1 | y2 | yTotal
____________________
xy1Total | xy2Total
xTotal = x1 + x2
yTotal = y1 + y2
xy1Total = x1 + y1
xy2Total = x2 + y2
Example numbers for the known values:
xy1Total = 13
xy2Total = 17
xTotal = 15
yTotal = 15
Is there any way of "re-calculating" the unknown values? I stumbled upon the Gaussian elimination. I'm still not sure if this method can be applied here.
Thanks in advance.
It suffices to consider the system
which is in the augmented matrix form
$$\left[\begin{array}{cccc|c} 1& 1& 0& 0& 13\\ 0& 0& 1& 1& 17\\ 1& 0& 1& 0& 15\\ 0& 1& 0& 1& 15\\ \end{array}\right]$$
which can be solved by Gaussian elimination that is
$$\left[\begin{array}{cccc|c} 1& 1& 0& 0& 13\\ 1& 0& 1& 0& 15\\ 0& 1& 0& 1& 15\\ 0& 0& 1& 1& 17\\ \end{array}\right]\to \left[\begin{array}{cccc|c} 1& 1& 0& 0& 13\\ 0& -1& 1& 0& 2\\ 0& 1& 0& 1& 15\\ 0& 0& 1& 1& 17\\ \end{array}\right]\to \left[\begin{array}{cccc|c} 1& 1& 0& 0& 13\\ 0& -1& 1& 0& 2\\ 0& 0& 1& 1& 17\\ 0& 0& 1& 1& 17\\ \end{array}\right]\to \left[\begin{array}{cccc|c} 1& 1& 0& 0& 13\\ 0& -1& 1& 0& 2\\ 0& 0& 1& 1& 17\\ 0& 0& 0& 0& 0\\ \end{array}\right]$$
therefore setting $y_2=k$ as free we obtain