Solving Systems Of Linear Equations: All Integer Method

Solving systems of linear equations by elimination or substitution is a staple of even early college studies. A tabular method such as the All Integer Method is a more advanced method. I believe this method was developed at Indiana University Purdue University Indianapolis (IUPUI). It was there that I learned this method when I started teaching their Finite course.


Let’s start with the steps of the All Integer Method. Don’t worry if a particular part seems mysteriously confusing. I will go over these steps with two examples. After each re-read these steps.

  1. The old pivot starts out as 1, otherwise use the previous new pivot.
  2. The new pivot becomes the first available element in the main diagonal.
  3. Copy exactly the new pivot’s row.
  4. Any previous pivot becomes the new pivot.
  5. All other elements in the pivot’s column become zero, and all previously zeroed elements in this fashion remain zero.
  6. To determine all other elements, do Criss-Cross with that element and the new pivot of the previous matrix. Find the product of the element and the new pivot. Subtract from that product the product of the opposite corners. Finally, divide by the old pivot.
  7. Repeat all steps until all elements of the diagonal have been exhausted.

Example 1

\[
\left\{
\begin{array}{ccccccc}
x&-&y&+&z&=&3 \\
2x&+&y&+&z&=&8 \\
3x&+&y&-&z&=&1 \\
\end{array}
\right.
\]

Converting to an augmented matrix, we will handle the first two steps. The old pivot always starts as 1. I will also mark the first new pivot in red.

\[
\begin{array}{c}
OP=1 \\
NP=1
\end{array}
\left[\begin{array}{rrr|r}
\color{red}{1}&-1&1&3 \\
2&1&1&8 \\
3&1&-1&1 \\
\end{array} \right]
\]

Now let’s handle steps 3 and 4. We will copy down the pivot row, make all previous pivots the new pivot, and zero out any other elements in pivot columns. I will leave all other entries blank for now.

\[
\left[\begin{array}{rrr|r}
1&-1&1&3 \\
0&&& \\
0&&& \\
\end{array} \right]
\]

I will now illustrate the criss-cross for all other entries in our new matrix. Pivots are red, elements in focus are green, elements in opposite corners are blue. Note that each result is “divided by 1” (the old pivot) but since this is trivial it is not illustrated. Note that this will not be the usual case.

\[
\begin{array}{c}
\left[\begin{array}{rrr|r}
\color{red}{1}&\color{blue}{-1}&& \\
\color{blue}{2}&\color{green}{1}&& \\
\hspace{3mm}&\hspace{3mm}&\hspace{3mm}&\hspace{3mm} \\
\end{array} \right] \\
(1)(1)-(-1)(2)=3
\end{array}
\hspace{6mm}
\begin{array}{c}
\left[\begin{array}{rrr|r}
\color{red}{1}&&\color{blue}{1}& \\
\color{blue}{2}&&\color{green}{1}& \\
\hspace{3mm}&\hspace{3mm}&\hspace{3mm}&\hspace{3mm} \\
\end{array} \right]\\
(1)(1)-(1)(2)=-1
\end{array}
\hspace{6mm}
\begin{array}{c}
\left[\begin{array}{rrr|r}
\color{red}{1}&&&\color{blue}3 \\
\color{blue}{2}&&&\color{green}{8} \\
\hspace{3mm}&\hspace{3mm}&\hspace{3mm}&\hspace{3mm} \\
\end{array} \right] \\
(1)(8)-(3)(2)=2
\end{array}
\]

\[
\begin{array}{c}
\left[\begin{array}{rrr|r}
\color{red}{1}&\color{blue}{-1}&& \\
\hspace{3mm}&\hspace{3mm}&\hspace{3mm}&\hspace{3mm} \\
\color{blue}{3}&\color{green}{1}&& \\
\end{array} \right] \\
(1)(1)-(-1)(3)=4
\end{array}
\hspace{6mm}
\begin{array}{c}
\left[\begin{array}{rrr|r}
\color{red}{1}&&\color{blue}{1}& \\
\hspace{3mm}&\hspace{3mm}&\hspace{3mm}&\hspace{3mm} \\
\color{blue}{3}&&\color{green}{-1}& \\
\end{array} \right] \\
(1)(-1)-(1)(3)=-4
\end{array}
\hspace{6mm}
\begin{array}{c}
\left[\begin{array}{rrr|r}
\color{red}{1}&&&\color{blue}{3} \\
\hspace{3mm}&\hspace{3mm}&\hspace{3mm}&\hspace{3mm} \\
\color{blue}{3}&&&\color{green}{1} \\
\end{array} \right] \\
(1)(1)-(3)(3)=-8
\end{array}
\]

Let’s finish up this matrix. This will end the list, so go back to step one. Our last new pivot was 1 so the old pivot is 1. Moving down the main diagonal our new pivot will be 3

\[
\begin{array}{c}
OP=1 \\
NP=3
\end{array}
\left[\begin{array}{rrr|r}
1&-1&1&3 \\
0&\color{red}{3}&-1&2 \\
0&4&-4&-8 \\
\end{array} \right]
\]

Copy the new pivot row. Make any previous pivot the new pivot. All other elements in the new pivot’s column become zero. Finally, all previously zeroed elements remain zero.

\[
\left[\begin{array}{rrr|r}
3&0&& \\
0&3&-1&2 \\
0&0&& \\
\end{array} \right]
\]

Back to criss-cross, pay attention to the orientation of everything and how the calculations are obtained. They seem a little different. Again we will be dividing by one each time.

\[
\begin{array}{c}
\left[\begin{array}{rrr|r}
&\color{blue}{-1}&\color{green}{1}& \\
&\color{red}{3}&\color{blue}{-1}& \\
\hspace{3mm}&\hspace{3mm}&\hspace{3mm}&\hspace{3mm} \\
\end{array} \right] \\
(1)(3)-(-1)(-1)=2
\end{array}
\hspace{6mm}
\begin{array}{c}
\left[\begin{array}{rrr|r}
&\color{blue}{-1}&&\color{green}{3} \\
&\color{red}{3}&&\color{blue}{2} \\
\hspace{3mm}&\hspace{3mm}&\hspace{3mm}&\hspace{3mm} \\
\end{array} \right] \\
(3)(3)-(-1)(2)=11
\end{array}
\]

\[
\begin{array}{c}
\left[\begin{array}{rrr|r}
\hspace{3mm}&\hspace{3mm}&\hspace{3mm}&\hspace{3mm} \\
&\color{red}{3}&\color{blue}{-1}& \\
&\color{blue}{4}&\color{green}{-4}& \\
\end{array} \right] \\
(3)(-4)-(-1)(4)=-8
\end{array}
\begin{array}{c}
\left[\begin{array}{rrr|r}
\hspace{3mm}&\hspace{3mm}&\hspace{3mm}&\hspace{3mm} \\
&\color{red}{3}&&\color{blue}{2} \\
&\color{blue}{4}&&\color{green}{-8} \\
\end{array} \right] \\
(3)(-8)-(2)(4)=-32
\end{array}
\]

Collecting everything, I will again label our new pivot.

\[
\begin{array}{c}
OP=3 \\
NP=-8
\end{array}
\left[\begin{array}{rrr|r}
3&0&2&11 \\
0&3&-1&2 \\
0&0&\color{red}{-8}&-32 \\
\end{array} \right]
\]

For the last part, I will forgo a lot of the explanation steps. I will just include the calculations, which will include dividing by the old pivot.

\[
\begin{array}{c}
(11)(-8)-(2)(-32)=-24 \\
-24(\frac{1}{3})=-8
\end{array}
\hspace{6mm}
\begin{array}{c}
(2)(-8)-(-1)(-32)=-48 \\
-48(\frac{1}{3})=-16
\end{array}
\]

And our last matrix is

\[
\left[\begin{array}{rrr|r}
-8&0&0&-8 \\
0&-8&0&-16 \\
0&0&-8&-32 \\
\end{array} \right]
\]

To get the final result, I will first extract the three equations and solve for xyz respectively.

\[
\left\{
\begin{array}{ccc}
-8x&=&-8 \\
-8y&=&-16 \\
-8z&=&-32
\end{array}
\right.
\hspace{6mm}
\left\{
\begin{array}{ccc}
x&=&1 \\
y&=&2 \\
z&=&4
\end{array}
\right.
\]

At this point, it would be good to go back and read all the steps again. I will do another example but will only give the individual matrices with no explanation. This is exactly what I write down when solving systems by pen and paper. See if you can follow the steps from matrix to matrix. Don’t forget dividing by the old pivot.

\[
\left\{
\begin{array}{ccccccc}
2x&+&y&+&3z&=&1 \\
2x&+&6y&+&8z&=&3 \\
6x&+&8y&+&18z&=&5 \\
\end{array}
\right.
\]

\[
\begin{array}{c}
OP=1 \\
NP=2
\end{array}
\left[\begin{array}{rrr|r}
\color{red}{2}&1&3&1 \\
2&6&8&3 \\
6&8&18&5 \\
\end{array} \right]
\]

\[
\begin{array}{c}
OP=2 \\
NP=10
\end{array}
\left[\begin{array}{rrr|r}
2&1&3&1 \\
0&\color{red}{10}&10&4 \\
0&10&18&4 \\
\end{array} \right]
\]

\[
\begin{array}{c}
OP=10 \\
NP=40
\end{array}
\left[\begin{array}{rrr|r}
10&0&10&3 \\
0&10&10&4 \\
0&0&\color{red}{40}&0 \\
\end{array} \right]
\]

\[
\left[\begin{array}{rrr|r}
40&0&0&12 \\
0&40&0&16 \\
0&0&40&0 \\
\end{array} \right]
\]

\[
\left\{
\begin{array}{ccc}
x&=&\frac{3}{10} \\
y&=&\frac{2}{5} \\
z&=&0
\end{array}
\right.
\]

Some Important points before we are done

The above examples are fairly straightforward and arise when there is one unique solution. I will now go over some things that can happen that are “strange” or when there are either infinitely many solutions or no solution.

My next new pivot is zero! WHAT DO?

There are two situations that can arise when this happens. I will go over two cases.

Case 1

Maybe this is the result after going through your first pivot.

\[
\left[\begin{array}{rrr|r}
3&2&1&-3 \\
0&\color{red}{0}&1&4 \\
0&2&-3&1 \\
\end{array} \right]
\]

Here, we should swap rows 2 and 3. This will give us a non zero new pivot

\[
\left[\begin{array}{rrr|r}
3&2&1&-3 \\
0&\color{red}{2}&-3&1 \\
0&0&1&4 \\
\end{array} \right]
\]

Case 2

Again, pretend like we just handled the first pivot.

\[
\left[\begin{array}{rrr|r}
1&1&-1&0 \\
0&\color{red}{0}&2&-3 \\
0&0&2&2 \\
\end{array} \right]
\]

Here, we will actually go over to the right to select our next new pivot.

\[
\left[\begin{array}{rrr|r}
1&1&-1&0 \\
0&0&\color{red}{2}&-3 \\
0&0&2&2 \\
\end{array} \right]
\]

Infinitely Many Solutions & No Solution

As you solve many linear systems, you might be able to tell just by looking at the equations, but usually won’t know until the end. Both cases happen when you have a row of all zeroes or a row of nearly all zeroes.

Invinitely Many Solutions: row of all zeroes

\[
\left[\begin{array}{rrr|r}
2&3&-4&1 \\
0&2&1&1 \\
0&0&0&0 \\
\end{array} \right]
\]

So you get to the end, and the last row is all zeroes. Also, note that the third column has no pivot that you can associate with it. There are infinitely many solutions to this system. I will not cover here what that solution looks like.

No Solution: row of nearly all zeroes.

\[
\left[\begin{array}{rrr|r}
2&3&-4&1 \\
0&0&1&1 \\
0&0&0&2 \\
\end{array} \right]
\]

That last row has nearly all zeroes, but not quite. I want to remind you that the rows of these matrices correspond with equations. So let’s examine the equation from the last row.

\[
0x+0y+0z=2
\]

Uh Oh! There is no combination of xyz values that will make this equation true. This system has No Solution.


I hope you have fun using the All Integer Method.