Matrices to Solve System of 3 Linear Equations

I need to solve $\displaystyle \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 $\displaystyle \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 $\displaystyle \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 $\displaystyle \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 $\displaystyle \left[\begin{array}{ccc}9 \\ 57 \\-16\end{array}\right]$ (again verified by my calculator)

But the solution is $\displaystyle \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.

Re: Matrices to Solve System of 3 Linear Equations

Quote:

Originally Posted by

**ReneG** I need to solve $\displaystyle \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 $\displaystyle \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 $\displaystyle \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 $\displaystyle \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 $\displaystyle \left[\begin{array}{ccc}9 \\ 57 \\-16\end{array}\right]$ (again verified by my calculator)

But the solution is $\displaystyle \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.

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.

Re: Matrices to Solve System of 3 Linear Equations

Quote:

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.

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.

Re: Matrices to Solve System of 3 Linear Equations

Quote:

Originally Posted by

**ShadowKnight8702** 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.

Re: Matrices to Solve System of 3 Linear Equations

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

$\displaystyle 1 & 0 & 0 & 45 \\ 0 & 1 & 0 & 17 \\ 0 & 0 & 1 & 4$

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

Re: Matrices to Solve System of 3 Linear Equations

What do you do after you row-reduce?

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

$\displaystyle 2y+4z=50,$

$\displaystyle 2y+9z=-20.$

Then subtract the first of these from the second to get

$\displaystyle 5z=-80.$

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

The other two methods, matrix inversion and Cramer's rule, require far more arithmetic.

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.

Re: Matrices to Solve System of 3 Linear Equations

Quote:

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 [tex][/tex] tags, use the TeX markup language.

This website makes it easier.