# How do you solve x+2y+3w+4z = 10, 2x+y+w-z = 1, 3x+y+4w+3z=22, and -2x+6y+4w+20z = 18 using matrices?

Apr 7, 2016

See explanation...

#### Explanation:

Write these equations as a $4 \times 5$ matrix, then perform a sequence of row operations until the left hand $4 \times 4$ matrix is the identity matrix. Then the right hand column will be the solution.

$\left(\begin{matrix}1 & 2 & 3 & 4 & 10 \\ 2 & 1 & 1 & - 1 & 1 \\ 3 & 1 & 4 & 3 & 22 \\ - 2 & 6 & 4 & 20 & 18\end{matrix}\right)$

Add row $2$ to row $4$ to get:

$\left(\begin{matrix}1 & 2 & 3 & 4 & 10 \\ 2 & 1 & 1 & - 1 & 1 \\ 3 & 1 & 4 & 3 & 22 \\ 0 & 7 & 5 & 19 & 19\end{matrix}\right)$

Subtract rows $1$ and $2$ from row $3$ to get:

$\left(\begin{matrix}1 & 2 & 3 & 4 & 10 \\ 2 & 1 & 1 & - 1 & 1 \\ 0 & - 2 & 0 & - 2 & 11 \\ 0 & 7 & 5 & 19 & 19\end{matrix}\right)$

Subtract twice row $1$ from row $2$ to get:

$\left(\begin{matrix}1 & 2 & 3 & 4 & 10 \\ 0 & - 3 & - 5 & - 9 & - 19 \\ 0 & - 2 & 0 & - 2 & 11 \\ 0 & 7 & 5 & 19 & 19\end{matrix}\right)$

Add row $2$ plus twice row $3$ to row $4$ to get:

$\left(\begin{matrix}1 & 2 & 3 & 4 & 10 \\ 0 & - 3 & - 5 & - 9 & - 19 \\ 0 & - 2 & 0 & - 2 & 11 \\ 0 & 0 & 0 & 6 & 22\end{matrix}\right)$

Multiply row $3$ by $3$ to get:

$\left(\begin{matrix}1 & 2 & 3 & 4 & 10 \\ 0 & - 3 & - 5 & - 9 & - 19 \\ 0 & - 6 & 0 & - 6 & 33 \\ 0 & 0 & 0 & 6 & 22\end{matrix}\right)$

Subtract twice row $2$ from row $3$ to get:

$\left(\begin{matrix}1 & 2 & 3 & 4 & 10 \\ 0 & - 3 & - 5 & - 9 & - 19 \\ 0 & 0 & 10 & 12 & 71 \\ 0 & 0 & 0 & 6 & 22\end{matrix}\right)$

Multiply row $2$ by $- \frac{1}{3}$ to get:

$\left(\begin{matrix}1 & 2 & 3 & 4 & 10 \\ 0 & 1 & \frac{5}{3} & 3 & \frac{19}{3} \\ 0 & 0 & 10 & 12 & 71 \\ 0 & 0 & 0 & 6 & 22\end{matrix}\right)$

Subtract twice row $2$ from row $1$ to get:

$\left(\begin{matrix}1 & 0 & - \frac{1}{3} & - 2 & - \frac{8}{3} \\ 0 & 1 & \frac{5}{3} & 3 & \frac{19}{3} \\ 0 & 0 & 10 & 12 & 71 \\ 0 & 0 & 0 & 6 & 22\end{matrix}\right)$

Divide row $3$ by $10$ to get:

$\left(\begin{matrix}1 & 0 & - \frac{1}{3} & - 2 & - \frac{8}{3} \\ 0 & 1 & \frac{5}{3} & 3 & \frac{19}{3} \\ 0 & 0 & 1 & \frac{6}{5} & \frac{71}{10} \\ 0 & 0 & 0 & 6 & 22\end{matrix}\right)$

Add $\frac{1}{3}$ row $3$ to row $1$ to get:

$\left(\begin{matrix}1 & 0 & 0 & - \frac{8}{5} & - \frac{3}{10} \\ 0 & 1 & \frac{5}{3} & 3 & \frac{19}{3} \\ 0 & 0 & 1 & \frac{6}{5} & \frac{71}{10} \\ 0 & 0 & 0 & 6 & 22\end{matrix}\right)$

Divide row $4$ by $6$ to get:

$\left(\begin{matrix}1 & 0 & 0 & - \frac{8}{5} & - \frac{3}{10} \\ 0 & 1 & \frac{5}{3} & 3 & \frac{19}{3} \\ 0 & 0 & 1 & \frac{6}{5} & \frac{71}{10} \\ 0 & 0 & 0 & 1 & \frac{11}{3}\end{matrix}\right)$

Add $\frac{8}{5}$ row $4$ to row $1$ to get:

$\left(\begin{matrix}1 & 0 & 0 & 0 & \frac{167}{30} \\ 0 & 1 & \frac{5}{3} & 3 & \frac{19}{3} \\ 0 & 0 & 1 & \frac{6}{5} & \frac{71}{10} \\ 0 & 0 & 0 & 1 & \frac{11}{3}\end{matrix}\right)$

Subtract $\frac{5}{3}$ row $3$ from row $2$ to get:

$\left(\begin{matrix}1 & 0 & 0 & 0 & \frac{167}{30} \\ 0 & 1 & 0 & 1 & - \frac{11}{2} \\ 0 & 0 & 1 & \frac{6}{5} & \frac{71}{10} \\ 0 & 0 & 0 & 1 & \frac{11}{3}\end{matrix}\right)$

Subtract row $4$ from row $2$ to get:

$\left(\begin{matrix}1 & 0 & 0 & 0 & \frac{167}{30} \\ 0 & 1 & 0 & 0 & - \frac{55}{6} \\ 0 & 0 & 1 & \frac{6}{5} & \frac{71}{10} \\ 0 & 0 & 0 & 1 & \frac{11}{3}\end{matrix}\right)$

Subtract $\frac{6}{5}$ row $4$ from row $3$ to get:

$\left(\begin{matrix}1 & 0 & 0 & 0 & \frac{167}{30} \\ 0 & 1 & 0 & 0 & - \frac{55}{6} \\ 0 & 0 & 1 & 0 & \frac{27}{10} \\ 0 & 0 & 0 & 1 & \frac{11}{3}\end{matrix}\right)$

Provided I have made no arithmetic errors:

$\left\{\begin{matrix}x = \frac{167}{30} \\ y = - \frac{55}{6} \\ w = \frac{27}{10} \\ z = \frac{11}{3}\end{matrix}\right.$