# Simultaneously solving of equations

I am trying to refresh some math skills and I am struggling over the following problem. I tried to solve it with the help of a number of sources (i.e. http://www.idomaths.com/simeq.php), but I haven't succeeded yet.

I would like to solve the equations below simultaneously by either elimination or substitution but I cannot get my head around it. Is there anybody who is able to help me?

$w = 0.080w + 0.632x + 0.264y + 0.080z$

$x = 0.184w + 0.368x + 0.368y + 0.184z$

$y = 0.368w + 0.368y + 0.368z$

$z = 0.368w + 0.368z$

$1 = w + x + y + z$

$w = 0.286$

$x = 0.285$

$y = 0.263$

$z = 0.166$

This is an example taken from the book "Introduction to Operations Research" by Hillier and Lieberman on page $739$ ($9^{th}$ edition).

-
Did you try the matrix method or Cramer's rule? –  Maazul May 7 '13 at 17:43
Matrix method would be helpful , many elements will go zero. –  ABC May 7 '13 at 17:44
@Jochem Such ugly numbers. An exercise like this shouldn't have these scalars, in my opinion. –  Git Gud May 7 '13 at 17:51
@GitGud The reason why the numbers are ugly is due to the fact that it comes from a markov matrix and the equation needs to be solved to obtain the stead-state probabilities of the transition matrix. As it all needs to add up to 1, things get ugly. –  Jochem May 7 '13 at 18:44
Just move all those w,x,y,z in first 4 equations from left to the right and you should be able to see how this can be solved via elimination or any other way. –  Ruslan May 7 '13 at 18:53

Using, $1 = w+x+y+z$, and solving for each variable and then substituting back into the original system, we can rewrite the system as follows (there are other approaches too).

We have: $w = 1 - x -y - z$

Substitute this into the first equation, we have:

$1 - x - y - z = 0.080w + 0.632x + 0.264y + 0.080z \rightarrow 0.08 w + 1.632x + 1.264y +1.08 z = 1$

Repeating the process, but for the second equation, we have: $x = 1 -w -y - z$

Substituting this into the second equation, we have:

$1 - w - y - z = 0.184w + 0.368x + 0.368y + 0.184z \rightarrow 1.184 w + 0.368x + 1.368y +1.184 z = 1$

Repeat for the next two equations, write that in matrix form, and then do the row reduced reduced echelon form as shown below.

$$\begin{bmatrix}0.08 & 1.632 & 1.264 & 1.08 & 1\\1.184 & 0.368 & 1.368 & 1.184 & 1\\1.368 & 1 & 0.368 & 1.368 & 1\\1.368 & 1 & 1 & 0.368 & 1\end{bmatrix}$$

Using Row-Reduced-Echelon-Form yields:

$$\begin{bmatrix}1 & 0 & 0 & 0 & 0.285654\\ 0 & 1 & 0 & 0 & 0.284835\\ 0 & 0 & 1 & 0 & 0.263181\\ 0 & 0 & 0 & 1 & 0.16633\end{bmatrix}$$

Of course, this yields the result you provided.

Is that clear?

-
Nice work...all those floating points...nicely, some of them were "nice"! –  amWhy May 8 '13 at 0:34
@amWhy: Normally, I would have multiplied all equations by the needed factor to get rid of all those decimals, do all calculations using closed form with integers and then scaled them back to avoid the potential for numerical inaccuracies. Thanks –  Amzoti May 8 '13 at 0:39
@Amzoti This looks promising. I struggle a bit to understand your first step. What procedures did you go through to solve reach variable by using 1 = w + x + y + z? Did you do the following: w = 0.080w + 0.632x + 0.264y + 0.080z, which leads to 0 = 0.080w - w + 0.632x + 0.264y + 0.080z. Then add 1 = w + x + y + z to 0 = -0.920w + 0.632x + 0.264y + 0.080z and this leads to 1 = 0.08w + 1.632x + 1.264y + 1.080z. Is that the procedure you did for every line? –  Jochem May 8 '13 at 6:07
@Jochem: I added the procedure for the first two equation in my post. Let me know if that makes sense. I essentially took the equation $1 = w+x+y+z$, solved for each variable to replace it into the four other equations and I show a couple of examples in my answer. Let me know if it is clear. Regards –  Amzoti May 8 '13 at 12:45

The first step is to re-arrange the five equations into standard form:

$0 = -0.920w + 0.632x + 0.264y + 0.080z$

$0 = 0.184w - 0.632x + 0.368y + 0.184z$

$0 = 0.368w + 0.0 x - 0.632y + 0.368z$

$0 = 0.368w + 0.0 x + 0.0y - 0.632z$

$1 = 1.0w + 1.0x + 1.0y +1.0 z$

To solve this set of equations, first recognize that system appears to be over-determined: there are five linear equations in four unknowns. However, the first four equations are not linearly independent. The $4\times4$ determinant of the coefficients is zero.

Therefore, to solve these equations, simply ignore any one of the first four equations, include the fifth (as the new fourth) and solve the set of four linearly independent linear equations in four unknowns by any convenient method.

-