Loading [MathJax]/jax/output/HTML-CSS/jax.js
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

9.2: Systems of Linear Equations - Augmented Matrices

( \newcommand{\kernel}{\mathrm{null}\,}\)

An Introduction to Matrices

In Section 9.1 we introduced Gaussian Elimination as a means of transforming a system of linear equations into triangular form with the ultimate goal of producing an equivalent system of linear equations which is easier to solve. If we take a step back and study the process, we see that all of our moves are determined entirely by the coefficients of the variables involved, and not the variables themselves. Much the same thing happened when we studied long division in Section 3.2. Just as we developed synthetic division to streamline that process, in this section, we introduce a similar bookkeeping device to help us solve systems of linear equations. To that end, we define a matrix as a rectangular array of real numbers. We typically enclose matrices with square brackets, "[" and "]," and we size matrices by the number of rows and columns they have. For example, the size (sometimes incorrectly called the dimension) of

[3012510]

is 2×3 because it has 2 rows and 3 columns. The individual numbers in a matrix are called its entries and are usually labeled with double subscripts: the first tells which row the element is in and the second tells which column it is in. The rows are numbered from top to bottom and the columns are numbered from left to right. Matrices themselves are usually denoted by uppercase letters (A, B, C, etc.) while their entries are usually denoted by the corresponding letter. So, for instance, if we have

A=[3012510]

then a11=3, a12=0, a13=1, a21=2, a22=5, and a23=10. While the theory of matrices takes up an entire course called Linear Algebra, we shall introduce them here solely as a bookkeeping device. Consider the system of linear equations from Example 9.1.2.b

{(E1)2x+3yz=1(E2)10xz=2(E3)4x9y+2z=5

We encode this system into a matrix by assigning each equation to a corresponding row. Within that row, each variable and the constant gets its own column, and to separate the variables on the left hand side of the equation from the constants on the right hand side, we use a vertical bar, . Note that in E2, since y is not present, we record its coefficient as 0. The matrix associated with this system is

xyzc(E1)(E2)(E3)[2311100124925]

This matrix is called an augmented matrix because the column containing the constants is appended to the matrix containing the coefficients. In fact, the matrix containing the coefficients of the variables in the original linear system is called the coefficient matrix. The column of entries to the right side of the vertical bar is called the augmentation column.

To solve this system, we can use the same kind operations on the rows of the matrix that we performed on the equations of the system. More specifically, we have the following analog of Theorem 9.1.1 below.

Theorem 9.2.1: Row Operations

Given an augmented matrix for a system of linear equations, the following row operations produce an augmented matrix which corresponds to an equivalent system of linear equations.

  • Interchange any two rows.
  • Replace a row with a nonzero multiple of itself.1
  • Replace a row with itself plus a nonzero multiple of another row.2

As a demonstration of the moves in Theorem 9.2.1, we revisit some of the steps that were used in solving the systems of linear equations in Example 9.1.2 of Section 9.1. The reader is encouraged to perform the indicated operations on the rows of the augmented matrix to see that the machinations are identical to what is done to the coefficients of the variables in the equations. We first see a demonstration of switching two rows using the first step of Example 9.1.2.a.

{(E1)3xy+z=3(E2)2x4y+3z=16(E3)xy+z=5Switch E1 and E3{(E1)xy+z=5(E2)2x4y+3z=16(E3)3xy+z=3

[3113243161115]Switch R1 and R3[1115243163113]

Next, we have a demonstration of replacing a row with a nonzero multiple of itself using the first step of Example 9.1.2.c.

{(E1)3x1+x2+x4=6(E2)2x1+x2x3=4(E3)x23x32x4=0Replace E1 with 13E1{(E1)x1+13x2+13x4=2(E2)2x1+x2x3=4(E3)x23x32x4=0

[310162110401320]Replace R1 with 13R1[11301322110401320]

Finally, we have an example of replacing a row with itself plus a multiple of another row using the second step from Example 9.1.2.b.

{(E1)x+32y12z=12(E2)10xz=2(E3)4x9y+2z=5Replace E2 with 10E1+E2Replace E3 with 4E1+E3{(E1)x+32y12z=12(E2)15y+4z=3(E3)15y+4z=3

[1321212100124925]Replace R2 with 10R1+R2Replace R3 with 4R1+R3[13212120154301543]

Subsection Footnotes

1 That is, the row obtained by multiplying each entry in the row by the same nonzero number.

2 Where we add entries in corresponding columns.


Row Echelon Form

The matrix equivalent of "triangular form" is row echelon form. The reader is encouraged to refer to the definition of triangular form for comparison. Note that the analog of "leading variable" of an equation is "leading entry" of a row. Specifically, the first nonzero entry (if it exists) in a row is called the leading entry of that row.

Definition: Row Echelon Form

A matrix is said to be in row echelon form provided all of the following conditions hold:

  1. The leading entry of a given row must be to the right of the leading entry of the row above it.
  2. Any row of all zeros cannot be placed above a row with nonzero entries.
Note

Some authors also require that all leading entries be 1 for a matrix to be in row echelon form. Strictly speaking, this is not necessary and, in fact, can lead to some atrocious calculations; however, if forcing a leading entry to be 1 doesn't cause too many fractional entries, then we will do that here.

To solve a system of a linear equations using an augmented matrix, we encode the system into an augmented matrix and apply Gaussian Elimination to the rows to get the matrix into row-echelon form. We then decode the matrix and back substitute. The next example illustrates this nicely.

Example 9.2.1

Use an augmented matrix to transform the following system of linear equations into triangular form. Solve the system. {3xy+z=8x+2yz=42x+3y4z=10

Solution

We first encode the system into an augmented matrix.

{3xy+z=8x+2yz=42x+3y4z=10Encode into the matrix[3118121423410]

Thinking back to Gaussian Elimination at an equations level, our first order of business is to get x in E1 with a coefficient of 1. At the matrix level, this means getting a leading 1 in R1. To that end, we interchange R1 and R2.

[3118121423410]Switch R1 and R2[1214311823410]

Our next step is to eliminate the x’s from E2 and E3. From a matrix standpoint, this means we need 0’s below the leading 1 in R1. This guarantees the leading 1 in R2 will be to the right of the leading 1 in R1 in accordance with the first requirement of the definition of Row Echelon Form.

[1214311823410]Replace R2 with 3R1+R2Replace R3 with 2R1+R3[121407440122]

Now we repeat the above process for the variable y which means we need to get the leading entry in R2 to be 1.

[121407440122]Replace R2 with 17R2[12140147470122]

To guarantee the leading 1 in R3 is to the right of the leading 1 in R2, we get a 0 in the second column of R3.

[12140147470122]Replace R3 with R2+R3[121401474700187187]

Finally, we get the leading entry in R3 to be 1.

[121401474700187187]Replace R3 with 718R3[12140147470011]

Decoding from the matrix gives a system in triangular form

[12140147470011]Decode from the matrix{x+2yz=4y47z=47z=1

We get z=1, y=47z+47=47(1)+47=0 and x=2y+z+4=2(0)+(1)+4=3 for a final answer of (3,0,1). We leave it to the reader to check.


Reduced Row Echelon Form

As part of Gaussian Elimination, we used row operations to obtain 0’s beneath each leading entry to put the matrix into row echelon form. If we also require that 0’s are the only numbers above a leading entry, and if we require that all leading entries are 1, we have what is known as the reduced row echelon form of the matrix.

Definition: Reduced Row Echelon Form

A matrix is said to be in reduced row echelon form provided both of the following conditions hold:

  1. The matrix is in row echelon form.
  2. All leading entries are 1s.
  3. The leading 1s are the only nonzero entry in their respective columns.

Of what significance is the reduced row echelon form of a matrix? To illustrate, let’s take the row echelon form from Example 9.2.1 and perform the necessary steps to put into reduced row echelon form. We start by using the leading 1 in R3 to zero out the numbers in the rows above it.

[12140147470011]Replace R1 with R3+R1Replace R2 with 47R3+R2[120301000011]

Finally, we take care of the 2 in R1 above the leading 1 in R2.

[120301000011]Replace R1 with 2R2+R1[100301000011]

To our surprise and delight, when we decode this matrix, we obtain the solution instantly without having to deal with any back-substitution at all.

[100301000011]Decode from the matrix{x=3y=0z=1

Note that in the previous discussion, we could have started with R2 and used it to get a zero above its leading 1 and then done the same for the leading 1 in R3. By starting with R3, however, we get more zeros first, and the more zeros there are, the faster the remaining calculations will be. It is also worth noting that while a matrix has several3 row echelon forms, it has only one reduced row echelon form. The process by which we have put a matrix into reduced row echelon form is called Gauss-Jordan Elimination.

Example 9.2.2

Solve the following system using an augmented matrix. Use Gauss-Jordan Elimination to put the augmented matrix into reduced row echelon form.

{x23x1+x4=22x1+4x3=54x2x4=3

Solution

We first encode the system into a matrix. (Pay attention to the subscripts!)

{x23x1+x4=22x1+4x3=54x2x4=3Encode into the matrix[310122040504013]

Next, we get a leading 1 in the first column of R1.

[310122040504013]Replace R1 with 13R1[113013232040504013]

Now we eliminate the nonzero entry below our leading 1.

[113013232040504013]Replace R2 with 2R1+R2[1130132302342319304013]

We proceed to get a leading 1 in R2.

[1130132302342319304013]Replace R2 with 32R2[11301323016119204013]

We now zero out the entry below the leading 1 in R2.

[11301323016119204013]Replace R3 with 4R2+R3[1130132301611920024535]

Next, it’s time for a leading 1 in R3. [1130132301611920024535]Replace R3 with 124R3[1130132301611920015243524]

The matrix is now in row echelon form. To get the reduced row echelon form, we start with the last leading 1 we produced and work to get 0’s above it. [1130132301611920015243524]Replace R2 with 6R3+R2[1130132301014340015243524]

Lastly, we get a 0 above the leading 1 of R2.

[1130132301014340015243524]Replace R1 with 13R2+R1[10051251201014340015243524]

At last, we decode to get

[10051251201014340015243524]Decode from the matrix{x1512x4=512x214x4=34x3+524x4=3524

We have that x4 is free and we assign it the parameter t. We obtain x3=524t+3524, x2=14t+34, and x1=512t512. Our solution is {(512t512,14t+34,524t+3524,t):<t<} and leave it to the reader to check.

Like all good algorithms, putting a matrix in row echelon or reduced row echelon form can easily be performed by technology. We use this in our next example.

Example 9.2.3

Find the quadratic function passing through the points (1,3), (2,4), (5,2).

Solution

A quadratic function has the form f(x)=ax2+bx+c where a0. Our goal is to find a, b and c so that the three given points are on the graph of f. If (1,3) is on the graph of f, then f(1)=3, or a(1)2+b(1)+c=3 which reduces to ab+c=3, an honest-to-goodness linear equation with the variables a, b and c. Since the point (2,4) is also on the graph of f, then f(2)=4 which gives us the equation 4a+2b+c=4. Lastly, the point (5,2) is on the graph of f gives us 25a+5b+c=2. Putting these together, we obtain a system of three linear equations. Encoding this into an augmented matrix produces {ab+c=34a+2b+c=425a+5b+c=2Encode into the matrix[1113421425512]

Using Desmos, we find a=718, b=1318 and c=379. Hence, the one and only quadratic which fits the bill is f(x)=718x2+1318x+379. To verify this analytically, we see that f(1)=3, f(2)=4, and f(5)=2. We can use the calculator to check our solution as well by plotting the three data points and the function f.

Precalc_9_2_Fig1.jpg  

Precalc_9_2_Fig2.jpg  

Precalc_9_2_Fig3.jpg

Subsection Footnotes

3 Infinite, in fact.


This page titled 9.2: Systems of Linear Equations - Augmented Matrices is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by Carl Stitz & Jeff Zeager via source content that was edited to the style and standards of the LibreTexts platform.

Support Center

How can we help?