# How do you solve using gaussian elimination or gauss-jordan elimination, ‎2x+y-z+2w=-6, 3x+4y+w=1, x+5y+2z+6w=-3, 5x+2y-z-w=3?

Jan 6, 2018

$P = \text{[(-7, 0, -4, 2)]}$

#### Explanation:

$\left(\begin{matrix}2 & 1 & - 1 & 2 & | & - 6 \\ 3 & 4 & 0 & 1 & | & 1 \\ 1 & 5 & 2 & 6 & | & - 3 \\ 5 & 2 & - 1 & - 1 & | & 3\end{matrix}\right) \approx \left(\begin{matrix}1 & 5 & 2 & 6 & | & - 3 \\ 3 & 4 & 0 & 1 & | & 1 \\ 2 & 1 & - 1 & 2 & | & - 6 \\ 5 & 2 & - 1 & - 1 & | & 3\end{matrix}\right)$
${R}_{1} \Leftrightarrow {R}_{3}$

${R}_{2} = {R}_{2} - 3 \times {R}_{1}$
${R}_{3} = {R}_{3} - 2 \times {R}_{1}$
${R}_{4} = {R}_{4} - 5 \times {R}_{1}$

$\left(\begin{matrix}1 & 5 & 2 & 6 & | & - 3 \\ 0 & - 11 & - 6 & - 17 & | & 10 \\ 0 & - 9 & - 5 & - 10 & | & 0 \\ 0 & - 23 & - 11 & - 31 & | & 18\end{matrix}\right)$
${R}_{2} = {R}_{2} \times - 9$
${R}_{3} = {R}_{3} \times 11$

$\left(\begin{matrix}1 & 5 & 2 & 6 & | & - 3 \\ 0 & 99 & 54 & 153 & | & - 90 \\ 0 & - 99 & - 55 & - 110 & | & 0 \\ 0 & - 23 & - 11 & - 31 & | & 18\end{matrix}\right)$
${R}_{2} = {R}_{2} + {R}_{3}$
then ${R}_{2} \Leftrightarrow {R}_{3}$

$\left(\begin{matrix}1 & 5 & 2 & 6 & | & - 3 \\ 0 & - 99 & - 55 & - 110 & | & 0 \\ 0 & 0 & - 1 & 43 & | & - 90 \\ 0 & - 23 & - 11 & - 31 & | & 18\end{matrix}\right)$
${R}_{2} = {R}_{2} \times \frac{23}{11}$
${R}_{4} = {R}_{4} \times 9$

$\left(\begin{matrix}1 & 5 & 2 & 6 & | & - 3 \\ 0 & - 207 & - 115 & - 230 & | & 0 \\ 0 & 0 & - 1 & 43 & | & - 90 \\ 0 & - 207 & - 99 & - 279 & | & 162\end{matrix}\right)$
${R}_{4} = {R}_{4} - {R}_{2}$

$\left(\begin{matrix}1 & 5 & 2 & 6 & | & - 3 \\ 0 & - 207 & - 115 & - 230 & | & 0 \\ 0 & 0 & - 1 & 43 & | & - 90 \\ 0 & 0 & 16 & - 49 & | & 162\end{matrix}\right)$
${R}_{2} = {R}_{2} \times \frac{1}{23}$
${R}_{3} = {R}_{3} \times 16$

$\left(\begin{matrix}1 & 5 & 2 & 6 & | & - 3 \\ 0 & - 9 & - 5 & - 10 & | & 0 \\ 0 & 0 & - 16 & 688 & | & - 1440 \\ 0 & 0 & 16 & - 49 & | & 162\end{matrix}\right)$
${R}_{4} = {R}_{4} + {R}_{3}$

$\left(\begin{matrix}1 & 5 & 2 & 6 & | & - 3 \\ 0 & - 9 & - 5 & - 10 & | & 0 \\ 0 & 0 & - 16 & 688 & | & - 1440 \\ 0 & 0 & 0 & - 639 & | & - 1278\end{matrix}\right)$
${R}_{4} = {R}_{4} \times - \frac{1}{639}$
${R}_{3} = {R}_{3} \times - \frac{1}{16}$

$\left(\begin{matrix}1 & 5 & 2 & 6 & | & - 3 \\ 0 & - 9 & - 5 & - 10 & | & 0 \\ 0 & 0 & 1 & - 43 & | & - 90 \\ 0 & 0 & 0 & 1 & | & 2\end{matrix}\right)$
${R}_{3} = {R}_{3} + 43 \times {R}_{4}$
${R}_{2} = {R}_{2} + 10 \times {R}_{4}$
${R}_{1} = {R}_{1} - 6 \times {R}_{4}$

$\left(\begin{matrix}1 & 5 & 2 & 0 & | & - 15 \\ 0 & - 9 & - 5 & 0 & | & 20 \\ 0 & 0 & 1 & 0 & | & - 4 \\ 0 & 0 & 0 & 1 & | & 2\end{matrix}\right)$
${R}_{2} = {R}_{2} + 5 \times {R}_{3}$
${R}_{1} = {R}_{1} - 2 \times {R}_{3}$

$\left(\begin{matrix}1 & 5 & 0 & 0 & | & - 7 \\ 0 & - 9 & 0 & 0 & | & 0 \\ 0 & 0 & 1 & 0 & | & - 4 \\ 0 & 0 & 0 & 1 & | & 2\end{matrix}\right)$
${R}_{2} = {R}_{2} \times - \frac{1}{9}$
${R}_{1} = {R}_{1} - 5 \times {R}_{2}$

$\left(\begin{matrix}1 & 0 & 0 & 0 & | & - 7 \\ 0 & 1 & 0 & 0 & | & 0 \\ 0 & 0 & 1 & 0 & | & - 4 \\ 0 & 0 & 0 & 1 & | & 2\end{matrix}\right)$

$P = \text{[(-7, 0, -4, 2)]}$