Solve an overdetermined system of linear equations I have doubt to solve this system of equations
\begin{cases}
x+y=r_1\\
x+z=c_1\\
x+w=d_1\\
y+z=d_2\\
y+w=c_2\\
z+w=r_2
\end{cases}
Is it an overdetermined system because I see there are more equations than unknowns.
Can we just solve this system in a simple way?
 A: Your system is described by the augmented matrix
$$
A=
\left[\begin{array}{rrrr|r}
0 & 1 & 1 & 0 & r_{1} \\
0 & 1 & 0 & 1 & c_{1} \\
1 & 1 & 0 & 0 & d_{1} \\
0 & 0 & 1 & 1 & d_{2} \\
1 & 0 & 1 & 0 & c_{2} \\
1 & 0 & 0 & 1 & r_{2}
\end{array}\right]
$$
Row-reducing the system gives
$$
\DeclareMathOperator{rref}{rref}\rref A=
\left[\begin{array}{rrrr|r}
1 & 0 & 0 & 0 & -\frac{1}{2} \, c_{1} + d_{1} + \frac{1}{2} \, d_{2} - \frac{1}{2} \, r_{1} \\
0 & 1 & 0 & 0 & \frac{1}{2} \, c_{1} - \frac{1}{2} \, d_{2} + \frac{1}{2} \, r_{1} \\
0 & 0 & 1 & 0 & -\frac{1}{2} \, c_{1} + \frac{1}{2} \, d_{2} + \frac{1}{2} \, r_{1} \\
0 & 0 & 0 & 1 & \frac{1}{2} \, c_{1} + \frac{1}{2} \, d_{2} - \frac{1}{2} \, r_{1} \\
0 & 0 & 0 & 0 & c_{1} + c_{2} - d_{1} - d_{2} \\
0 & 0 & 0 & 0 & -d_{1} - d_{2} + r_{1} + r_{2}
\end{array}\right]
$$
This implies that your system is solvable if and only if
\begin{align*}
c_1+c_2-d_1-d_2 &= 0 \\
-d_1-d_2+r_1+r_2 &= 0
\end{align*}
If these conditions are satisfied, then your system is solved by
\begin{align*}
w &=-\frac{1}{2} \, c_{1} + d_{1} + \frac{1}{2} \, d_{2} - \frac{1}{2} \, r_{1} \\
x &= \frac{1}{2} \, c_{1} - \frac{1}{2} \, d_{2} + \frac{1}{2} \, r_{1}\\
y &= -\frac{1}{2} \, c_{1} + \frac{1}{2} \, d_{2} + \frac{1}{2} \, r_{1}\\
z &=\frac{1}{2} \, c_{1} + \frac{1}{2} \, d_{2} - \frac{1}{2} \, r_{1}
\end{align*}
A: Hint:
Write the system of linear equations in matrix form: set
$$A=\begin{bmatrix}
1&1&0&0\\1&0&1&0\\1&0&0&1\\0&1&1&0\\0&1&0&1\\0&0&1&1
\end{bmatrix},\quad
X=\begin{bmatrix}x\\y\\z\\w\end{bmatrix},\quad B=\begin{bmatrix}r_1\\c_1\\d_1\\d_2\\c_2\\w_2\end{bmatrix}$$
$A$ is the matrix of a linear mapping from $\mathbf R^4$ to  $\mathbf R^6$ (supposing the base field is $\mathbf R$) and the linear system can be written as 
$$AX=B.$$
Now this system has solutions, by definition, if $B$ is in the image of the linear map.  A criterion for this is the following:

The linear system $\;AX=B$ has a solution if and only if the matrix $A$ and the augmented matrix $(A\mid B)$ have the same rank. Furthermore, the set of solutions, if any, is an affine space directed by the subvectorspace $\ker A$ and has codimension the rank of $A$.

Using row reduction, you should find $A$ has maximal rank ($4$), and if the augmented matrix also has  rank $4$,  there is a unique solution, which you'll find with full row reduction.
