2.1 Matrices Chapter Overview
In this chapter, you will learn to:
Do matrix operations. Solve linear systems using the Gauss-Jordan method. Solve linear systems using the matrix inverse method. Do application problems. Introduction to Matrices Section Overview In this section you will learn to:
Add and subtract matrices. Multiply a matrix by a scalar. Multiply two matrices. A matrix is a rectangular array of numbers. Matrices are useful in organizing and manipulating large amounts of data. In order to get some idea of what matrices are all about, we will look at the following example.
Example 1
Fine Furniture Company makes chairs and tables at its San Jose, Hayward, and Oakland factories. The total production, in hundreds, from the three factories for the years 2024 and 2025 is listed in the table below.
Represent the production for the years 2024 and 2025 as the matrices A and B. Find the difference in sales between the years 2024 and 2025. The company predicts that in the year 2030 the production at these factories will double that of the year 2024. What will the production be for the year 2030? The matrices are as follows:
A = [ 30 18 20 12 16 10 ] size 12{A= left [ matrix {
"30" {} # "18" {} ##
"20" {} # "12" {} ##
"16" {} # "10"{}
} right ]} {} B = [ 36 20 24 18 20 12 ] size 12{B= left [ matrix {
"36" {} # "20" {} ##
"24" {} # "18" {} ##
"20" {} # "12"{}
} right ]} {} We are looking for the matrix
B − A size 12{B - A} {} . When two matrices have the same number of rows and columns, the matrices can be added or subtracted entry by entry. Therefore, we get
B − A = [ 36 − 30 20 − 18 24 − 20 18 − 12 20 − 16 12 − 10 ] = [ 6 2 4 6 4 2 ] size 12{B - A= left [ matrix {
"36" - "30" {} # "20" - "18" {} ##
"24" - "20" {} # "18" - "12" {} ##
"20" - "16" {} # "12" - "10"{}
} right ]= left [ matrix {
6 {} # 2 {} ##
4 {} # 6 {} ##
4 {} # 2{}
} right ]} {}
We would like a matrix that is twice the matrix of 2024, i.e.,
2A size 12{2A} {} .
Whenever a matrix is multiplied by a number, each entry is multiplied by the number.
2A = 2 [ 30 18 20 12 16 10 ] = [ 60 36 40 24 32 20 ] size 12{2A=2 left [ matrix {
"30" {} # "18" {} ##
"20" {} # "12" {} ##
"16" {} # "10"{}
} right ]= left [ matrix {
"60" {} # "36" {} ##
"40" {} # "24" {} ##
"32" {} # "20"{}
} right ]} {}
Before we go any further, we need to familiarize ourselves with some terms that are associated with matrices. The numbers in a matrix are called the entries or the elements of a matrix. Whenever we talk about a matrix, we need to know the size or the dimension of the matrix. The dimension of a matrix is the number of rows and columns it has. When we say a matrix is a 3 by 4 matrix, we are saying that it has 3 rows and 4 columns. The rows are always mentioned first and the columns second. This means that a
3 × 4 size 12{3 times 4} {} matrix does not have the same dimension as a
4 × 3 size 12{4 times 3} {} matrix. A matrix that has the same number of rows as columns is called a square matrix . A matrix with all entries zero is called a zero matrix . A square matrix with 1's along the main diagonal and zeros everywhere else, is called an identity matrix . When a square matrix is multiplied by an identity matrix of same size, the matrix remains the same. A matrix with only one row is called a row matrix or a row vector , and a matrix with only one column is called a column matrix or a column vector . Two matrices are equal if they have the same size and the corresponding entries are equal.
Matrix Addition and Subtraction
If two matrices have the same size, they can be added or subtracted. The operations are performed on corresponding entries.
Example 2
Given the matrices
A size 12{A} {} ,
B size 12{B} {} ,
C size 12{C} {} and
D size 12{D} {} , below
A = [ 1 2 4 2 3 1 5 0 3 ] size 12{A= left [ matrix {
1 {} # 2 {} # 4 {} ##
2 {} # 3 {} # 1 {} ##
5 {} # 0 {} # 3{}
} right ]} {} B = [ 2 − 1 3 2 4 2 3 6 1 ] size 12{B= left [ matrix {
2 {} # - 1 {} # 3 {} ##
2 {} # 4 {} # 2 {} ##
3 {} # 6 {} # 1{}
} right ]} {} C = [ 4 2 3 ] size 12{C= left [ matrix {
4 {} ##
2 {} ##
3
} right ]} {} D = [ − 2 − 3 4 ] size 12{D= left [ matrix {
- 2 {} ##
- 3 {} ##
4
} right ]} {}
Find, if possible.
A + B size 12{A+B} {}
C − D size 12{C - D} {}
A + D size 12{A+D} {} . As we mentioned earlier, matrix addition and subtraction involves performing these operations entry by entry.
We add each element of
A size 12{A} {} to the corresponding entry of
B size 12{B} {} .
A + B = [ 3 1 7 4 7 3 8 6 4 ] size 12{A+B= left [ matrix {
3 {} # 1 {} # 7 {} ##
4 {} # 7 {} # 3 {} ##
8 {} # 6 {} # 4{}
} right ]} {}
Just like the problem above, we perform the subtraction entry by entry.
C − D = [ 6 5 − 1 ] size 12{C - D= left [ matrix {
6 {} ##
5 {} ##
- 1
} right ]} {}
The sum
A + D size 12{A+D} {} cannot be found because the two matrices have different sizes.
Multiplying a Matrix by a Scalar
If a matrix is multiplied by a scalar (a constant number), each entry is multiplied by that scalar.
Example 3
Given the matrix
A size 12{A} {} and
C size 12{C} {} in Example 2 , find
2A size 12{2A} {} and
− 3C size 12{ - 3C} {} .
To find
2A size 12{2A} {} , we multiply each entry of matrix
A size 12{A} {} by 2 size 12{2} {} , and to find
− 3C size 12{ - 3C} {} , we multiply each entry of
C size 12{C} {} by
− 3 size 12{ - 3} {} . The results are given below.
We multiply each entry of
A size 12{A} {} by 2 size 12{2} {} .
2A = [ 2 4 8 4 6 2 10 0 6 ] size 12{2A= left [ matrix {
2 {} # 4 {} # 8 {} ##
4 {} # 6 {} # 2 {} ##
"10" {} # 0 {} # 6{}
} right ]} {}
We multiply each entry of
C size 12{C} {} by
− 3 size 12{ - 3} {} .
− 3C = [ − 12 − 6 − 9 ] size 12{ - 3C= left [ matrix {
- "12" {} ##
- 6 {} ##
- 9
} right ]} {}
Multiplication of Two Matrices
To multiply a matrix by another is not as easy as the addition, subtraction, or scalar multiplication of matrices. Because of its wide use in application problems, it is important that we learn it well. Therefore, we will try to learn the process in a step by step manner. We first begin by finding a product of a row matrix and a column matrix.
Example 4
Given
A = [ 2 3 4 ] size 12{A= left [ matrix {
2 {} # 3 {} # 4{}
} right ]} {} and
B = [ a b c ] size 12{B= left [ matrix {
a {} ##
b {} ##
c
} right ]} {} , find the product
AB size 12{ ital "AB"} {} .
The product is a
1 × 1 size 12{1 times 1} {} matrix whose entry is obtained by multiplying the corresponding entries and then forming the sum.
AB = [ 2 3 4 ] [ a b c ] = [ ( 2a + 3b + 4c ) ] size 12{ ital "AB"= left [ matrix {
2 {} # 3 {} # 4{}
} right ] left [ matrix {
a {} ##
b {} ##
c
} right ]= left [ left (2a+3b+4c right ) right ]} {}
Note that
AB size 12{ ital "AB"} {} is a
1 × 1 size 12{1 times 1} {} matrix, and its only entry is
2a + 3b + 4c size 12{2a+3b+4c} {} .
Example 5
Given
A = [ 2 3 4 ] size 12{A= left [ matrix {
2 {} # 3 {} # 4{}
} right ]} {} and
B = [ 5 6 7 ] size 12{B= left [ matrix {
5 {} ##
6 {} ##
7
} right ]} {} , find the product
AB size 12{ ital "AB"} {} .
Again, we multiply the corresponding entries and add.
AB = [ 2 3 4 ] [ 5 6 7 ] = [ 2 ⋅ 5 + 3 ⋅ 6 + 4 ⋅ 7 ] = [ 10 + 18 + 28 ] = [ 56 ] size 12{ matrix {
ital "AB" {} # ={} {} # left [ matrix {
2 {} # 3 {} # 4{}
} right ] left [ matrix {
5 {} ##
6 {} ##
7
} right ] {} ##
{} # ={} {} # left [2 cdot 5+3 cdot 6+4 cdot 7 right ] {} ##
{} # ={} {} # left ["10"+"18"+"28" right ] {} ##
{} # ={} {} # left ["56" right ]{}
} } {}
Example 6
Given
A = [ 2 3 4 ] size 12{A= left [ matrix {
2 {} # 3 {} # 4{}
} right ]} {} and
B = [ 5 3 6 4 7 5 ] size 12{B= left [ matrix {
5 {} # 3 {} ##
6 {} # 4 {} ##
7 {} # 5{}
} right ]} {} , find the product
AB size 12{ ital "AB"} {} .
We already know how to multiply a row matrix by a column matrix. To find the product
AB size 12{ ital "AB"} {} , in this example, we will be multiplying the row matrix
A size 12{A} {} to both the first and second columns of matrix
B size 12{B} {} , resulting in a
1 × 2 size 12{1 times 2} {} matrix.
AB = [ 2 ⋅ 5 + 3 ⋅ 6 + 4 ⋅ 7 2 ⋅ 3 + 3 ⋅ 4 + 4 ⋅ 5 ] = [ 56 38 ] size 12{ ital "AB"= left [ matrix {
2 cdot 5+3 cdot 6+4 cdot 7 {} # 2 cdot 3+3 cdot 4+4 cdot 5{}
} right ]= left [ matrix {
"56" {} # "38"{}
} right ]} {}
We have just multiplied a
1 × 3 size 12{1 times 3} {} matrix by a matrix whose size is
3 × 2 size 12{3 times 2} {} . So unlike addition and subtraction, it is possible to multiply two matrices with different dimensions as long as the number of entries in the rows of the first matrix are the same as the number of entries in columns of the second matrix.
Example 7
Given
A = [ 2 3 4 1 2 3 ] size 12{A= left [ matrix {
2 {} # 3 {} # 4 {} ##
1 {} # 2 {} # 3{}
} right ]} {} and
B = [ 5 3 6 4 7 5 ] size 12{B= left [ matrix {
5 {} # 3 {} ##
6 {} # 4 {} ##
7 {} # 5{}
} right ]} {} , find the product
AB size 12{ ital "AB"} {} .
This time we are multiplying two rows of the matrix
A size 12{A} {} with two columns of the matrix
B size 12{B} {} . Since the number of entries in each row of
A size 12{A} {} are the same as the number of entries in each column of
B size 12{B} {} , the product is possible. We do exactly what we did in Example 6 . The only difference is that the matrix
A size 12{A} {} has one more row.
We multiply the first row of the matrix
A size 12{A} {} with the two columns of
B size 12{B} {} , one at a time, and then repeat the process with the second row of
A size 12{A} {} . We get
AB
=
[
2
3
4
1
2
3
] [
5
3
6
4
7
5
]
=
[ 2 ⋅ 5 + 3 ⋅ 6 + 4 ⋅ 7 2 ⋅ 3 + 3 ⋅ 4 + 4 ⋅ 5 1 ⋅ 5 + 2 ⋅ 6 + 3 ⋅ 7 1 ⋅ 3 + 2 ⋅ 4 + 3 ⋅ 5
]
=
[ 56 38 38 26 ] size 12{ matrix {
ital "AB" {} # ={} {} # left [ matrix {
2 {} # 3 {} # 4 {} ##
1 {} # 2 {} # 3{}
} right ] left [ matrix {
5 {} # 3 {} ##
6 {} # 4 {} ##
7 {} # 5{}
} right ] {} ##
{} # ={} {} # left [ matrix {
2 cdot 5+3 cdot 6+4 cdot 7 {} # 2 cdot 3+3 cdot 4+4 cdot 5 {} ##
1 cdot 5+2 cdot 6+3 cdot 7 {} # 1 cdot 3+2 cdot 4+3 cdot 5{}
} right ] {} ##
{} # ={} {} # left [ matrix {
"56" {} # "38" {} ##
"38" {} # "26"{}
} right ]{}
} } {}
Example 8
Given the matrices
E size 12{E} {} ,
F size 12{F} {} ,
G size 12{G} {} and
H size 12{H} {} , below
E = [ 1 2 4 2 3 1 ] size 12{E= left [ matrix {
1 {} # 2 {} ##
4 {} # 2 {} ##
3 {} # 1{}
} right ]} {} F = [ 2 − 1 3 2 ] size 12{F= left [ matrix {
2 {} # - 1 {} ##
3 {} # 2{}
} right ]} {} G = [ 4 1 ] size 12{G= left [ matrix {
4 {} # 1{}
} right ]} {} H = [ − 3 − 1 ] size 12{H= left [ matrix {
- 3 {} ##
- 1
} right ]} {}
Find, if possible.
EF size 12{ ital "EF"} {}
FE size 12{ ital "FE"} {}
FH size 12{ ital "FH"} {}
GH size 12{ ital "GH"} {} To find
EF size 12{ ital "EF"} {} , we multiply the first row
[ 1 2 ] size 12{ left [ matrix {
1 {} # 2{}
} right ]} {} of
E size 12{E} {} with the columns
[ 2 3 ] size 12{ left [ matrix {
2 {} ##
3
} right ]} {} and
[ − 1 2 ] size 12{ left [ matrix {
- 1 {} ##
2
} right ]} {} of the matrix
F size 12{F} {} , and then repeat the process by multiplying the other two rows of
E size 12{E} {} with these columns of
F size 12{F} {} . The result is as follows:
EF
=
[
1
2
4
2
3
1
] [
2 − 1
3 2 ]
=
[ 1 ⋅ 2 + 2 ⋅ 3 1 ⋅ − 1 + 2 ⋅ 2 4 ⋅ 2 + 2 ⋅ 3 4 ⋅ − 1 + 2 ⋅ 2 3 ⋅ 2 + 1 ⋅ 3 3 ⋅ − 1 + 1 ⋅ 2 ] = [ 8 3 14 0 9 − 1 ] size 12{ matrix {
ital "EF" {} # ={} {} # left [ matrix {
1 {} # 2 {} ##
4 {} # 2 {} ##
3 {} # 1{}
} right ] left [ matrix {
2 {} # - 1 {} ##
3 {} # 2{}
} right ] {} ##
{} # ={} {} # left [ matrix {
1 cdot 2+2 cdot 3 {} # 1 cdot - 1+2 cdot 2 {} ##
4 cdot 2+2 cdot 3 {} # 4 cdot - 1+2 cdot 2 {} ##
3 cdot 2+1 cdot 3 {} # 3 cdot - 1+1 cdot 2{}
} right ]= left [ matrix {
8 {} # 3 {} ##
"14" {} # 0 {} ##
9 {} # - 1{}
} right ]{}
} } {}
The product
FE size 12{ ital "FE"} {} is not possible because the matrix
F size 12{F} {} has two entries in each row, while the matrix
E size 12{E} {} has three entries in each column. In other words, the matrix
F size 12{F} {} has two columns, while the matrix
E size 12{E} {} has three rows.
FH = [ 2 − 1 3 2 ] [ − 3 − 1 ] = [ 2 ⋅ − 3 + − 1 ⋅ − 1 3 ⋅ − 3 + 2 ⋅ − 1 ] = [ − 5 − 11 ] size 12{ ital "FH"= left [ matrix {
2 {} # - 1 {} ##
3 {} # 2{}
} right ] left [ matrix {
- 3 {} ##
- 1
} right ]= left [ matrix {
2 cdot - 3+ - 1 cdot - 1 {} ##
3 cdot - 3+2 cdot - 1
} right ]= left [ matrix {
- 5 {} ##
- "11"
} right ]} {}
GH = [ 4 1 ] [ − 3 − 1 ] = [ 4 ⋅ − 3 + 1 ⋅ − 1 ] = [ − 13 ] size 12{ ital "GH"= left [ matrix {
4 {} # 1{}
} right ] left [ matrix {
- 3 {} ##
- 1
} right ]= left [4 cdot - 3+1 cdot - 1 right ]= left [ - "13" right ]} {}
We summarize matrix multiplication as follows:
In order for product
AB size 12{ ital "AB"} {} to exist, the number of columns of
A size 12{A} {} , must equal the number of rows of
B size 12{B} {} . If matrix
A size 12{A} {} is of dimension
m × n size 12{m times n} {} and
B size 12{B} {} of dimension
n × p size 12{n times p} {} , the product will have the dimension
m × p size 12{m times p} {} . Furthermore, matrix multiplication is not commutative.
Example 9
Given the matrices
R size 12{R} {} ,
S size 12{S} {} , and
T size 12{T} {} below.
R = [ 1 0 2 2 1 5 2 3 1 ] size 12{R= left [ matrix {
1 {} # 0 {} # 2 {} ##
2 {} # 1 {} # 5 {} ##
2 {} # 3 {} # 1{}
} right ]} {} S = [ 0 − 1 2 3 1 0 4 2 1 ] size 12{S= left [ matrix {
0 {} # - 1 {} # 2 {} ##
3 {} # 1 {} # 0 {} ##
4 {} # 2 {} # 1{}
} right ]} {} T = [ − 2 3 0 − 3 2 2 − 1 1 0 ] size 12{T= left [ matrix {
- 2 {} # 3 {} # 0 {} ##
- 3 {} # 2 {} # 2 {} ##
- 1 {} # 1 {} # 0{}
} right ]} {}
Find
2 RS − 3 ST size 12{2 ital "RS" - 3 ital "ST"} {} .
We multiply the matrices
R size 12{R} {} and
S size 12{S} {} .
RS = [ 8 3 4 23 9 9 13 3 5 ] size 12{ ital "RS"= left [ matrix {
8 {} # 3 {} # 4 {} ##
"23" {} # 9 {} # 9 {} ##
"13" {} # 3 {} # 5{}
} right ]} {}
2 RS = 2 [ 8 3 4 23 9 9 13 3 5 ] = [ 16 6 8 46 18 18 26 6 10 ] size 12{2 ital "RS"=2 left [ matrix {
8 {} # 3 {} # 4 {} ##
"23" {} # 9 {} # 9 {} ##
"13" {} # 3 {} # 5{}
} right ]= left [ matrix {
"16" {} # 6 {} # 8 {} ##
"46" {} # "18" {} # "18" {} ##
"26" {} # 6 {} # "10"{}
} right ]} {}
ST = [ 1 0 − 2 − 9 11 2 − 15 17 4 ] size 12{ ital "ST"= left [ matrix {
1 {} # 0 {} # - 2 {} ##
- 9 {} # "11" {} # 2 {} ##
- "15" {} # "17" {} # 4{}
} right ]} {}
3 ST = 3 [ 1 0 − 2 − 9 11 2 − 15 17 4 ] = [ 3 0 − 6 − 27 33 6 − 45 51 12 ] size 12{3 ital "ST"=3 left [ matrix {
1 {} # 0 {} # - 2 {} ##
- 9 {} # "11" {} # 2 {} ##
- "15" {} # "17" {} # 4{}
} right ]= left [ matrix {
3 {} # 0 {} # - 6 {} ##
- "27" {} # "33" {} # 6 {} ##
- "45" {} # "51" {} # "12"{}
} right ]} {}
2 RS − 3 ST = [ 16 6 8 46 18 18 26 6 10 ] − [ 3 0 − 6 − 27 33 6 − 45 51 12 ] = [ 13 6 14 73 − 15 12 71 − 45 − 2 ] size 12{2 ital "RS" - 3 ital "ST"= left [ matrix {
"16" {} # 6 {} # 8 {} ##
"46" {} # "18" {} # "18" {} ##
"26" {} # 6 {} # "10"{}
} right ] - left [ matrix {
3 {} # 0 {} # - 6 {} ##
- "27" {} # "33" {} # 6 {} ##
- "45" {} # "51" {} # "12"{}
} right ]= left [ matrix {
"13" {} # 6 {} # "14" {} ##
"73" {} # - "15" {} # "12" {} ##
"71" {} # - "45" {} # - 2{}
} right ]} {}
In this chapter, we will be using matrices to solve linear systems. In, we will be asked to express linear systems as the matrix equation AX = B size 12{ ital "AX"=B} {} , where
A size 12{A} {} ,
X size 12{X} {} , and
B size 12{B} {} are matrices. The matrix
A size 12{A} {} is called the coefficient matrix .
Example 10
Verify that the system of two linear equations with two unknowns:
ax + by = h size 12{ ital "ax"+ ital "by"=h} {}
cx + dy = k size 12{ ital "cx"+ ital "dy"=k} {}
can be written as
AX = B size 12{ ital "AX"=B} {} , where
A = [ a b c d ] size 12{A= left [ matrix {
a {} # b {} ##
c {} # d{}
} right ]} {} X = [ x y ] size 12{X= left [ matrix {
x {} ##
y
} right ]} {} and B = [ h k ] size 12{B= left [ matrix {
h {} ##
k
} right ]} {}
If we multiply the matrices
A size 12{A} {} and
X size 12{X} {} , we get
AX = [ a b c d ] [ x y ] = [ ax + by cx + dy ] size 12{ ital "AX"= left [ matrix {
a {} # b {} ##
c {} # d{}
} right ] left [ matrix {
x {} ##
y
} right ]= left [ matrix {
ital "ax"+ ital "by" {} ##
ital "cx"+ ital "dy"
} right ]} {}
If
AX = B size 12{ ital "AX"=B} {} then
[ ax + by cx + dy ] = [ h k ] size 12{ left [ matrix {
ital "ax"+ ital "by" {} ##
ital "cx"+ ital "dy"
} right ]= left [ matrix {
h {} ##
k
} right ]} {}
If two matrices are equal, then their corresponding entries are equal. Therefore, it follows that
ax + by = h size 12{ ital "ax"+ ital "by"=h} {}
cx + dy = k size 12{ ital "cx"+ ital "dy"=k} {}
Example 11
Express the following system as
AX = B size 12{ ital "AX"=B} {} .
2x + 3y − 4z = 5 size 12{2x+"3y"–4z=5} {}
3x + 4y − 5z = 6 size 12{3x+4y - 5z=6} {}
5x − 6z = 7 size 12{5x - 6z=7} {}
The above system of equations can be expressed in the form
AX = B size 12{ ital "AX"=B} {} as shown below.
[ 2 3 − 4 3 4 − 5 5 0 − 6 ] [ x y z ] = [ 5 6 7 ] size 12{ left [ matrix {
2 {} # 3 {} # - 4 {} ##
3 {} # 4 {} # - 5 {} ##
5 {} # 0 {} # - 6{}
} right ] left [ matrix {
x {} ##
y {} ##
z
} right ]= left [ matrix {
5 {} ##
6 {} ##
7
} right ]} {}
Systems of Linear Equations; Gauss-Jordan Method In this section, we learn to solve systems of linear equations using a process called the Gauss-Jordan method. The process begins by first expressing the system as a matrix, and then reducing it to an equivalent system by simple row operations. The process is continued until the solution is obvious from the matrix. The matrix that represents the system is called the augmented matrix , and the arithmetic manipulation that is used to move from a system to a reduced equivalent system is called a row operation .
Example 12
Write the following system as an augmented matrix.
2x + 3y − 4z = 5 size 12{2x+3y - 4z=5} {}
3x + 4y − 5z = − 6 size 12{3x+4y - 5z= - 6} {}
4x + 5y − 6z = 7 size 12{4x+5y - 6z=7} {}
We express the above information in matrix form. Since a system is entirely determined by its coefficient matrix and by its matrix of constant terms, the augmented matrix will include only the coefficient matrix and the constant matrix. So the augmented matrix we get is as follows:
[ 2 3 − 4 ∣ 5 3 4 − 5 ∣ − 6 4 5 − 6 ∣ 7 ] size 12{ left [ matrix {
2 {} # 3 {} # - 4 {} # \lline {} # 5 {} ##
3 {} # 4 {} # - 5 {} # \lline {} # - 6 {} ##
4 {} # 5 {} # - 6 {} # \lline {} # 7{}
} right ]} {}
In the, we expressed the system of equations as
AX = B size 12{ ital "AX"=B} {} , where
A size 12{A} {} represented the coefficient matrix, and
B size 12{B} {} the matrix of constant terms. As an augmented matrix, we write the matrix as
[ A ∣ B ] size 12{ left [A \lline B right ]} {} . It is clear that all of the information is maintained in this matrix form, and only the letters
x size 12{x} {} ,
y size 12{y} {} and
z size 12{z} {} are missing. A student may choose to write
x size 12{x} {} ,
y size 12{y} {} and
z size 12{z} {} on top of the first three columns to help ease the transition.
Example 13
For the following augmented matrix, write the system of equations it represents.
[ 1 3 − 5 ∣ 2 2 0 − 3 ∣ − 5 3 2 − 3 ∣ − 1 ] size 12{ left [ matrix {
1 {} # 3 {} # - 5 {} # \lline {} # 2 {} ##
2 {} # 0 {} # - 3 {} # \lline {} # - 5 {} ##
3 {} # 2 {} # - 3 {} # \lline {} # - 1{}
} right ]} {}
The system is readily obtained as below.
x + 3y − 5z = 2 size 12{x+3y - 5z=2} {}
2x − 3z = − 5 size 12{2x - 3z= - 5} {}
3x + 2y − 3z = − 1 size 12{3x+2y - 3z= - 1} {}
Once a system is expressed as an augmented matrix, the Gauss-Jordan method reduces the system into a series of equivalent systems by employing the row operations. This row reduction continues until the system is expressed in what is called the reduced row echelon form . The reduced row echelon form of the coefficient matrix has 1's along the main diagonal and zeros elsewhere. The solution is readily obtained from this form.
The method is not much different form the algebraic operations we employed in the elimination method in the first chapter. The basic difference is that it is algorithmic in nature, and, therefore, can easily be programmed on a computer.
We will next solve a system of two equations with two unknowns, using the elimination method, and then show that the method is analogous to the Gauss-Jordan method.
Example 14
Solve the following system by the elimination method.
x + 3y = 7 size 12{x+3y=7} {}
3x + 4y = 11 size 12{3x+4y="11"} {}
We multiply the first equation by – 3, and add it to the second equation.
− 3x − 9y = − 21 3x + 4y = 11 ̲ − 5y = − 10 size 12{ matrix {
- 3x - 9y= - "21" {} ##
{underline {3x+4y="11"}} {} ##
- 5y= - "10"
} } {}
By doing this we have transformed our original system into an equivalent system as follows.
x + 3y = 7 size 12{x+3y=7} {}
− 5y = − 10 size 12{ - 5y= - "10"} {}
We divide the second equation by – 5, and we get the next equivalent system.
x + 3y = 7 size 12{x+3y=7} {}
y = 2 size 12{y=2} {}
Now we multiply the second equation by – 3 and add to the first, we get
x = 1 size 12{x=1} {}
y = 2 size 12{y=2} {}
Example 15
Solve the following system from Example 14 by the Gauss-Jordan method, and show the similarities in both methods by writing the equations next to the matrices.
x + 3y = 7 size 12{x+3y=7} {}
3x + 4y = 11 size 12{3x+4y="11"} {}
The augmented matrix for the system is as follows.
[ 1 3 ∣ 7 3 4 ∣ 11 ] size 12{ left [ matrix {
1 {} # 3 {} # \lline {} # 7 {} ##
3 {} # 4 {} # \lline {} # "11"{}
} right ]} {} [ x + 3y = 7 3x + 4y = 11 ] size 12{ left [ matrix {
x+3y=7 {} ##
3x+4y="11"
} right ]} {}
We multiply the first row by – 3, and add to the second row.
[ 1 3 ∣ 7 0 − 5 ∣ − 10 ] size 12{ left [ matrix {
1 {} # 3 {} # \lline {} # 7 {} ##
0 {} # - 5 {} # \lline {} # - "10"{}
} right ]} {} [ x + 3y = 7 − 5y = − 10 ] size 12{ left [ matrix {
x+3y=7 {} ##
- 5y= - "10"
} right ]} {}
We divide the second row by – 5, we get,
[ 1 3 ∣ 7 0 1 ∣ 2 ] size 12{ left [ matrix {
1 {} # 3 {} # \lline {} # 7 {} ##
0 {} # 1 {} # \lline {} # 2{}
} right ]} {} [ x + 3y = 7 y = 2 ] size 12{ left [ matrix {
x+3y=7 {} ##
y=2
} right ]} {}
Finally, we multiply the second row by – 3 and add to the first row, and we get,
[ 1 0 ∣ 1 0 1 ∣ 2 ] size 12{ left [ matrix {
1 {} # 0 {} # \lline {} # 1 {} ##
0 {} # 1 {} # \lline {} # 2{}
} right ]} {} [ x = 1 y = 2 ] size 12{ left [ matrix {
x=1 {} ##
y=2
} right ]} {}
Now we list the three row operations the Gauss-Jordan method employs.
One can easily see that these three row operation may make the system look different, but they do not change the solution of the system.
The first row operation states that if any two rows of a system are interchanged, the new system obtained has the same solution as the old one. Let us look at an example in two equations with two unknowns. Consider the system
x + 3y = 7 size 12{x+3y=7} {}
3x + 4y = 11 size 12{3x+4y="11"} {}
We interchange the rows, and we get,
3x + 4y = 11 size 12{3x+4y="11"} {}
x + 3y = 7 size 12{x+3y=7} {}
Clearly, this system has the same solution as the one above.
The second operation states that if a row is multiplied by any non-zero constant, the new system obtained has the same solution as the old one. Consider the above system again,
x + 3y = 7 size 12{x+3y=7} {}
3x + 4y = 11 size 12{3x+4y="11"} {}
We multiply the first row by –3, we get,
−
3
x
−
9
y
=
−
21
3x + 4y = 11 size 12{3x+4y="11"} {}
Again, it is obvious that this new system has the same solution as the original.
The third row operation states that any constant multiple of one row added to another preserves the solution. Consider our system,
x + 3y = 7 size 12{x+3y=7} {}
3x + 4y = 11 size 12{3x+4y="11"} {}
If we multiply the first row by – 3, and add it to the second row, we get,
x + 3y = 7 size 12{x+3y=7} {}
− 5y = − 10 size 12{ - 5y= - "10"} {}
And once again, the same solution is maintained.
Now that we understand how the three row operations work, it is time to introduce the Gauss-Jordan method to solve systems of linear equations.
As mentioned earlier, the Gauss-Jordan method starts out with an augmented matrix, and by a series of row operations ends up with a matrix that is in the reduced row echelon form . A matrix is in the reduced row echelon form if the first nonzero entry in each row is a 1, and the columns containing these 1's have all other entries as zeros. The reduced row echelon form also requires that the leading entry in each row be to the right of the leading entry in the row above it, and the rows containing all zeros be moved down to the bottom.
We state the Gauss-Jordan method as follows.
Example 18
Solve the following system by the Gauss-Jordan method.
2x + y + 2z = 10 size 12{2x+y+2z="10"} {}
x + 2y + z = 8 size 12{x+2y+z=8} {}
3x + y − z = 2 size 12{3x+y - z=2} {}
We write the augmented matrix.
[ 2 1 2 ∣ 10 1 2 1 ∣ 8 3 1 − 1 ∣ 2 ] size 12{ left [ matrix {
2 {} # 1 {} # 2 {} # \lline {} # "10" {} ##
1 {} # 2 {} # 1 {} # \lline {} # 8 {} ##
3 {} # 1 {} # - 1 {} # \lline {} # 2{}
} right ]} {}
We want a 1 in row one, column one. This can be obtained by dividing the first row by 2, or interchanging the second row with the first. Interchanging the rows is a better choice because that way we avoid fractions.
[ 1 2 1 ∣ 8 2 1 2 ∣ 10 3 1 − 1 ∣ 2 ] size 12{ left [ matrix {
1 {} # 2 {} # 1 {} # \lline {} # 8 {} ##
2 {} # 1 {} # 2 {} # \lline {} # "10" {} ##
3 {} # 1 {} # - 1 {} # \lline {} # 2{}
} right ]} {}
we interchanged row 1(R1) and row 2(R2)
We need to make all other entries zeros in column 1. To make the entry (2) a zero in row 2, column 1, we multiply row 1 by - 2 and add it to the second row. We get,
[ 1 2 1 ∣ 8 0 − 3 0 ∣ − 6 3 1 − 1 ∣ 2 ] size 12{ left [ matrix {
1 {} # 2 {} # 1 {} # \lline {} # 8 {} ##
0 {} # - 3 {} # 0 {} # \lline {} # - 6 {} ##
3 {} # 1 {} # - 1 {} # \lline {} # 2{}
} right ]} {} − 2 R 1 + R2 size 12{ -2R1+R2} {}
To make the entry (3) a zero in row 3, column 1, we multiply row 1 by –3 and add it to the third row. We get,
[ 1 2 1 ∣ 8 0 − 3 0 ∣ − 6 0 − 5 − 4 ∣ − 22 ] size 12{ left [ matrix {
1 {} # 2 {} # 1 {} # \lline {} # 8 {} ##
0 {} # - 3 {} # 0 {} # \lline {} # - 6 {} ##
0 {} # - 5 {} # - 4 {} # \lline {} # - "22"{}
} right ]} {} − 3 R 1 + R3 size 12{ -3R1+R3} {}
So far we have made a 1 in the left corner and all other entries zeros in that column. Now we move to the next diagonal entry, row 2, column 2. We need to make this entry(–3) a 1 and make all other entries in this column zeros. To make row 2, column 2 entry a 1, we divide the entire second row by –3.
[ 1 2 1 ∣ 8 0 1 0 ∣ 2 0 − 5 − 4 ∣ − 22 ] size 12{ left [ matrix {
1 {} # 2 {} # 1 {} # \lline {} # 8 {} ##
0 {} # 1 {} # 0 {} # \lline {} # 2 {} ##
0 {} # - 5 {} # - 4 {} # \lline {} # - "22"{}
} right ]} {} R2 ÷ ( − 3 ) size 12{R2 div left ( -3 right )} {}
Next, we make all other entries zeros in the second column.
[ 1 0 1 ∣ 4 0 1 0 ∣ 2 0 0 − 4 ∣ − 12 ] size 12{ left [ matrix {
1 {} # 0 {} # 1 {} # \lline {} # 4 {} ##
0 {} # 1 {} # 0 {} # \lline {} # 2 {} ##
0 {} # 0 {} # - 4 {} # \lline {} # - "12"{}
} right ]} {} − 2 R 2 + R1 size 12{ - 2R2+R1} {} and 5 R 2 + R 3
We make the last diagonal entry a 1, by dividing row 3 by – 4.
[ 1 0 1 ∣ 4 0 1 0 ∣ 2 0 0 1 ∣ 3 ] size 12{ left [ matrix {
1 {} # 0 {} # 1 {} # \lline {} # 4 {} ##
0 {} # 1 {} # 0 {} # \lline {} # 2 {} ##
0 {} # 0 {} # 1 {} # \lline {} # 3{}
} right ]} {} R3 ÷ ( − 4 ) size 12{R3 div left ( - 4 right )} {}
Finally, we make all other entries zeros in column 3.
[ 1 0 0 ∣ 1 0 1 0 ∣ 2 0 0 1 ∣ 3 ] size 12{ left [ matrix {
1 {} # 0 {} # 0 {} # \lline {} # 1 {} ##
0 {} # 1 {} # 0 {} # \lline {} # 2 {} ##
0 {} # 0 {} # 1 {} # \lline {} # 3{}
} right ]} {} − R3 + R1 size 12{ -R3+R1} {}
Clearly, the solution reads
x = 1 size 12{x=1} {} ,
y = 2 size 12{y=2} {} , and
z = 3 size 12{z=3} {} .
Before we leave this section, we mention some terms we may need in the fourth chapter. The process of obtaining a 1 in a location, and then making all other entries zeros in that column, is called pivoting . The number that is made a 1 is called the pivot element , and the row that contains the pivot element is called the pivot row . We often multiply the pivot row by a number and add it to another row to obtain a zero in the latter. The row to which a multiple of pivot row is added is called the target row .
Systems of Linear Equations – Special Cases Section Overview In this section you will learn to:
Determine the linear systems that have no solution. Solve the linear systems that have infinitely many solutions. If we consider the intersection of two lines in a plane, three things can happen.
The lines intersect in exactly one point. This is called an independent system . The lines are parallel, so they do not intersect. This is called an inconsistent system . The lines coincide, so they intersect at infinitely many points. This is a dependent system . The figures below shows all three cases.
Figure 2.1 Every system of equations has either one solution, no solution, or infinitely many solutions.
In the, we used the Gauss-Jordan method to solve systems that had exactly one solution. In this section, we will determine the systems that have no solution, and solve the systems that have infinitely many solutions.
Example 19
Solve the following system of equations.
x + y = 7 size 12{x+y=7} {}
x + y = 9 size 12{x+y=9} {}
Let us use the Gauss-Jordan method to solve this system. The augmented matrix is as follows.
[ 1 1 ∣ 7 1 1 ∣ 9 ] size 12{ left [ matrix {
1 {} # 1 {} # \lline {} # 7 {} ##
1 {} # 1 {} # \lline {} # 9{}
} right ]} {} [ x + y = 7 x + y = 9 ] size 12{ left [ matrix {
x+y=7 {} ##
x+y=9
} right ]} {}
If we multiply the first row by – 1 and add to the second row, we get
[ 1 1 ∣ 7 0 0 ∣ 2 ] size 12{ left [ matrix {
1 {} # 1 {} # \lline {} # 7 {} ##
0 {} # 0 {} # \lline {} # 2{}
} right ]} {} [ x + y = 7 0x + 0y = 2 ] size 12{ left [ matrix {
x+y=7 {} ##
0x+0y=2
} right ]} {}
Since 0 cannot equal 2, the last equation cannot be true for any choices of
x size 12{x} {} and
y size 12{y} {} .
Alternatively, it is clear that the two lines are parallel; therefore, they do not intersect.
At this stage, we are going to start using a calculator to row reduce the augmented matrix.
Example 20
Solve the following system of equations.
2x + 3y − 4z = 7 size 12{2x+3y - 4z=7} {}
3x + 4y − 2z = 9 size 12{3x+4y - 2z=9} {}
5x + 7y − 6z = 20 size 12{5x+7y - 6z="20"} {}
We enter the following augmented matrix in the calculator.
[ 2 3 − 4 ∣ 7 3 4 − 2 ∣ 9 5 7 − 6 ∣ 20 ] size 12{ left [ matrix {
2 {} # 3 {} # - 4 {} # \lline {} # 7 {} ##
3 {} # 4 {} # - 2 {} # \lline {} # 9 {} ##
5 {} # 7 {} # - 6 {} # \lline {} # "20"{}
} right ]} {}
Now by pressing the key to obtain the reduced row-echelon form, we get
[ 1 0 10 ∣ 0 0 1 − 8 ∣ 0 0 0 0 ∣ 1 ] size 12{ left [ matrix {
1 {} # 0 {} # "10" {} # \lline {} # 0 {} ##
0 {} # 1 {} # - 8 {} # \lline {} # 0 {} ##
0 {} # 0 {} # 0 {} # \lline {} # 1{}
} right ]} {}
The last row indicates that the system is inconsistent; therefore, there is no solution.
Example 21
Solve the following system of equations.
x + y = 7 size 12{x+y=7} {}
x + y = 7 size 12{x+y=7} {}
The problem clearly asks for the intersection of two lines that are the same; that is, the lines coincide. This means the lines intersect at an infinite number of points.
A few intersection points are listed as follows: (3, 4), (5, 2), (–1, 8), (–6, 13) etc. However, when a system has an infinite number of solutions, the solution is often expressed in the parametric form. This can be accomplished by assigning an arbitrary constant,
t size 12{t} {} , to one of the variables, and then solving for the remaining variables. Therefore, if we let
y = t size 12{y=t} {} , then
x = 7 − t size 12{x=7 - t} {} . Or we can say all ordered pairs of the form (
7 − t size 12{7 - t} {} ,
t size 12{t} {} ) satisfy the given system of equations.
Alternatively, while solving the Gauss-Jordan method, we will get the reduced row-echelon form given below.
[ 1 1 ∣ 7 0 0 ∣ 0 ] size 12{ left [ matrix {
1 {} # 1 {} # \lline {} # 7 {} ##
0 {} # 0 {} # \lline {} # 0{}
} right ]} {}
The row of all zeros, can simply be discarded in a manner that it never existed. This leaves us with only one equation but two variables. And whenever there are more variables than the equations, the solution must be expressed in terms of an arbitrary constant, as above. That is,
x = 7 − t size 12{x=7 - t} {} ,
y = t size 12{y=t} {} .
Example 22
Solve the following system of equations.
x + y + z = 2 size 12{x+y+z=2} {}
2x + y − z = 3 size 12{2x+y - z=3} {}
3x + 2y = 5 size 12{3x+2y=5} {}
The augmented matrix and the reduced row-echelon form are given below.
[ 1 1 1 ∣ 2 2 1 − 1 ∣ 3 3 2 0 ∣ 5 ] size 12{ left [ matrix {
1 {} # 1 {} # 1 {} # \lline {} # 2 {} ##
2 {} # 1 {} # - 1 {} # \lline {} # 3 {} ##
3 {} # 2 {} # 0 {} # \lline {} # 5{}
} right ]} {}
[ 1 0 − 2 ∣ 1 0 1 3 ∣ 1 0 0 0 ∣ 0 ] size 12{ left [ matrix {
1 {} # 0 {} # - 2 {} # \lline {} # 1 {} ##
0 {} # 1 {} # 3 {} # \lline {} # 1 {} ##
0 {} # 0 {} # 0 {} # \lline {} # 0{}
} right ]} {}
Since the last equation dropped out, we are left with two equations and three variables. This means the system has infinite number of solutions. We express those solutions in the parametric form by letting the last variable
z size 12{z} {} equal the parameter
t size 12{t} {} .
The first equation reads
x − 2z = 1 size 12{x - 2z=1} {} , therefore,
x = 1 + 2z size 12{x=1+2z} {} .
The second equation reads
y + 3z = 1 size 12{y+3z=1} {} , therefore,
y = 1 − 3z size 12{y=1 - 3z} {} .
And now if we let
z = t size 12{z=t} {} , the solution is expressed as follows:
x = 1 + 2t size 12{x=1+2t} {} ,
y = 1 − 3t size 12{y=1 - 3t} {} ,
z = t size 12{z=t} {} .
The reader should note that particular solutions to the system can be obtained by assigning values to the parameter
t size 12{t} {} . For example, if we let
t = 2 size 12{t=2} {} , we have the solution (5, –5, 2).
Example 23
Solve the following system of equations.
x + 2y − 3z = 5 size 12{x+2y - 3z=5} {}
2x + 4y − 6z = 10 size 12{2x+4y - 6z="10"} {}
3x + 6y − 9z = 15 size 12{3x+6y - 9z="15"} {}
The reduced row-echelon form is given below.
[ 1 2 − 3 ∣ 5 0 0 0 ∣ 0 0 0 0 ∣ 0 ] size 12{ left [ matrix {
1 {} # 2 {} # - 3 {} # \lline {} # 5 {} ##
0 {} # 0 {} # 0 {} # \lline {} # 0 {} ##
0 {} # 0 {} # 0 {} # \lline {} # 0{}
} right ]} {}
This time the last two equations drop out, and we are left with one equation and three variables. Again, there are infinite number of solutions. But this time the answer must be expressed in terms of two arbitrary constants.
If we let
z = t size 12{z=t} {} and let
y = s size 12{y=s} {} , then the first equation
x + 2y − 3z = 5 size 12{x+2y - 3z=5} {} results in
x = 5 − 2s + 3t size 12{x=5 - 2s+3t} {} .
We rewrite the solution as:
x = 5 − 2s + 3t size 12{x=5 - 2s+3t} {} ,
y = s size 12{y=s} {} ,
z = t size 12{z=t} {} .
We summarize our discussion in the following table.
If any row of the reduced row-echelon form of the matrix gives a false statement such as 0 = 1, the system is inconsistent and has no solution. If the reduced row echelon form has fewer equations than the variables and the system is consistent, then the system has an infinite number of solutions. Remember the rows that contain all zeros are dropped.If a system has an infinite number of solutions, the solution must be expressed in the parametric form. The number of arbitrary parameters equals the number of variables minus the number of equations. Inverse Matrices Section Overview In this section you will learn to:
Find the inverse of a matrix, if it exists. Use inverses to solve linear systems. In this section, we will learn to find the inverse of a matrix, if it exists. Later, we will use matrix inverses to solve linear systems.
Definition of an Inverse: An
n × n size 12{n times n} {} matrix has an inverse if there exists a matrix
B size 12{B} {} such that
AB = BA = I n size 12{ ital "AB"= ital "BA"=I rSub { size 8{n} } } {} , where
I n size 12{I rSub { size 8{n} } } {} is an
n × n size 12{n times n} {} identity matrix. The inverse of a matrix
A size 12{A} {} , if it exists, is denoted by the symbol
A − 1 size 12{A rSup { size 8{ - 1} } } {} .
Example 24
Given matrices
A size 12{A} {} and
B size 12{B} {} below, verify that they are inverses.
A = [ 4 1 3 1 ] size 12{A= left [ matrix {
4 {} # 1 {} ##
3 {} # 1{}
} right ]} {} B = [ 1 − 1 − 3 4 ] size 12{B= left [ matrix {
1 {} # - 1 {} ##
- 3 {} # 4{}
} right ]} {}
The matrices are inverses if the product
AB size 12{ ital "AB"} {} and
BA size 12{ ital "BA"} {} both equal
I
2
, the identity matrix of dimension
2 × 2 size 12{2 times 2} {} .
AB = [ 4 1 3 1 ] [ 1 − 1 − 3 4 ] = [ 1 0 0 1 ] size 12{ ital "AB"= left [ matrix {
4 {} # 1 {} ##
3 {} # 1{}
} right ] left [ matrix {
1 {} # - 1 {} ##
- 3 {} # 4{}
} right ]= left [ matrix {
1 {} # 0 {} ##
0 {} # 1{}
} right ]} {} and
BA = [ 1 − 1 − 3 4 ] [ 4 1 3 1 ] = [ 1 0 0 1 ] size 12{ ital "BA"= left [ matrix {
1 {} # - 1 {} ##
- 3 {} # 4{}
} right ] left [ matrix {
4 {} # 1 {} ##
3 {} # 1{}
} right ]= left [ matrix {
1 {} # 0 {} ##
0 {} # 1{}
} right ]} {}
Clearly that is the case; therefore, the matrices A and B are inverses of each other.
Example 25
Find the inverse of the following matrix.
A = [ 3 1 5 2 ] size 12{A= left [ matrix {
3 {} # 1 {} ##
5 {} # 2{}
} right ]} {}
Suppose
A size 12{A} {} has an inverse, and it is
B = [ a b c d ] size 12{A= left [ matrix {
3 {} # 1 {} ##
5 {} # 2{}
} right ]} {}
Then A B = I
[ 3 1 5 2 ] [ a b c d ] = [ 1 0 0 1 ] size 12{ left [ matrix {
3 {} # 1 {} ##
5 {} # 2{}
} right ] left [ matrix {
a {} # b {} ##
c {} # d{}
} right ]= left [ matrix {
1 {} # 0 {} ##
0 {} # 1{}
} right ]} {}
After multiplying the two matrices on the left side, we get
[ 3a + c 3b + 6 5a + 2c 5b + 2d ] = [ 1 0 0 1 ] size 12{ left [ matrix {
3a+c {} # 3b+6 {} ##
5a+2c {} # 5b+2d{}
} right ]= left [ matrix {
1 {} # 0 {} ##
0 {} # 1{}
} right ]} {}
Equating the corresponding entries, we get four equations with four unknowns as follows:
3a + c = 1 size 12{3a+c=1} {} 3b + d = 0 size 12{3b+d=0} {}
5a + 2c = 0 size 12{5a+2c=0} {} 5b + 2d = 1 size 12{5b+2d=1} {}
Solving this system, we get
a = 2 size 12{a=2} {} b = − 1 size 12{b= - 1} {} c = − 5 size 12{c= - 5} {} d = 3 size 12{d=3} {}
Therefore, the inverse of the matrix
A size 12{A} {} is
[ 2 − 1 − 5 3 ] size 12{ left [ matrix {
2 {} # - 1 {} ##
- 5 {} # 3{}
} right ]} {}
In this problem, finding the inverse of matrix
A size 12{A} {} amounted to solving the system of equations:
3a + c = 1 size 12{3a+c=1} {} 3b + d = 0 size 12{3b+d=0} {}
5a + 2c = 0 size 12{5a+2c=0} {} 5b + 2d = 1 size 12{5b+2d=1} {}
Actually, it can be written as two systems, one with variables
a size 12{a} {} and
c size 12{c} {} , and the other with
b
and
d size 12{d} {} . The augmented matrices for both are given below.
[ 3 1 ∣ 1 5 2 ∣ 0 ] size 12{ left [ matrix {
3 {} # 1 {} # \lline {} # 0 {} ##
5 {} # 2 {} # \lline {} # 1{}
} right ]} {} and
[ 3 1 ∣ 0 5 2 ∣ 1 ] size 12{ left [ matrix {
3 {} # 1 {} # \lline {} # 0 {} ##
5 {} # 2 {} # \lline {} # 1{}
} right ]} {}
As we look at the two augmented matrices, we notice that the coefficient matrix for both the matrices is the same. Which implies the row operations of the Gauss-Jordan method will also be the same. A great deal of work can be saved if the two right hand columns are grouped together to form one augmented matrix as below.
[ 3 1 ∣ 1 0 5 2 ∣ 0 1 ] size 12{ left [ matrix {
3 {} # 1 {} # \lline {} # 1 {} # 0 {} ##
5 {} # 2 {} # \lline {} # 0 {} # 1{}
} right ]} {}
And solving this system, we get
[ 1 0 ∣ 2 − 1 0 1 ∣ − 5 3 ] size 12{ left [ matrix {
1 {} # 0 {} # \lline {} # 2 {} # - 1 {} ##
0 {} # 1 {} # \lline {} # - 5 {} # 3{}
} right ]} {}
The matrix on the right side of the vertical line is the
A − 1 size 12{A rSup { size 8{ - 1} } } {} matrix.
What you just witnessed is no coincidence. This is the method that is often employed in finding the inverse of a matrix.
We list the steps, as follows:
Example 27
Given the matrix
A size 12{A} {} below, find its inverse.
A = [ 1 − 1 1 2 3 0 0 − 2 1 ] size 12{A= left [ matrix {
1 {} # - 1 {} # 1 {} ##
2 {} # 3 {} # 0 {} ##
0 {} # - 2 {} # 1{}
} right ]} {}
We write the augmented matrix as follows.
[ 1 − 1 1 ∣ 1 0 0 2 3 0 ∣ 0 1 0 0 − 2 1 ∣ 0 0 1 ] size 12{ left [ matrix {
1 {} # - 1 {} # 1 {} # \lline {} # 1 {} # 0 {} # 0 {} ##
2 {} # 3 {} # 0 {} # \lline {} # 0 {} # 1 {} # 0 {} ##
0 {} # - 2 {} # 1 {} # \lline {} # 0 {} # 0 {} # 1{}
} right ]} {}
We reduce this matrix using the Gauss-Jordan method.
Multiplying the first row by –2 and adding it to the second row, we get
[ 1 − 1 1 ∣ 1 0 0 0 5 − 2 ∣ − 2 1 0 0 − 2 1 ∣ 0 0 1 ] size 12{ left [ matrix {
1 {} # - 1 {} # 1 {} # \lline {} # 1 {} # 0 {} # 0 {} ##
0 {} # 5 {} # - 2 {} # \lline {} # - 2 {} # 1 {} # 0 {} ##
0 {} # - 2 {} # 1 {} # \lline {} # 0 {} # 0 {} # 1{}
} right ]} {}
If we swap the second and third rows, we get
[ 1 − 1 1 ∣ 1 0 0 0 − 2 1 ∣ 0 0 1 0 5 − 2 ∣ − 2 1 0 ] size 12{ left [ matrix {
1 {} # - 1 {} # 1 {} # \lline {} # 1 {} # 0 {} # 0 {} ##
0 {} # - 2 {} # 1 {} # \lline {} # 0 {} # 0 {} # 1 {} ##
0 {} # 5 {} # - 2 {} # \lline {} # - 2 {} # 1 {} # 0{}
} right ]} {}
Divide the second row by –2. The result is
[ 1 − 1 1 ∣ 1 0 0 0 1 − 1 / 2 ∣ 0 0 − 1 / 2 0 5 − 2 ∣ − 2 1 0 ] size 12{ left [ matrix {
1 {} # - 1 {} # 1 {} # \lline {} # 1 {} # 0 {} # 0 {} ##
0 {} # 1 {} # - 1/2 {} # \lline {} # 0 {} # 0 {} # - 1/2 {} ##
0 {} # 5 {} # - 2 {} # \lline {} # - 2 {} # 1 {} # 0{}
} right ]} {}
Let us do two operations here. 1) Add the second row to first, 2) Add -5 times the second row to the third. And we get
[ 1 0 1 / 2 ∣ 1 0 − 1 / 2 0 1 − 1 / 2 ∣ 0 0 − 1 / 2 0 0 1 / 2 ∣ − 2 1 5 / 2 ] size 12{ left [ matrix {
1 {} # 0 {} # 1/2 {} # \lline {} # 1 {} # 0 {} # - 1/2 {} ##
0 {} # 1 {} # - 1/2 {} # \lline {} # 0 {} # 0 {} # - 1/2 {} ##
0 {} # 0 {} # 1/2 {} # \lline {} # - 2 {} # 1 {} # 5/2{}
} right ]} {}
Multiplication of the third row by 2 results in
[ 1 0 1 / 2 ∣ 1 0 − 1 / 2 0 1 − 1 / 2 ∣ 0 0 − 1 / 2 0 0 1 ∣ − 4 2 5 ] size 12{ left [ matrix {
1 {} # 0 {} # 1/2 {} # \lline {} # 1 {} # 0 {} # - 1/2 {} ##
0 {} # 1 {} # - 1/2 {} # \lline {} # 0 {} # 0 {} # - 1/2 {} ##
0 {} # 0 {} # 1 {} # \lline {} # - 4 {} # 2 {} # 5{}
} right ]} {}
Multiply the third row by
1 / 2 size 12{1/2} {} and add it to the second. Also, multiply the third row by
− 1 / 2 size 12{ - 1/2} {} and add it to the first. We get
[ 1 0 0 ∣ 3 − 1 − 3 0 1 0 ∣ − 2 1 2 0 0 1 ∣ − 4 2 5 ] size 12{ left [ matrix {
1 {} # 0 {} # 0 {} # \lline {} # 3 {} # - 1 {} # - 3 {} ##
0 {} # 1 {} # 0 {} # \lline {} # - 2 {} # 1 {} # 2 {} ##
0 {} # 0 {} # 1 {} # \lline {} # - 4 {} # 2 {} # 5{}
} right ]} {}
Therefore, the inverse of matrix
A size 12{A} {} is
[ 3 − 1 − 3 − 2 1 2 − 4 2 5 ] size 12{ left [ matrix {
3 {} # - 1 {} # - 3 {} ##
- 2 {} # 1 {} # 2 {} ##
- 4 {} # 2 {} # 5{}
} right ]} {}
One should verify the result by multiplying the two matrices to see if the product does, indeed, equal the identity matrix.
Now that we know how to find the inverse of a matrix, we will use inverses to solve systems of equations. The method is analogous to solving a simple equation like the one below.
2 3 x = 4 size 12{ { {2} over {3} } x=4} {}
Example 28
Solve the following equation.
2 3 x = 4 size 12{ { {2} over {3} } x=4} {}
To solve the above equation, we multiply both sides of the equation by the multiplicative inverse of
2 3 size 12{ { {2} over {3} } } {} which happens to be
3 2 size 12{ { {3} over {2} } } {} . We get
3 2 ⋅ 2 3 x = 4 ⋅ 3 2 size 12{ { {3} over {2} } cdot { {2} over {3} } x=4 cdot { {3} over {2} } } {}
x = 6 size 12{x=6} {}
We use the above example as an analogy to show how linear systems of the form
AX = B size 12{ ital "AX"=B} {} are solved.
To solve a linear system, we first write the system in the matrix equation
AX = B size 12{ ital "AX"=B} {} , where
A size 12{A} {} is the coefficient matrix,
X size 12{X} {} the matrix of variables, and
B size 12{B} {} the matrix of constant terms. We then multiply both sides of this equation by the multiplicative inverse of the matrix
A size 12{A} {} .
Consider the following example.
Example 29
Solve the following system
3x + y = 3 size 12{3x+y=3} {}
5x + 2y = 4 size 12{5x+2y=4} {}
To solve the above equation, first we express the system as
AX = B size 12{ ital "AX"=B} {}
where
A size 12{A} {} is the coefficient matrix, and
B size 12{B} {} is the matrix of constant terms. We get
[ 3 1 5 2 ] [ x y ] = [ 3 4 ] size 12{ left [ matrix {
3 {} # 1 {} ##
5 {} # 2{}
} right ] left [ matrix {
x {} ##
y
} right ]= left [ matrix {
3 {} ##
4
} right ]} {}
To solve this system, we multiply both sides of the matrix equation
AX = B size 12{ ital "AX"=B} {} by
A − 1 size 12{A rSup { size 8{ - 1} } } {} . Since the matrix
A size 12{A} {} is the same matrix
A size 12{A} {} whose inverse we found in Example 25 ,
A − 1 = [ 2 − 1 − 5 3 ] size 12{A rSup { size 8{ - 1} } = left [ matrix {
2 {} # - 1 {} ##
- 5 {} # 3{}
} right ]} {}
Multiplying both sides by
A − 1 size 12{A rSup { size 8{ - 1} } } {} , we get
[ 2 − 1 − 5 3 ] [ 3 1 5 2 ] [ x y ] = [ 2 − 1 − 5 3 ] [ 3 4 ] size 12{ left [ matrix {
2 {} # - 1 {} ##
- 5 {} # 3{}
} right ] left [ matrix {
3 {} # 1 {} ##
5 {} # 2{}
} right ] left [ matrix {
x {} ##
y
} right ]= left [ matrix {
2 {} # - 1 {} ##
- 5 {} # 3{}
} right ] left [ matrix {
3 {} ##
4
} right ]} {}
[ 1 0 0 1 ] [ x y ] = [ 2 − 3 ] size 12{ left [ matrix {
1 {} # 0 {} ##
0 {} # 1{}
} right ] left [ matrix {
x {} ##
y
} right ]= left [ matrix {
2 {} ##
- 3
} right ]} {}
[ x y ] = [ 2 − 3 ] size 12{ left [ matrix {
x {} ##
y
} right ]= left [ matrix {
2 {} ##
- 3
} right ]} {}
Therefore,
x = 2 size 12{x=2} {} , and
y = − 3 size 12{y= - 3} {} .
Example 30
Solve the following system
x − y + z = 6 size 12{x - y+z=6} {}
2x + 3y = 1 size 12{2x+3y=1} {}
− 2y + z = 5 size 12{ - 2y+z=5} {}
To solve the above equation, we write the system in the matrix form
AX = B size 12{ ital "AX"=B} {} as follows:
[ 1 − 1 1 2 3 0 0 − 2 1 ] [ x y z ] = [ 6 1 5 ] size 12{ left [ matrix {
1 {} # - 1 {} # 1 {} ##
2 {} # 3 {} # 0 {} ##
0 {} # - 2 {} # 1{}
} right ] left [ matrix {
x {} ##
y {} ##
z
} right ]= left [ matrix {
6 {} ##
1 {} ##
5
} right ]} {}
To solve this system, we need inverse of
A size 12{A} {} . From Example 27 , we have
A − 1 = [ 3 − 1 − 3 − 2 1 2 − 4 2 5 ] size 12{A rSup { size 8{ - 1} } = left [ matrix {
3 {} # - 1 {} # - 3 {} ##
- 2 {} # 1 {} # 2 {} ##
- 4 {} # 2 {} # 5{}
} right ]} {}
We multiply both sides of the matrix equation
AX = B size 12{ ital "AX"=B} {} , by
A − 1 size 12{A rSup { size 8{ - 1} } } {} , we get
[ 3 − 1 − 3 − 2 1 2 − 4 2 5 ] [ 1 − 1 − 3 2 3 0 0 − 2 1 ] [ x y z ] = [ 3 − 1 − 3 − 2 1 2 − 4 2 5 ] [ 6 1 5 ] size 12{ left [ matrix {
3 {} # - 1 {} # - 3 {} ##
- 2 {} # 1 {} # 2 {} ##
- 4 {} # 2 {} # 5{}
} right ] left [ matrix {
1 {} # - 1 {} # - 3 {} ##
2 {} # 3 {} # 0 {} ##
0 {} # - 2 {} # 1{}
} right ] left [ matrix {
x {} ##
y {} ##
z
} right ]= left [ matrix {
3 {} # - 1 {} # - 3 {} ##
- 2 {} # 1 {} # 2 {} ##
- 4 {} # 2 {} # 5{}
} right ] left [ matrix {
6 {} ##
1 {} ##
5
} right ]} {}
After multiplying the matrices, we get
[ 1 0 0 0 1 0 0 0 1 ] [ x y z ] = [ 2 − 1 3 ] size 12{ left [ matrix {
1 {} # 0 {} # 0 {} ##
0 {} # 1 {} # 0 {} ##
0 {} # 0 {} # 1{}
} right ] left [ matrix {
x {} ##
y {} ##
z
} right ]= left [ matrix {
2 {} ##
- 1 {} ##
3
} right ]} {}
[ x y z ] = [ 2 − 1 3 ] size 12{ left [ matrix {
x {} ##
y {} ##
z
} right ]= left [ matrix {
2 {} ##
- 1 {} ##
3
} right ]} {}
Once again, we remind the reader that not every system of equations can be solved by the matrix inverse method. Although the Gauss-Jordan method works for every situation, the matrix inverse method works only in cases where the inverse of the square matrix exists. In such cases the system has a unique solution.
We summarize our discussion in the following table.
Write the augmented matrix
[ A ∣ I n ] size 12{ left [ matrix {
A {} # \lline {} # I rSub { size 8{n} } {}
} right ]} {} . Write the augmented matrix in step 1 in reduced row echelon form. If the reduced row echelon form in 2 is
[ I n ∣ B ] size 12{ left [ matrix {
I rSub { size 8{n} } {} # \lline {} # B{}
} right ]} {} , then
B size 12{B} {} is the inverse of
A size 12{A} {} . If the left side of the row reduced echelon is not an identity matrix, the inverse does not exist. Express the system in the matrix equation
AX = B size 12{ ital "AX"=B} {} . To solve the equation
AX = B size 12{ ital "AX"=B} {} , we multiply on both sides by
A − 1 size 12{A rSup { size 8{ - 1} } } {} . Application of Matrices in Cryptography In this section, we see a use of matrices in encoding and decoding secret messages. There are many techniques used, but we will use a method that first converts the secret message into a string of numbers by arbitrarily assigning a number to each letter of the message. Next we convert this string of numbers into a new set of numbers by multiplying the string by a square matrix of our choice that has an inverse. This new set of numbers represents the coded message. To decode the message, we take the string of coded numbers and multiply it by the inverse of the matrix to get the original string of numbers. Finally, by associating the numbers with their corresponding letters, we obtain the original message.
In this section, we will use the correspondence where the letters A to Z correspond to the numbers 1 to 26, as shown below, and a space is represented by the number 27, and all punctuation is ignored.
Example 31
Use the matrix
A = [ 1 2 1 3 ] size 12{A= left [ matrix {
1 {} # 2 {} ##
1 {} # 3{}
} right ]} {} to encode the message: ATTACK NOW!
We divide the letters of the message into groups of two.
AT TA CK –N OW
We assign the numbers to these letters from the above table, and convert each pair of numbers into
2 × 1 size 12{2 times 1} {} matrices. In the case where a single letter is left over on the end, a space is added to make it into a pair.
[ A T ] = [ 1 20 ] size 12{ left [ matrix {
A {} ##
T
} right ]= left [ matrix {
1 {} ##
"20"
} right ]} {} [ T A ] = [ 20 1 ] size 12{ left [ matrix {
T {} ##
A
} right ]= left [ matrix {
"20" {} ##
1
} right ]} {} [ C K ] = [ 3 11 ] size 12{ left [ matrix {
C {} ##
K
} right ]= left [ matrix {
3 {} ##
"11"
} right ]} {} [
_ N ] = [ 27 14 ] size 12{ left [ matrix {
_ {} ##
N
} right ]= left [ matrix {
"27" {} ##
"14"
} right ]} {} [ O W ] = [ 15 23 ] size 12{ left [ matrix {
O {} ##
W
} right ]= left [ matrix {
"15" {} ##
"23"
} right ]} {}
So at this stage, our message expressed as
2 × 1 size 12{2 times 1} {} matrices is as follows.
[ 1 20 ] [ 20 1 ] [ 3 11 ] [ 27 14 ] [ 15 23 ] size 12{ left [ matrix {
1 {} ##
"20"
} right ] left [ matrix {
"20" {} ##
1
} right ] left [ matrix {
3 {} ##
"11"
} right ] left [ matrix {
"27" {} ##
"14"
} right ] left [ matrix {
"15" {} ##
"23"
} right ]} {}
Now to encode, we multiply, on the left, each matrix of our message by the matrix A. For example, the product of A with our first matrix is
[ 1 2 1 3 ] [ 1 20 ] = [ 41 61 ] size 12{ left [ matrix {
1 {} # 2 {} ##
1 {} # 3{}
} right ] left [ matrix {
1 {} ##
"20"
} right ]= left [ matrix {
"41" {} ##
"61"
} right ]} {}
By multiplying each of the matrices in ( I ) by the matrix A, we get the desired coded message given below.
[ 41 61 ] [ 22 23 ] [ 25 36 ] [ 55 69 ] [ 61 84 ] size 12{ left [ matrix {
"41" {} ##
"61"
} right ] left [ matrix {
"22" {} ##
"23"
} right ] left [ matrix {
"25" {} ##
"36"
} right ] left [ matrix {
"55" {} ##
"69"
} right ] left [ matrix {
"61" {} ##
"84"
} right ]} {}
Example 32
Decode the following message that was encoded using matrix
A = [ 1 2 1 3 ] size 12{A= left [ matrix {
1 {} # 2 {} ##
1 {} # 3{}
} right ]} {} .
[ 21 26 ] [ 37 53 ] [ 45 54 ] [ 74 101 ] [ 53 69 ] size 12{ left [ matrix {
"21" {} ##
"26"
} right ] left [ matrix {
"37" {} ##
"53"
} right ] left [ matrix {
"45" {} ##
"54"
} right ] left [ matrix {
"74" {} ##
"101"
} right ] left [ matrix {
"53" {} ##
"69"
} right ]} {}
Since this message was encoded by multiplying by the matrix A in Example 31 , we decode this message by first multiplying each matrix, on the left, by the inverse of matrix A given below.
A − 1 = [ 3 − 2 − 1 1 ] size 12{A rSup { size 8{ - 1} } = left [ matrix {
3 {} # - 2 {} ##
- 1 {} # 1{}
} right ]} {}
For example,
[ 3 − 2 − 1 1 ] [ 21 26 ] = [ 11 5 ] size 12{ left [ matrix {
3 {} # - 2 {} ##
- 1 {} # 1{}
} right ] left [ matrix {
"21" {} ##
"26"
} right ]= left [ matrix {
"11" {} ##
5
} right ]} {}
By multiplying each of the matrices in ( II ) by the matrix
A − 1 size 12{A rSup { size 8{ - 1} } } {} , we get the following.
[ 11 5 ] [ 5 16 ] [ 27 9 ] [ 20 27 ] [ 21 16 ] size 12{ left [ matrix {
"11" {} ##
5
} right ] left [ matrix {
5 {} ##
"16"
} right ] left [ matrix {
"27" {} ##
9
} right ] left [ matrix {
"20" {} ##
"27"
} right ] left [ matrix {
"21" {} ##
"16"
} right ]} {}
Finally, by associating the numbers with their corresponding letters, we obtain the following.
[
K
E
]
[
E
P
]
[
_
I
]
[
T
_ ] [ U P ] size 12{ left [ matrix {
K {} ##
E
} right ] left [ matrix {
E {} ##
P
} right ] left [ matrix {
_ {} ##
I
} right ] left [ matrix {
T {} ##
_
} right ] left [ matrix {
U {} ##
P
} right ]} {}
And the message reads: KEEP IT UP.
Now suppose we wanted to use a
3 × 3 size 12{3 times 3} {} matrix to encode a message, then instead of dividing the letters into groups of two, we would divide them into groups of three.
Example 33
Using the matrix
B = [ 1 1 − 1 1 0 1 2 1 1 ] size 12{B= left [ matrix {
1 {} # 1 {} # - 1 {} ##
1 {} # 0 {} # 1 {} ##
2 {} # 1 {} # 1{}
} right ]} {} , encode the message: ATTACK NOW!
We divide the letters of the message into groups of three.
ATT ACK –NO W––
Note that since the single letter "W" was left over on the end, we added two spaces to make it into a triplet.
Now we assign the numbers their corresponding letters from the table, and convert each triplet of numbers into
3 × 1 size 12{3 times 1} {} matrices. We get
[ A T T ] = [ 1 20 20 ] size 12{ left [ matrix {
A {} ##
T {} ##
T
} right ]= left [ matrix {
1 {} ##
"20" {} ##
"20"
} right ]} {} [ A C K ] = [ 1 3 11 ] size 12{ left [ matrix {
A {} ##
C {} ##
K
} right ]= left [ matrix {
1 {} ##
3 {} ##
"11"
} right ]} {} [
_ N O ] = [ 27 14 15 ] size 12{ left [ matrix {
_ {} ##
N {} ##
O
} right ]= left [ matrix {
"27" {} ##
"14" {} ##
"15"
} right ]} {} [
W
_
_ ] = [ 23 27 27 ] size 12{ left [ matrix {
W {} ##
_ {} ##
_
} right ]= left [ matrix {
"23" {} ##
"27" {} ##
"27"
} right ]} {}
So far we have,
[ 1 20 20 ] [ 1 3 11 ] [ 27 14 15 ] [ 23 27 27 ] size 12{ left [ matrix {
1 {} ##
"20" {} ##
"20"
} right ] left [ matrix {
1 {} ##
3 {} ##
"11"
} right ] left [ matrix {
"27" {} ##
"14" {} ##
"15"
} right ] left [ matrix {
"23" {} ##
"27" {} ##
"27"
} right ]} {}
We multiply, on the left, each matrix of our message by the matrix B. For example,
[ 1 1 − 1 1 0 1 2 1 1 ] [ 1 20 20 ] = [ 1 21 42 ] size 12{ left [ matrix {
1 {} # 1 {} # - 1 {} ##
1 {} # 0 {} # 1 {} ##
2 {} # 1 {} # 1{}
} right ] left [ matrix {
1 {} ##
"20" {} ##
"20"
} right ]= left [ matrix {
1 {} ##
"21" {} ##
"42"
} right ]} {}
By multiplying each of the matrices in ( III ) by the matrix B, we get the desired coded message as follows:
[ 1 21 42 ] [ − 7 12 16 ] [ 26 42 83 ] [ 23 50 100 ] size 12{ left [ matrix {
1 {} ##
"21" {} ##
"42"
} right ] left [ matrix {
- 7 {} ##
"12" {} ##
"16"
} right ] left [ matrix {
"26" {} ##
"42" {} ##
"83"
} right ] left [ matrix {
"23" {} ##
"50" {} ##
"100"
} right ]} {}
If we need to decode this message, we simply multiply the coded message by
B − 1 size 12{B rSup { size 8{ - 1} } } {} , and associate the numbers with the corresponding letters of the alphabet.
Example 34
Decode the following message that was encoded using matrix
B = [ 1 1 − 1 1 0 1 2 1 1 ] size 12{B= left [ matrix {
1 {} # 1 {} # - 1 {} ##
1 {} # 0 {} # 1 {} ##
2 {} # 1 {} # 1{}
} right ]} {} .
[ 11 20 43 ] [ 25 10 41 ] [ 22 14 14 ] size 12{ left [ matrix {
"11" {} ##
"20" {} ##
"43"
} right ] left [ matrix {
"25" {} ##
"10" {} ##
"41"
} right ] left [ matrix {
"22" {} ##
"14" {} ##
"14"
} right ]} {}
Since this message was encoded by multiplying by the matrix B. We first determine inverse of B.
B − 1 = [ 1 2 − 1 − 1 − 3 2 − 1 − 1 1 ] size 12{B rSup { size 8{ - 1} } = left [ matrix {
1 {} # 2 {} # - 1 {} ##
- 1 {} # - 3 {} # 2 {} ##
- 1 {} # - 1 {} # 1{}
} right ]} {}
To decode the message, we multiply each matrix, on the left, by
B − 1 size 12{B rSup { size 8{ - 1} } } {} . For example,
[ 1 2 − 1 − 1 − 3 2 − 1 − 1 1 ] [ 11 20 43 ] = [ 8 15 12 ] size 12{ left [ matrix {
1 {} # 2 {} # - 1 {} ##
- 1 {} # - 3 {} # 2 {} ##
- 1 {} # - 1 {} # 1{}
} right ] left [ matrix {
"11" {} ##
"20" {} ##
"43"
} right ]= left [ matrix {
8 {} ##
"15" {} ##
"12"
} right ]} {}
By multiplying each of the matrices in ( IV ) by the matrix
B − 1 size 12{B rSup { size 8{ - 1} } } {} , we get the following.
[ 8 15 12 ] [ 4 27 6 ] [ 9 18 5 ] size 12{ left [ matrix {
8 {} ##
"15" {} ##
"12"
} right ] left [ matrix {
4 {} ##
"27" {} ##
6
} right ] left [ matrix {
9 {} ##
"18" {} ##
5
} right ]} {}
Finally, by associating the numbers with their corresponding letters, we obtain the following.
[ H O L ] [ D F ] [ I R E ] size 12{ left [ matrix {
H {} ##
O {} ##
L
} right ] left [ matrix {
D {} ##
_ {} ##
F
} right ] left [ matrix {
I {} ##
R {} ##
E
} right ]} {}
And the message reads: HOLD FIRE.
We summarize.
Example 35
Divide the letters of the message into groups of two or three. Convert each group into a string of numbers by assigning a number to each letter of the message. Remember to assign letters to blank spaces. Convert each group of numbers into column matrices. Convert these column matrices into a new set of column matrices by multiplying them with a compatible square matrix of your choice that has an inverse. This new set of numbers or matrices represents the coded message. Take the string of coded numbers and multiply it by the inverse of the matrix that was used to encode the message. Associate the numbers with their corresponding letters. Applications – Leontief Models In the 1930's, Wassily Leontief used matrices to model economic systems. His models, often referred to as the input-output models, divide the economy into sectors where each sector produces goods and services not only for itself but also for other sectors. These sectors are dependent on each other and the total input always equals the total output. In 1973, he won the Nobel Prize in Economics for his work in this field. In this section we look at both the closed and the open models that he developed.
The Closed Model As an example of the closed model, we look at a very simple economy, where there are only three sectors: food, shelter, and clothing.
Example 36
We assume that in a village there is a farmer, carpenter, and a tailor, who provide the three essential goods: food, shelter, and clothing. Suppose the farmer himself consumes 40% of the food he produces, and gives 40% to the carpenter, and 20% to the tailor. Thirty percent of the carpenter's production is consumed by himself, 40% by the farmer, and 30% by the carpenter. Fifty percent of the tailor's production is used by himself, 30% by the farmer, and 20% by the tailor. Write the matrix that describes this closed model.
The table below describes the above information.
In a matrix form it can be written as follows.
A = [ . 40 . 40 . 30 . 40 . 30 . 20 . 20 . 30 . 50 ] size 12{A= left [ matrix {
"." "40" {} # "." "40" {} # "." "30" {} ##
"." "40" {} # "." "30" {} # "." "20" {} ##
"." "20" {} # "." "30" {} # "." "50"{}
} right ]} {}
This matrix is called the input-output matrix . It is important that we read the matrix correctly. For example the entry
A 23 size 12{A rSub { size 8{"23"} } } {} , the entry in row 2 and column 3, represents the following.
A 23 = 20 % size 12{A rSub { size 8{"23"} } ="20"%} {} of the tailor's production is used by the carpenter.
A 33 = 50 % size 12{A rSub { size 8{"33"} } ="50"%} {} of the tailor's production is used by the tailor.
Example 37
In Example 36 above, how much should each person get for his efforts?
We choose the following variables.
x = Farmer's pay size 12{x="Farmer's pay"} {}
y = Carpenter's pay size 12{y=" Carpenter's pay"} {}
z = Tailor's pay size 12{z=" Tailor's pay"} {}
As we said earlier, in this model input must equal output. That is, the amount paid by each equals the amount received by each.
Let us say the farmer gets paid
x size 12{x} {} dollars. Let us now look at the farmer's expenses. The farmer uses up 40% of his own production, that is, of the
x size 12{x} {} dollars he gets paid, he pays himself
. 40 x size 12{ "." "40"x} {} dollars, he pays
. 40 y size 12{ "." "40"y} {} dollars to the carpenter, and
. 30 z size 12{ "." "30"z} {} to the tailor. Since the expenses equal the wages, we get the following equation.
x = . 40 x + . 40 y + . 30 z size 12{x= "." "40"x+ "." "40"y+ "." "30"z} {}
In the same manner, we get
y = . 40 x + . 30 y + . 20 z size 12{y= "." "40"x+ "." "30"y+ "." "20"z} {}
z = . 20 x + . 30 y + . 50 z size 12{z= "." "20"x+ "." "30"y+ "." "50"z} {}
The above system can be written as
[ x y z ] = [ . 40 . 40 . 30 . 40 . 30 . 20 . 20 . 30 . 50 ] [ x y z ] size 12{ left [ matrix {
x {} ##
y {} ##
z
} right ]= left [ matrix {
"." "40" {} # "." "40" {} # "." "30" {} ##
"." "40" {} # "." "30" {} # "." "20" {} ##
"." "20" {} # "." "30" {} # "." "50"{}
} right ] left [ matrix {
x {} ##
y {} ##
z
} right ]} {}
This system is often referred to as
X = AX size 12{X= ital "AX"} {}
Simplification results in
. 60 x − . 40 y − . 30 z = 0 size 12{ "." "60"x - "." "40"y - "." "30"z=0} {}
− . 40 x + . 70 y − . 20 z = 0 size 12{ - "." "40"x+ "." "70"y - "." "20"z=0} {}
− . 20 x − . 30 y + . 50 z = 0 size 12{ - "." "20"x - "." "30"y+ "." "50"z=0} {}
Solving for
x size 12{x} {} ,
y size 12{y} {} , and
z size 12{z} {} using the Gauss-Jordan method, we get
x = 29 26 t size 12{x= { {"29"} over {"26"} } t} {} y = 12 13 t size 12{y= { {"12"} over {"13"} } t} {} and
z = t size 12{z=t} {}
Since we are only trying to determine the proportions of the pay, we can choose t to be any value. Suppose we let
t = $ 2600 size 12{t=$"2600"} {} , then we get
x = $ 2900 size 12{x=$"2900"} {} y = $ 2400 size 12{y=$"2400"} {} and
z = $ 2600 size 12{z=$"2600"} {}
The Open Model
The open model is more realistic, as it deals with the economy where sectors of the economy not only satisfy each others needs, but they also satisfy some outside demands. In this case, the outside demands are put on by the consumer. But the basic assumption is still the same; that is, whatever is produced is consumed.
Let us again look at a very simple scenario. Suppose the economy consists of three people, the farmer
F size 12{F} {} , the carpenter
C size 12{C} {} , and the tailor
T size 12{T} {} . A part of the farmer's production is used by all three, and the rest is used by the consumer. In the same manner, a part of the carpenter's and the tailor's production is used by all three, and rest is used by the consumer.
Let us assume that whatever the farmer produces, 20% is used by him, 15% by the carpenter, 10% by the tailor, and the consumer uses the other 40 billion dollars worth of the food. Ten percent of the carpenter's production is used by him, 25% by the farmer, 5% by the tailor, and 50 billion dollars worth by the consumer. Fifteen percent of the clothing is used by the tailor, 10% by the farmer, 5% by the carpenter, and the remaining 60 billion dollars worth by the consumer. We write the internal consumption in the following table, and express the demand as the matrix D.
The consumer demand for each industry in billions of dollars is given below.
D = [ 40 50 60 ] size 12{D= left [ matrix {
"40" {} ##
"50" {} ##
"60"
} right ]} {}
Example 38
In Example 37 , what should be, in billions of dollars, the required output by each industry to meet the demand given by the matrix D?
We choose the following variables.
x = Farmer's output size 12{x="Farmer's output"} {}
y = Carpenter's output size 12{y=" Carpenter's output"} {}
z = Tailor's output size 12{z=" Tailor's output"} {}
In the closed model, our equation was
X = AX size 12{X = ital "AX"} {} , that is, the total input equals the total output. This time our equation is similar with the exception of the demand by the consumer.
So our equation for the open model should be
X = AX + D size 12{X= ital "AX"+D} {} , where
D size 12{D} {} represents the demand matrix. We express it as follows:
X = AX + D size 12{X= ital "AX"+D} {}
[ x y z ] = [ . 20 . 25 . 10 . 15 . 10 . 05 . 10 . 05 . 15 ] [ x y z ] + [ 40 50 60 ] size 12{ left [ matrix {
x {} ##
y {} ##
z
} right ]= left [ matrix {
"." "20" {} # "." "25" {} # "." "10" {} ##
"." "15" {} # "." "10" {} # "." "05" {} ##
"." "10" {} # "." "05" {} # "." "15"{}
} right ] left [ matrix {
x {} ##
y {} ##
z
} right ]+ left [ matrix {
"40" {} ##
"50" {} ##
"60"
} right ]} {}
To solve this system, we write it as
X = AX + D size 12{X= ital "AX"+D} {}
( I − A ) X = D size 12{ left (I - A right )X=D} {}
where I is a 3 by 3 identity matrix
X = ( I − A ) − 1 D size 12{X= left (I - A right ) rSup { size 8{ - 1} } D} {}
I − A = [ . 80 − . 25 − . 10 − . 15 . 90 − . 05 − . 10 − . 05 . 85 ] size 12{I - A= left [ matrix {
"." "80" {} # - "." "25" {} # - "." "10" {} ##
- "." "15" {} # "." "90" {} # - "." "05" {} ##
- "." "10" {} # - "." "05" {} # "." "85"{}
} right ]} {}
( I − A ) − 1 = [ 1 . 3445 . 3835 . 1807 . 2336 1 . 1814 . 097 . 1719 . 1146 1 . 2034 ] size 12{ left (I - A right ) rSup { size 8{ - 1} } = left [ matrix {
1 "." "3445" {} # "." "3835" {} # "." "1807" {} ##
"." "2336" {} # 1 "." "1814" {} # "." "097" {} ##
"." "1719" {} # "." "1146" {} # 1 "." "2034"{}
} right ]} {}
X = [ 1 . 3445 . 3835 . 1807 . 2336 1 . 1814 . 097 . 1719 . 1146 1 . 2034 ] [ 40 50 60 ] size 12{X= left [ matrix {
1 "." "3445" {} # "." "3835" {} # "." "1807" {} ##
"." "2336" {} # 1 "." "1814" {} # "." "097" {} ##
"." "1719" {} # "." "1146" {} # 1 "." "2034"{}
} right ] left [ matrix {
"40" {} ##
"50" {} ##
"60"
} right ]} {}
X = [ 83 . 7999 74 . 2341 84 . 8138 ] size 12{X= left [ matrix {
"83" "." "7999" {} ##
"74" "." "2341" {} ##
"84" "." "8138"
} right ]} {}
Therefore, the three industries must produce the following amount of goods in billions of dollars.
Farmer = $ 83 . 7999 size 12{"Farmer"=$"83" "." "7999"} {} Carpenter = $ 74 . 2341 size 12{"Carpenter"=$"74" "." "2341"} {} Tailor = $ 84 . 813 size 12{"Tailor"=$"84" "." "813"} {}
We will do one more problem like the one above, except this time we give the amount of internal and external consumption in dollars and ask for the proportion of the amounts consumed by each of the industries. In other words, we ask for the matrix A.
Example 39
Suppose an economy consists of three industries
F size 12{F} {} ,
C size 12{C} {} , and
T size 12{T} {} . Again, each of the industries produces for internal consumption among themselves, as well as, the external demand by the consumer. The following table gives information about the use of each industry's production in dollars.
The first row says that of the $250 dollars worth of production by the industry
F size 12{F} {} , $40 is used by
F size 12{F} {} , $50 is used by
C size 12{C} {} , $60 is used by
T size 12{T} {} , and the remainder of $100 is used by the consumer. The other rows are described in a similar manner.
Find the proportion of the amounts consumed by each of the industries. In other words, find the matrix A.
Once again, the total input equals the total output.
We are being asked to determine the following:
How much of the production of each of the three industries,
F size 12{F} {} ,
C size 12{C} {} , and
T size 12{T} {} is required to produce one unit of
F size 12{F} {} ? In the same way, how much of the production of each of the three industries,
F size 12{F} {} ,
C size 12{C} {} , and
T size 12{T} {} is required to produce one unit of
C size 12{C} {} ? And finally, how much of the production of each of the three industries,
F size 12{F} {} ,
C size 12{C} {} , and
T size 12{T} {} is required to produce one unit of
T size 12{T} {} ?
Since we are looking for proportions, we need to divide the production of each industry by the total production for each industry.
We analyze as follows:
To produce 250 units of
F size 12{F} {} , we need to use 40 units of
F size 12{F} {} , 30 units of
C size 12{C} {} , and 20 units of
T size 12{T} {} .
Therefore, to produce 1 unit of
F size 12{F} {} , we need to use 40/250 units of
F size 12{F} {} , 30/250 units of
C size 12{C} {} , and 20/250 units of
T size 12{T} {} .
To produce 220 units of
C size 12{C} {} , we need to use 50 units of
F size 12{F} {} , 40 units of
C size 12{C} {} , and 30 units of
T size 12{T} {} .
Therefore, to produce 1 unit of
C size 12{C} {} , we need to use 50/220 units of
F size 12{F} {} , 40/220 units of
C size 12{C} {} , and 30/220 units of
T size 12{T} {} .
To produce 200 units of
T size 12{T} {} , we need to use 60 units of
F size 12{F} {} , 40 units of
C size 12{C} {} , and 30 units of
T size 12{T} {} .
Therefore, to produce 1 unit of
T size 12{T} {} , we need to use 60/200 units of
F size 12{F} {} , 40/200 units of
C size 12{C} {} , and 30/200 units of
T size 12{T} {} .
We obtain the following matrix.
A = [ 40 / 250 50 / 220 60 / 200 30 / 250 40 / 220 40 / 220 20 / 250 30 / 220 30 / 220 ] size 12{A= left [ matrix {
"40"/"250" {} # "50"/"220" {} # "60"/"200" {} ##
"30"/"250" {} # "40"/"220" {} # "40"/"220" {} ##
"20"/"250" {} # "30"/"220" {} # "30"/"220"{}
} right ]} {}
or
A = [ . 1600 . 2273 . 3000 . 1200 . 1818 . 2000 . 0800 . 1364 . 1500 ] size 12{A= left [ matrix {
"." "1600" {} # "." "2273" {} # "." "3000" {} ##
"." "1200" {} # "." "1818" {} # "." "2000" {} ##
"." "0800" {} # "." "1364" {} # "." "1500"{}
} right ]} {}
Clearly
AX + D = X size 12{ ital "AX"+D=X} {}
[ 40 / 250 50 / 220 60 / 200 30 / 250 40 / 220 40 / 200 20 / 250 30 / 220 30 / 200 ] [ 250 220 200 ] + [ 100 110 120 ] = [ 250 220 200 ] size 12{ left [ matrix {
"40"/"250" {} # "50"/"220" {} # "60"/"200" {} ##
"30"/"250" {} # "40"/"220" {} # "40"/"200" {} ##
"20"/"250" {} # "30"/"220" {} # "30"/"200"{}
} right ] left [ matrix {
"250" {} ##
"220" {} ##
"200"
} right ]+ left [ matrix {
"100" {} ##
"110" {} ##
"120"
} right ]= left [ matrix {
"250" {} ##
"220" {} ##
"200"
} right ]} {}
We summarize as follows:
Adapted from Applied Finite Mathematics by Rupinder Sekhon (De Anza College), originally published by OpenStax CNX (cnx.org, collection col10613), licensed under CC BY 3.0. Changes were made. License: CC-BY-3.0 .