We’ve already seen matrices and have gone over how to solve linear systems, so most of this section will be extra practice. The only catch it that we’ll do it all with matrices.
Last section we went over operations on linear systems, and these carry over to matrices as well, with one addition: row switching. This does exactly what you think it does.
\[\left[\begin{array}{cc|c} a & b & c \\ d & e & f \end{array}\right] \Rightarrow \left[\begin{array}{cc|c} d & e & f \\ a & b & c \end{array}\right]\]And it’s worth repeating the other two operations: multiplying or dividing (or scaling), and adding/subtracting rows
Given a system like this
\[\left[ \begin{array}{ccc|c} 1 & 1 & 2 & 13 \\ 0 & 2 & 1 & 5 \\ 2 & -1 & 0 & 6 \end{array} \right]\]the ultimate goal is
\[\left[ \begin{array}{ccc|c} 1 & 0 & 0 & 3 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 5 \end{array} \right]\]as this represents the solution to the system. This matrix form is called reduced row echelon form. Of course, getting to that point is the trick.
There is a general strategy to get that done.
That’s part 1. Let’s go through the example to see what that looks like before moving on to part 2.
\[\begin{align*} & \left[ \begin{array}{ccc|c} 1 & 1 & 2 & 13 \\ 0 & 2 & 1 & 5 \\ 2 & -1 & 0 & 6 \end{array} \right] \\ & \left[ \begin{array}{ccc|c} 2 & 2 & 4 & 26 \\ 0 & 2 & 1 & 5 \\ 2 & -1 & 0 & 6 \end{array} \right] && R_1 = 2R_1 \\ & \left[ \begin{array}{ccc|c} 2 & 2 & 4 & 26 \\ 0 & 2 & 1 & 5 \\ 0 & -3 & -4 & -20 \end{array} \right] && R_3 = R_3-R_1 \end{align*}\]Column 1 is finished, so we move to row 2, column 2 at a reference.
\[\begin{align*} & \left[ \begin{array}{ccc|c} 2 & 2 & 4 & 26 \\ 0 & 2 & 1 & 5 \\ 0 & -3 & -4 & -20 \end{array} \right] && R_3 = R_3-R_1 \\ & \left[ \begin{array}{ccc|c} 2 & 2 & 4 & 26 \\ 0 & 6 & 3 & 15 \\ 0 & 6 & 8 & 40 \end{array} \right] && R_2 = 3R_2 \quad \text{and}\quad R3=-2R_3 \\ & \left[ \begin{array}{ccc|c} 2 & 2 & 4 & 26 \\ 0 & 6 & 3 & 15 \\ 0 & 0 & 5 & 25 \end{array} \right] && R_3=R_3-R_2 \end{align*}\]We’ve reached the last row, so it’s time to work our way back up.
Also worth mentioning, is that it’s often beneficial to reduce rows when you can. Makes the math easier later on.
\[\begin{align*} & \left[ \begin{array}{ccc|c} 2 & 2 & 4 & 26 \\ 0 & 2 & 1 & 5 \\ 0 & 0 & 1 & 5 \end{array} \right] && \text{Reduced both $R_2$ and $R_3$} \\ & \left[ \begin{array}{ccc|c} 2 & 2 & 4 & 26 \\ 0 & 2 & 0 & 0 \\ 0 & 0 & 1 & 5 \end{array} \right] && R_2=R_2-R_3 \\ & \left[ \begin{array}{ccc|c} 2 & 2 & 0 & 6 \\ 0 & 2 & 0 & 0 \\ 0 & 0 & 1 & 5 \end{array} \right] && R_1=R_1-4R_3 \\ & \left[ \begin{array}{ccc|c} 2 & 0 & 0 & 6 \\ 0 & 2 & 0 & 0 \\ 0 & 0 & 1 & 5 \end{array} \right] && R_1=R_1-R_2 \\ & \left[ \begin{array}{ccc|c} 1 & 0 & 0 & 3 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 5 \end{array} \right] && \text{Reduction} \end{align*}\]So our solution is $x=3,y=0,z=5$.
Last section I gave you this version:
Which is basically what we did above. We eliminated $x$ from two of the rows, then got those two rows to have a single value, and then tackled the first row.
What’s nice about the version above is that it can be refined even further into an algorithm a computer can execute. Once you become proficient at math, it becomes easier to break seeming complicated problems into simple steps, and then you can make a computer do it for you.