How to solve system of 4 equations with four unknowns? I have got system of 4 equations as shown below and I am considering if there is any other method than brute force to solve them.

B + C + D = S1
A + C + D = S2
A + B + D = S3
A + B + C = S4


Values of S1-S4 are given:

S1 = 70
S2 = 75
S3 = 80
S4 = 75


I tried to to solve that, but always I have infinite equation what means to solve A I need B, to solve B I need C, to solve C I need D and to solve D I need.. A. I know the answer, but need the solution how to solve it. Answer:

A = 30
B = 25
C = 20
D = 25
Use Gaussian elimination/method:

Your equation becomes:

$$\left[\begin{array}{cccc|c}
      1 &amp; 1 &amp; 1 &amp; 0 &amp; 75         \\[0.55ex]
      1 &amp; 1 &amp; 0 &amp; 1 &amp; 80        \\[0.55ex]
      1 &amp; 0 &amp; 1 &amp; 1 &amp; 75\\[0.55ex]
      0 &amp; 1 &amp; 1 &amp; 1 &amp; 70
\end{array}\right]$$

You can multiply rows and add/subtract them from another row, which will not affect the solution. So you can subtract the first row from the second and the thirdrow and the matrix will become:

$$\left[\begin{array}{cccc|c}
      1 &amp; 1 &amp; 1 &amp; 0 &amp; 75         \\[0.55ex]
      0 &amp; 0 &amp; -1 &amp; 1 &amp; 5        \\[0.55ex]
      0 &amp; -1 &amp; 0 &amp; 1 &amp; 0\\[0.55ex]
      0 &amp; 1 &amp; 1 &amp; 1 &amp; 70
\end{array}\right]$$

Now add the third row to the fourth:

$$\left[\begin{array}{cccc|c}
      1 &amp; 1 &amp; 1 &amp; 0 &amp; 75         \\[0.55ex]
      0 &amp; 0 &amp; -1 &amp; 1 &amp; 5        \\[0.55ex]
      0 &amp; -1 &amp; 0 &amp; 1 &amp; 0\\[0.55ex]
      0 &amp; 0 &amp; 1 &amp; 2 &amp; 70
\end{array}\right]$$

And at last add the second row to the fourth row:

$$\left[\begin{array}{cccc|c}
      1 &amp; 1 &amp; 1 &amp; 0 &amp; 75         \\[0.55ex]
      0 &amp; 0 &amp; -1 &amp; 1 &amp; 5        \\[0.55ex]
      0 &amp; -1 &amp; 0 &amp; 1 &amp; 0\\[0.55ex]
      0 &amp; 0 &amp; 0 &amp; 3 &amp; 75
\end{array}\right]$$

Now from the last row we get that $3D = 75 \implies D=25$

From the third row we get that $D-B = 0 \implies D=B \implies B=25$

From the second row we get that $D-C = 5 \implies C=25-5 \implies C=20$

And from the first row we get that: $A+B+C = 75 \implies A=30$
B=D
So use the first equation b+c+d=b+c+b=70
and the second a+c+d=75
and the third a+b+d=80
so b-c=5
(b+c+b+5) divided by 3 equals b and d
(70+5) divided by 3 equals 25(b and d)
25-5=20(c)
(a+c+b)-(b+c+b)=5(a-b)
25+5=30(a)
a=30
b=25
c=20
d=25