# Does this linear system have a single solution

Given unknown $x_1>0$, $x_2>0$, $x_3>0$, $x_4>0$, and known $y_1>0$, $y_2>0$, $y_3>0$, $y_4>0$,

$$\begin{cases} x_1+x_2=y_1 \\ x_1+x_4=y_2 \\ x_3+x_2=y_3 \\ x_3+x_4=y_4 \end{cases}$$

1) does the system always have a single solution?

2) could it have a single solution with some additional conditions on $y_i$ and/or $x_i$? Which, if it is?

• @NP-hard i assumed that $y$'s are known and we need to find $x$'s. Is this could change something? – alex Jul 20 '16 at 7:48

I don't know how familiar you are with linear algebra. But assuming that the $y_i$ are fixed and you want to get the $x_i$ as solutions depending on the $y_i$, you can write your equation system as $$\begin{pmatrix} 1 & 1 & 0 & 0 \\ 1 & 0 & 0 & 1 \\ 0 & 1 & 1 & 0 \\ 0 & 0 & 1 & 1 \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \\ \end{pmatrix} = \begin{pmatrix} y_1 \\ y_2 \\ y_3 \\ y_4 \\ \end{pmatrix}$$ and reduce your question to the question if the matrix $A = \begin{pmatrix} 1 & 1 & 0 & 0 \\ 1 & 0 & 0 & 1 \\ 0 & 1 & 1 & 0 \\ 0 & 0 & 1 & 1 \end{pmatrix}$ is invertible. By calculating its determinant you get $\operatorname{det}(A) = 0$ what means $A$ is not invertible. So you get infinitely many solutions for your system. Therefore its irrelevant which further conditions you could assume for the $y_i$. What would actually help you getting a unique solution is adding more conditions on the $x_i$, i.e. consider more equations, so you get a system like
$$\begin{matrix} x_1+x_2=y_1 \\ x_1+x_4=y_2 \\ x_3+x_2=y_3 \\ x_3+x_4=y_4 \\ ax_1 + bx_2 + cx_3 + dx_4 = y_5.\end{matrix}$$
In this case it depends on the values of $a,b,c,d$ if such an expanded system has a unique solution.
Edit: Another possible way is the following: Since your matrix has rank $3$ the solution space is 1-dimensional. So you can demand that your solution has a specific norm and then demand that the first (or an arbitrary) entry has a specific sign to get a unique solution.