# Math Help - Matrices to Solve System of 3 Linear Equations

1. ## 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.

2. ## Re: Matrices to Solve System of 3 Linear Equations

Originally Posted by ReneG
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.

3. ## 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.

4. ## Re: Matrices to Solve System of 3 Linear Equations

Originally Posted by HallsofIvy
I suspect that last "20" was supposed to be 120.
Whoops, you're right. Replacing 120 with 20 gave me the correct answer.

5. ## 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.

6. ## 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.
Never heard of cramer's rule, thanks for the pointer.

7. ## 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.)

8. ## Re: Matrices to Solve System of 3 Linear Equations

What do you do after you row-reduce?

9. ## 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.

10. ## 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.

11. ## Re: Matrices to Solve System of 3 Linear Equations

Originally Posted by leibnitz
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  tags, use the TeX markup language.

This website makes it easier.