Results 1 to 11 of 11

Math Help - Matrices to Solve System of 3 Linear Equations

  1. #1
    Junior Member ReneG's Avatar
    Joined
    Mar 2013
    From
    United States
    Posts
    66
    Thanks
    9

    Matrices to Solve System of 3 Linear Equations

    I need to solve  \begin{array}{ccc} x + y + z = 50 \\ x + 3y + 5z = 100 \\ x + 3y + 10z = 20 \end{array} using matrices.

    I set up the matrix equation \left[ \begin{array}{ccc} 1 & 1 & 1 \\ 1 & 3 & 5 \\ 1 & 3 & 10 \end{array} \right] \left[\begin{array}{ccc} x \\ y \\ z \end{array}\right] = \left[ \begin{array}{ccc} 50 \\ 100 \\ 20 \end{array}\right]

    I found the inverse of the first matrix to be \frac{1}{10} \left[\begin{array}{ccc} 15 & -7 & 2 \\ -5 & 9 & -4 \\ 0 & -2 & 2\end{array}\right] (verified with my calculator)

    But when multiplying \frac{1}{10} \left[\begin{array}{ccc} 15 & -7 & 2 \\ -5 & 9 & -4 \\ 0 & -2 & 2\end{array}\right]\left[ \begin{array}{ccc} 50 \\ 100 \\ 20 \end{array}\right]

    I get \left[\begin{array}{ccc}9 \\ 57 \\-16\end{array}\right] (again verified by my calculator)

    But the solution is \left[\begin{array}{ccc} x \\ y \\ z \end{array}\right] = \left[\begin{array}{ccc}29 \\ 17 \\ 4\end{array}\right]

    Pardon me if I'm doing this completely wrong. I'm doing this work based off a couple instructional internet videos. I've never taken a linear algebra course.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor

    Joined
    Aug 2006
    Posts
    18,801
    Thanks
    1691
    Awards
    1

    Re: Matrices to Solve System of 3 Linear Equations

    Quote Originally Posted by ReneG View Post
    I need to solve  \begin{array}{ccc} x + y + z = 50 \\ x + 3y + 5z = 100 \\ x + 3y + 10z = 20 \end{array} using matrices.

    I set up the matrix equation \left[ \begin{array}{ccc} 1 & 1 & 1 \\ 1 & 3 & 5 \\ 1 & 3 & 10 \end{array} \right] \left[\begin{array}{ccc} x \\ y \\ z \end{array}\right] = \left[ \begin{array}{ccc} 50 \\ 100 \\ 20 \end{array}\right]

    I found the inverse of the first matrix to be \frac{1}{10} \left[\begin{array}{ccc} 15 & -7 & 2 \\ -5 & 9 & -4 \\ 0 & -2 & 2\end{array}\right] (verified with my calculator)

    But when multiplying \frac{1}{10} \left[\begin{array}{ccc} 15 & -7 & 2 \\ -5 & 9 & -4 \\ 0 & -2 & 2\end{array}\right]\left[ \begin{array}{ccc} 50 \\ 100 \\ 20 \end{array}\right]

    I get \left[\begin{array}{ccc}9 \\ 57 \\-16\end{array}\right] (again verified by my calculator)

    But the solution is \left[\begin{array}{ccc} x \\ y \\ z \end{array}\right] = \left[\begin{array}{ccc}29 \\ 17 \\ 4\end{array}\right]

    Pardon me if I'm doing this completely wrong. I'm doing this work based off a couple instructional internet videos. I've never taken a linear algebra course.
    Look at this.

    It seems that you are correct.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    MHF Contributor

    Joined
    Apr 2005
    Posts
    16,003
    Thanks
    1656

    Re: Matrices to Solve System of 3 Linear Equations

    If x= 29, y= 17, x= 4 (which you say "the solution is") then the third equation becomes x+ 3y+ 10z= 29+ 3(17)+ 10(4)= 29+ 51+ 40= 120, NOT "20". I suspect that last "20" was supposed to be 120.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Junior Member ReneG's Avatar
    Joined
    Mar 2013
    From
    United States
    Posts
    66
    Thanks
    9

    Re: Matrices to Solve System of 3 Linear Equations

    Quote Originally Posted by HallsofIvy View Post
    I suspect that last "20" was supposed to be 120.
    Whoops, you're right. Replacing 120 with 20 gave me the correct answer.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Member
    Joined
    Sep 2012
    From
    United States
    Posts
    97
    Thanks
    21

    Re: Matrices to Solve System of 3 Linear Equations

    I would use cramer's rule rather than inverse for a 3x3, it is a bit faster. Given the current three equations, the values of x, y, and z are 9, 57, and -16 respectively, which is exactly what you got.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Junior Member ReneG's Avatar
    Joined
    Mar 2013
    From
    United States
    Posts
    66
    Thanks
    9

    Re: Matrices to Solve System of 3 Linear Equations

    Quote Originally Posted by ShadowKnight8702 View Post
    I would use cramer's rule rather than inverse for a 3x3, it is a bit faster. Given the current three equations, the values of x, y, and z are 9, 57, and -16 respectively, which is exactly what you got.
    Never heard of cramer's rule, thanks for the pointer.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    MHF Contributor

    Joined
    Apr 2005
    Posts
    16,003
    Thanks
    1656

    Re: Matrices to Solve System of 3 Linear Equations

    I, on the other hand, would write the "augmented matrix", \begin{bmatrix}1 & 1 & 1 &  50\\ 1 & 3 & 5 & 100 \\ 1 & 3 & 1 & 120 \end{bmatrix} and row-reduce to
    1 & 0 & 0 & 45 \\ 0 & 1 & 0 & 17 \\ 0 & 0 & 1 & 4

    ("Cramer's rule" says that the solutions to "Ax= b" are x= \frac{|A_1|}{|A|}, y= \frac{|A_2|}{|A|}, and z= \frac{|A_3|}{|A|} where " A_1" is the matrix A with the first column replace by b, " A_2" is the matrix A with the second column replaced by b, and " A_3" is the matrix A with the third column replaced by b.)
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Junior Member ReneG's Avatar
    Joined
    Mar 2013
    From
    United States
    Posts
    66
    Thanks
    9

    Re: Matrices to Solve System of 3 Linear Equations

    What do you do after you row-reduce?
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Super Member
    Joined
    Jun 2009
    Posts
    660
    Thanks
    133

    Re: Matrices to Solve System of 3 Linear Equations

    The quickest method for solving a system of equations like this, (meaning the method that requires the fewest arithmetic operations), is simple (Gaussian) elimination.

    For this example, subtract the first equation from the second and third to get

    2y+4z=50,
    2y+9z=-20.

    Then subtract the first of these from the second to get

    5z=-80.

    That gets you z=-16 after which back substitution gets you y \text{ and } x.

    The other two methods, matrix inversion and Cramer's rule, require far more arithmetic.
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Newbie leibnitz's Avatar
    Joined
    Feb 2013
    From
    Onitsha
    Posts
    12
    Thanks
    2

    Re: Matrices to Solve System of 3 Linear Equations

    please ReneG,how,where did u get all his that u use to express ur self. I mean something like (A)base one,big [ ],dy/dx,B2 etc.am using Samsung GT1500.PLS TELL ME HOW,I WANT ALSO EXPRESS MY THOUGHT CLEARLY.
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Junior Member ReneG's Avatar
    Joined
    Mar 2013
    From
    United States
    Posts
    66
    Thanks
    9

    Re: Matrices to Solve System of 3 Linear Equations

    Quote Originally Posted by leibnitz View Post
    please ReneG,how,where did u get all his that u use to express ur self. I mean something like (A)base one,big [ ],dy/dx,B2 etc.am using Samsung GT1500.PLS TELL ME HOW,I WANT ALSO EXPRESS MY THOUGHT CLEARLY.
    When posting, in between [tex][/tex] tags, use the TeX markup language.

    This website makes it easier.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 0
    Last Post: June 22nd 2013, 03:06 PM
  2. System of linear equations using matrices
    Posted in the Advanced Algebra Forum
    Replies: 4
    Last Post: May 8th 2012, 10:52 AM
  3. Rank of matrices and system of linear equations
    Posted in the Advanced Algebra Forum
    Replies: 1
    Last Post: November 24th 2010, 09:06 AM
  4. Solving a system of linear equations using matrices.
    Posted in the Advanced Algebra Forum
    Replies: 2
    Last Post: May 12th 2010, 05:09 AM
  5. Replies: 1
    Last Post: November 30th 2009, 11:13 PM

Search Tags


/mathhelpforum @mathhelpforum