I've was asked to solve this (as homework):
$2x + y + z = 3$ $4x + 2z = 10$ $2x + 2y = -2$
I need to solve it with matrices and I have NO IDEA how to do so.
I need your help. thanks.
I've was asked to solve this (as homework):
$2x + y + z = 3$ $4x + 2z = 10$ $2x + 2y = -2$
I need to solve it with matrices and I have NO IDEA how to do so.
I need your help. thanks.
$\left( \begin{array}{ccc} 2 & 1 & 1 \\ 4 & 0 & 2 \\ 2 & 2 & 0 \end{array} \right) \left( \begin{array}{c} x \\ y \\ z \end{array} \right) = \left( \begin{array}{c} 3 \\ 10 \\ -2 \end{array} \right)$
Form the augmented matrix and then use the following row operations $R_2= 1/2R_2-R_1$ $R_3= R_3-R_1$, which gives the matrix as $\left( \begin{array}{ccc} 2 & 1 & 1 & 3 \\ 0 & -1 & 0 & 2 \\ 0 & 1 & -1 & -5 \end{array} \right)$
Then use the row operation $R_3 = R_3+R_2$ which gives the new matrix as $\left( \begin{array}{ccc} 2 & 1 & 1 & 3 \\ 0 & -1 & 0 & 2 \\ 0 & 0 & -1 & -3 \end{array} \right)$
Now use back substitution to get the results
Your system of equations is equivalent to: $ \left( \begin{array}{ccc} 2 & 1 & 1 \\ 4 & 0 & 2 \\ 2 & 2 & 0 \end{array} \right) \left( \begin{array}{c} x \\ y \\ z \end{array} \right) = \left( \begin{array}{c} 3 \\ 10 \\ -2 \end{array} \right). $ You want to add/subtract multiples of the three rows (see Gaussian elimination) until you get to $ \left( \begin{array}{ccc} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{array} \right) \left( \begin{array}{c} x \\ y \\ z \end{array} \right) = \left( \begin{array}{c} x \\ y \\ z \end{array} \right) = \left( \begin{array}{c} a \\ b \\ c \end{array} \right). $
You have:
$A=\pmatrix{2&1&1\\4&0&2\\2&2&0}, b = \pmatrix{3\\10\\-2}$
Do you know how to use the method of Gaussian elimination? If not, there are plenty of YouTube videos that demonstrate it. If you row reduce you get:
$\pmatrix{1\\-2\\3}$
as your solutions.
$2x + y + z = 3 \tag{1}$ $4x + 2z = 10 \tag{2}$ $2x + 2y = -2 \tag{3}$
A clever way to attack this problem is to note that we can divide through by $2$ for equation (2) to get $2x + z = 5$. Note that $2x+z$ is a part of equation (1), so we can rewrite (1) as:
$5 + y = 3 \implies y = -2$
Plug $y = -2$ into equation (3) to get: $2x + 2(-2) = -2 \implies 2x = 2 \implies x = 1$
Plug our known values for $x$ and $y$ into either equation (1) or (2) to find the value for $z$. I'll use equation (2).
$4(1) + 2z = 10 \implies 2z = 6 \implies z = 3$