1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Simultaneous eqs methodology (4 vars)

  1. Oct 5, 2009 #1


    User Avatar

    I am looking for someone to explain the methodology behind solving simultaneous equations, specifically of four variables. I have read through the numerous other threads about this, and I get most of it, but it always appears that there is some rule or step that I am missing and I am unable to come up with a good answer for my own problem. (This is also my first try at using LaTex. I tried to make it nicely formatted but didn't succeed everywhere. It didn't want to give me new lines inside the Tex tags using the double \. :( )

    1. The problem statement, all variables and given/known data
    It really starts out as a request to solve a matrices equation:

    Determine w, x, y, z so that this equation holds:
    \left (\begin{array}{cccc} 2&1&-1&7 \\6&8&0&3 \end{array} \right)
    \left (\begin{array}{cc} x & 2x\\ y & -y+z \\ x+w & w-2y+x \\ z & z \end{array} \right)
    - \left (\begin{array}{cc} 45 & 46\\ 3 & 87 \end{array} \right)

    2. Relevant equations
    Getting the equations out isn't too difficult. For my own benefit, here is all my work:

    A size is 2x4, B size is 4x2; they can by multiplied; resultant array is 2x2 (n=4 for summation)

    eq1: [tex] c_{11} = \sum^{n=4}_{j=1} a_{1j}\cdot b_{j1} = 2x + y - x - w + 7z = \underline{x + y - w + 7z} [/tex]
    eq2: [tex] c_{12} = \sum^{n=4}_{j=1} a_{1j}\cdot b_{j2} = 2\cdot2x + 1(-y + z) + -1 (w-2y+x) + 7z = \underline{3x + y - w + 8z} [/tex]
    eq3: [tex] c_{21} = \sum^{n=4}_{j=1} a_{2j}\cdot b_{j1} = \underline{6x + 8y + 0 + 3z} [/tex]
    eq4: [tex] c_{22} = \sum^{n=4}_{j=1} a_{2j}\cdot b_{j2} = 12x -8y + 8z + 0 +3z = \underline{12x - 8y + 11z} [/tex]

    And each of the equations above equals the corresponding element from the result matrix.

    3. The attempt at a solution

    Now, I have run through these sets 4 or 5 times using different methods (elimination or substitution) but always get answers that don't check. Here was one of my more promising runs:

    Add Eq1 and Eq2 (elimination):
    Eq1: [tex] x + y - w + 7z = -45 \\ [/tex]
    Eq2: [tex] \underline{(-1) (3x + y - w + 8z) = -46 (-1)} \ \ \ \mbox {(multiply by -1 so can add and eliminate)}
    } [/tex]
    Eq A: [tex] \ \ \ \ -2x + 0 + 0 - z = 1 \ \ \ \ => \ \ \ \underline{z = -1 - 2x}

    Now, substitute Eq A into Eq 3:

    Eq B: [tex] 6x + 8y + 3(-1 - 2x) = -3 \ \ \ \ => \ \ \ 8y - 3 = -3 \ \ \ \ => \ \ \ 8y = 0 \ \ \ \ => \ \ \underline{y = 0} [/tex]

    Now here is where I think things start going wrong. Can I take Eq A and Eq B and throw them back into Eq 4?

    Eq C: [tex] 12x - 8\cdot0 + 11 (-1 - 2x) = -87 \ \ \ => \ \ 12x - 11 - 22x = -87 => -10x = -76 \ \ \ \ => \ \ \ \underline { x = 7.6 } [/tex]

    OK, not looking too bad there, but I now have two values, and a couple of equations where I can plug values into to find the third: Eq 3, Eq 4, and Eq A. Do I have to throw those values back into original equations and not derived equations (e.g. 3 or 4, but not A)? Can I just put that back into A to find z, then use x, y, and z in any of the other ones to find w?

    Eq 3 (with value replacements):
    [tex] 6(7.6) + 8(0) + 3z = -3 \ \ \ \ => \ \ \ \ 45.6 + 3z = -3 \ \ \ \ => \ \ \ z = \frac{-3 - 45.6}{3} = \underline{16.2} [/tex]

    And lastly, Eq 1 with value replacements:
    [tex] 7.6 + 0 - w + 7(16.2) = -45 \ \ \ \ => \ \ \ \underline {w = 76} [/tex]

    Hmmmm...this is my cleanest answer yet, and the values for z and w in the last two equations are different than what I have gotten before...

    Checking answers:

    Eq2 : [tex] 3(7.6) + 0 - 76 + 8(16.2) = -46 \\
    22.8 -76 + 129.6 = -46 \ \ \ \ \ \ ? [/tex]

    Uh, nope. See! I need to know the background rules so that I can do this correctly and repeatedly instead of haphazardly! And I probably made a number of minor algebraic or arithmetic errors in there, too. :)

    Thanks for any pointers!

    -- jc
    Last edited by a moderator: Oct 5, 2009
  2. jcsd
  3. Oct 5, 2009 #2


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    I haven't checked your work. But I have a question about your original matrix multiplication. Your two matrices aren't conformable. You can't multiply a 4x2 matrix by a 4x2 matrix. You could multiply (2x4) times (4x2) to get a 2x2. So it may be that you haven't transcribed your problem correctly into matrix form in the first place.
  4. Oct 5, 2009 #3


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I am with LC, You need to transpose one of those matrices to do the multiplication. I am not seeing how your rows and columns match up to get your equations. It that the starting point you are given or is there more behind those matrices?

    Glad to see you here!

    OK, I have looked at your latex code, and found the problem. I changed the {cc} to {cccc} now it looks the way it should.

    A good way to systematize solving things like this is to create what is called the augmented matrix from your 4 equations. Write each of your equations with the variables in the same order. Now take only the coefficients for each variable and create a 4x4 matrix with them, preserving the order imposed by the variables. Create the augmented column by adding a 5th column consisting of the constant (the elements of your 2x2 matrix) lined up with the appropriate equation.

    you can now do matrix operations to obtain a 4x4 identity matrix the final column will be the value of the variable.

    Check your Private messages (upper right side of the screen)
    Last edited: Oct 5, 2009
  5. Oct 9, 2009 #4


    User Avatar

    Thanks all for the suggestions. And thanks for correcting my Tex. I think I mentioned that it was my first time through it. :)

    Sorry for not getting back to this until now. Things have been hectic with school. However, the methodology you suggest is beyond me! I did stop in at the math lab to get some help. He was telling me that there weren't necessarily any hard and fast rules about where to plug things in; any of the derived equations should be valid in any of the other equations. We worked through it and came up with the right answers; it seems I had a few things right, already. I was able to work through it again later and get the same answers (well, I did use the same pattern as he had showed me, too).

    I essentially added eq1 and eq2 to get eqA. Then I added eq3 and eq4 to get eqB. EqA and eqB then only had two terms. Then I added eqA and eqB to get the value for one variable. Then I used that value back into eqA or eqB to get the second value. Then taking those two values and putting them back into eq3 or eq4 (the ones with only 3 variables) to get the third value, then taking all three back into eq1 or eq2 to get the fourth value.

    It seemed so obvious when he was doing it! :)

    -- jc
  6. Oct 9, 2009 #5


    User Avatar
    Science Advisor

    I would suggest that, instead, you add the third and fourth equations. That will eliminate y leaving you with two equations in x and z, 2z+ z= -1 and 18x+ 14z= -90. Dividing that last equation by 2, 9x+ 7y= -45. Now put z= -1-2x in that equation to get 9x+7(-1-2x)= -5x- 7= 45.

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook