Chapter 8
Matrices and Determinants
Matrix Solutions to Linear Systems
A matrix gives us a shortened way of writing a system of equations. The first step in solving a system of linear equations using matrices is to write the augmented matrix. An augmented matrix has a vertical bar separating the columns of the matrix into two groups. The coefficients of each variable are placed to the left of the vertical line, and the constants are placed to the right. If any variable is missing, its coefficient is 0. Here are two examples.
252311921131213
25=2z+3y+x19=2z+y+x31=2z+y+3x
41009310
-19-521
25=z19=3z+y31=5z–2y+x
Solving Linear Systems by Using Matrices
Example
2134
6503
2132
Write the augmented matrix for the following system:
2x-3y+z = -23x-5z = 64x-3y+z = 2
Solution:
Write the solution set for a system of equations represented by the matrix
41009310
-19-521
Solution The system represented by the matrix is
This system can be simplified as follows.
41009310
-19-521 1x + 2y – 5z = -190x + 1y + 3z = 90x + 0y + 1z = 4
x + 2y – 5z = -19 y + 3z = 9 z = 4
Equation 1Equation 2
Equation 3
Text Example
Solution
y + 3z = 9 Equation 2
y + 3(4) = 9 Substitute 4 for z.
y + 12 = 9 Multiply.
y = -3 Subtract 12 from both sides.
The value of z is known. We can find y by back-substitution.
With values for y and z, we can now use back-substitution to find x.
We see that x = 7, y = -3, and z = 4. The solution set for the system is {(7, -3, 4)}.
x + 2y – 5z = -19 Equation 1
x + 2(-3) – 5(4) = -19 Substitute -3 for y and 4 for z.
x – 6 – 20 = -19 Multiply.
x – 26 = -19 Add.
x = 7 Add 26 to both sides.
Text Example cont.
Matrix Row Operations• These row operations produce matrices that lead to systems with the
same solution set as the original system.1. Two rows of a matrix may be interchanged. This is the same as
interchanging two equations in the linear system.2. The elements in any row may be multiplied by a nonzero number.
This is the same as multiplying both sides of an equation by a nonzero number.
3. The elements in any row may be multiplied by a nonzero number, and these products may be added to the corresponding elements in any other row. This is the same as multiplying both sides of an equation by a nonzero number and then adding equations to eliminate a variable.
• Two matrices are row equivalent if one can be obtained from the other by a sequence of row operations.
Use the matrix
And perform each indicated row operation:a. R1 R2 b. 3R1 c. 2R2 + R3
-64-3-25-321
21-12183
Solution
a. The notation R1 R2 means to interchange the elements in row 1 and row 2. This results in the row-equivalent matrix.
-64-3-221-121835-321 This was row 2; now it’s row 1.
This was row 1; now it’s row 2.
Text Example
Solution
b. The notation 3R1 means to multiply each element in row 1 by 3. This results in the row-equivalent matrix.
-64-3-221-121833•53•(-3)3•23•1
-64-3-221-121835-321
= .
c. The notation 2R2 + R3 means to add 2 times the elements in row 2 to the corresponding elements in row 3. Replace the elements in row 3 by these sums. First, we find 2 times the elements in row 2:
2(1) or 2, 2(2) or 4, 2(-3) or –6, 2(5) or 10.Now we add these products to the corresponding elements in row 3. Although we use row 2 to find the products, row 2 does not change. It is the elements in row 3 that change, resulting in the row-equivalent matrix
4-2105-321
21-12183
-6+104-6 -3+4-2+221-121835-321
=
Text Example cont.
Solving Linear Systems Using Gaussian Elimination
• Write the augmented matrix for the system
• Use matrix row operations to simplify the matrix to one with 1s down the diagonal from upper left to lower right, and 0s below the 1s
• Write the system of linear equations corresponding to the matrix in step 2, and use back-substitution to find the system’s solutions
Use matrices to solve the system
25=2z+3y+x19=2z+y+x31=2z+y+3x
SolutionStep 1 Write the augmented matrix for the system.
Linear System Augmented Matrix
25=2z+3y+x19=2z+y+x31=2z+y+3x
252311921131213
Text Example
SolutionStep 2 Use matrix row operations to simplify the matrix to one with 1s down the diagonal from upper left to lower right, and 0s below the 1s. Our goal is to obtain a matrix of the form
f100ed10cba1
.
Our first step in achieving this goal is to get 1 in the top position of the first column.
252311921131213
To get 1 in this position, we interchange rows 1 and 2. (We could also interchange rows 1 and 3 to attain our goal.)
252313121319211 This was row 2; now it’s row 1.
This was row 1; now it’s row 2.
We want 1 in this position.
Text Example cont.
SolutionNow we want to get 0s below the 1 in the first column.
252313121319211
Now add these products to the corresponding numbers in row 2. Notice that although we use row 1 to find the products, row 1 does not change.
We want 0 in these positions.
Let’s first get a 0 where there is now a 3. If we multiply the top row of numbers by –3 and add these products to the second row of numbers, we will get 0 in this position. The top row of numbers multiplied by –3 gives
-3(1) or –3, -3(1) or –3, -3(2) or –6, -3(19) or –57.
2523131 + (-3)2 + (-3)1 + (-3)3 + (-3)
19211
25231-26-4-2019211
=
We want 0 in this position.
Text Example cont.
Solution
Now add these products to the corresponding numbers in row 3.
We are not yet done with the first column. If we multiply the top row of numbers by –1 and add these products to the third row of numbers, we will get 0 in this position. The top row of numbers multiplied by –1 gives
-1(1) or –1, -1(1) or –1, -1(2) or –2, -1(19) or –19.
25+(-19)2 + (-2)3 + (-1)1 + (-1)-26-4-2019211
6020-26-4-2019211
=
We want 1 in this position.
6020-26-4-2019211
We move on to the second column. We want 1 in the second row, second column.
Text Example cont.
SolutionTo get 1 in the desired position, we multiply –2 by its reciprocal, -1/2. Therefore, we multiply all the numbers in the second row by –1/2 to get
6020› (-26)› (-4)› (-2)› (0)
19211
60201321019211
=
We want 0 in this position.
Now add these products to the corresponding numbers in row 3.
We are not yet done with the second column. If we multiply the top row of numbers by –2 and add these products to the third row of numbers, we will get 0 in this position. The second row of numbers multiplied by –2 gives
-2(0) or 0, -2(1) or –2, -2(2) or –4, -2(13) or –26.
6+(-26)0 + (-4)2 + (-2)0 + 01321019211
-20-4001321019211
=
Text Example cont.
Solution
We want 1 in this position.
-20-4001321019211
We move on to the third column. We want 1 in the third row, third column.
To get 1 in the desired position, we multiply –4 by its reciprocal, -1/4. Therefore, we multiply all the numbers in the third row by –1/4 to get
-1/4(-20)-1/4(-4)-1/4(0)-1/4(0)1321019211
51001321019211
=
We now have the desired matrix with 1s down the diagonal and 0s below the 1s.
Step 3 Write the system of linear equations corresponding to the matrix in step 2, and use back-substitution to find the system’s solution. The system represented by the matrix in step 2 is
Text Example cont.
Solution
We immediately see that the value for z is 5. To find y, we back-substitute 5 for z in the second equation.
5=z13=2z+y19=2z+y+x
252311921131213
y + 2z = 13 Equation 2
y + 2(5) = 13 Substitute 5 for x.
y = 3 Solve for y.
Finally, back-substitute 3 for y and 5 for z in the first equation:
x + y + 2z = 19 Equation 1
x + 3 + 2(5) = 19 Substitute 3 for y and 5 for x.
x + 13 = 19 Multiply and add.
x = 6 Subtract 13 from both sides.
The solution set for the original system is {(6, 3, 5)}.
Text Example cont.
Solving Linear Systems Using Gauss-Jordan Elimination
1. Write the augmented matrix for the system.
2. Use matrix row operations to simplify the matrix to one with 1s down the diagonal from upper left to lower right, and 0s above and below the 1s.
3. Use the reduced row-echelon form of the matrix in step 2 to write the system’s solutions set. (Back-substitution is not necessary.)
Inconsistent and Dependent Systems
and Their Applications
Use Gaussian elimination to solve the system
12=7z+4y–3x5=6z+3y–2x2=2z–y–x
124-4356-322-2-11
12=4z+4y–3x5=6z+3y–2x2=2z–y–x
Solution
Step 1 Write the augmented matrix for the system.
Linear System Augmented Matrix
Text Example
SolutionStep 2 Attempt to simplify the matrix to one with 1s down the diagonal and 0s below the 1s. Notice that the augmented matrix already has a 1in the top position of the first column. Now we want 0s below the 1. To get the first 0, multiply row 1 by 2 and add these products to row 2. To get the second 0, multiply row 1 by 3 and add these products to row 3. Performing these operations, we obtain the following matrix.
610-10110-102-2-11We
want 1 in this positio
n.
Use the Previous matrix and:
Replace row 2 by -2R1 + R2.
Replace row 3 by -3R1 + R3.
Text Example cont.
SolutionStep 2 Moving on to the second column, we obtain 1 in the desired position by multiplying row 2 by 1.
Text Example cont.
1 1 2
1(0) 1( 1) 1(10)
0 1 10
2
1(1)
6
1 1 2
0 1 10
0 1 10
2
1
6
It is impossible to convert this last matrix to the desired form of 1s down the main diagonal. If we translate the last row back into equation form, we get
0x 0y 0z 5,
which is false. Regardless of which values we select for x, y, and z, the last equation can never be a true statement. Consequently, the system has no solution. The solution set is , the empty set.
SolutionNow we want a 0 below the 1 in column 2. To get the 0, multiply row 2 by 1 and add these products to row 3. (Equivalently, add row 2 to row 3.) We obtain the following matrix.
1 1 2
0 1 10
0 0 0
2
1
5
Text Example cont.
Up to this point, we have encountered only square systems in which the number of equations is equal to the number of variables. In a nonsquare system, the number of variables differs from the number of equations.
Nonsquare Systems
ExampleUse Gaussian elimination to solve the following
system: 3x-y+z = 2
2x+3y-z = 7 z = t
Solution:
First, write the system in augmented matrix form:
t100
7132
2113
Example cont.
t100
7132
2113
• (1/3)R1
t100
7132
3/23/13/11
Example cont.
t100
7132
3/23/13/11
• -2R1 + R2
t100
3/173/53/110
3/23/13/11
Example cont.
t100
3/173/53/110
3/23/13/11
• 3/11 R2
t100
11/1711/510
3/23/13/11
Example cont.
x - (1/3)y + (1/3)z = 2/3y - (5/11)z = 17/11z = t
y - (5/11)t = 17/11
y =
11
517 t
x - (1/3)(17+5t)/11 + (1/3)t = 2/333x - 17 - 5t + 11t = 2233x + 6t = 3933x = 39 - 6t
11
213
33
639 ttx
11
213 tx
11
517 ty
tz
Use Gaussian elimination to solve the system
8=z+2y+x26=6z+7y+3x
Text Example
Solution We begin with the augmented matrix.
Because we now have 1s down the diagonal that begins with the upperleft
entry and a 0 below this 1, we translate the matrix back into equation form.
x 2y z 8 Equation 1
y 3z 2 Equation 2
3 7 6
1 2 1
26
8
1 2 1
3 7 6
8
26
1 2 1
0 1 3
8
2
We can let z equal any real number and use backsubstitution to express x and y in terms of z.
Equation 2 Equation 1
y 3z 2 x 2y z 8y 3z 2 x 2(3z 2) z 8
x 6z 4 z 8 x 5z 4 8
x 5z 4
Solution
Text Example cont.
With z = t, the ordered solution (x, y, z) enables us to express the system's solution set as
{(5t 4, 3t 2, t)}
where t is any real number.
Solution
Text Example cont.
Matrix Operations and Their
Applications
We have seen that an array of numbers, arranged in rows and columns and placed in brackets, is called a matrix. We can represent the matrix in two different ways.
• A capital letter, such as A, B, or C, can denote a matrix.• A lowercase letter enclosed in brackets, such as that shown below, can
denote a matrix.
A [aij]
A general element in matrix A is denoted by aij. This refers to the element in the ith row and jth column. For example, a32 is the
element of A located in the third row, second column.
A matrix of order m X n has m rows and n columns. If m n, a matrix has the same number of rows as columns and is called a square matrix.
Matrix A with
elements ai j
Notations for Matrices
Let
a. What is the order of A?b. If A [aij], identify a23 and a12.
Solution
a. The matrix has 2 rows and 3 columns, so it is of order 2 X 3.
b. The element a23 is in the second row and third column. Thus, a23
1/5. The element a12 is in the first row and second column, and
consequently a12 2.
A 3 2 0
4 5 1/ 5
Text Example
Definition of Equality of Matrices
• Two matrices A and B are equal if and only if they have the same order m X n and aij = bij for i = 1, 2, …, m and j = 1, 2, …, n
Properties of Matrix Addition• If A, B, and C are m X n matrices and 0 is
an m X n zero matrix, then the following properties are true.
1. A+B = B+A Commutative Property
2. (A+B)+C = A+(B+C) Associative Property
3. A + 0 = 0 + A Additive Identity
4. A+(-A) = (-A) + A = 0 Additive Inverse
Example
131
012
504
312• Add the following matrices
Solution:
635
300
)1)5()3(014
031)1()2(2
131
012
504
312
Definition of Scalar Multiplication
If A [aij] is a matrix of order m X n and c is
a scalar, then the matrix cA is the m X n matrix given by
cA [caij].
This matrix is obtained by multiplying each element of A by the real number c. We call cA a scalar multiple of A.
AfindAIf 320
31
Example
Example cont.
60
93
2*30*3
3*31*3
20
313
320
31AfindAIf
Solution:
Properties of Scalar Multiplication
• If A and B are m X n matrices, and c and d scalars, then the following properties are true.
1. (cd)A = c(dA) Associative Property
2. 1A = A Scalar Identity Property
3. c(A+B) = cA + cB Distributive Property
4. (c+d)A = cA + dA Distributive Property
Definition of Matrix Multiplication: 2X2 Matrices
dhcfdgce
bhafbgae
hg
fe
dc
baAB
510
402
123
713
201
Example
• Find the product:
5*74*11*31*70*12*30*72*13*3
5*24*01*11*20*02*10*22*03*1
510
402
123
713
201
Example cont.Solution:
3 0 9
11 13 34
Definition of Matrix Multiplication
The product of an m X n matrix, A, and an n X p matrix, B, is an m X p matrix, AB, whose elements are found as follows. The element in the ith row and jth column of AB is found by multiplying the each element in the ith row of A by the corresponding element in the jth column of B and adding the products.
Properties of Matrix Multiplication
• (AB)C = A(BC) Associative Property
• A(B+C) = AB+AC
• (A+B)C = AC + BC Distributive Properties
• c(AB) = (cA)B Associative Property of Scalar Multiplication
Multiplicative Inverses of Matrices
and Matrix Equations
Definition of the Multiplicative Inverse of a Square Matrix
Let A be an n X n matrix. If there exists an n X n matrix A-1 such that
AA-1 = In and -1 A = In
then A -1 is the multiplicative inverse of A.
Show that B is the multiplicative inverse of A, where
A = and B =-523-1
1235
Text Example
Solution To show that B is the multiplicative inverse of A, we must find the products AB and BA. If B is the multiplicative inverse of A, then AB will be the multiplicative identity matrix and BA will be the multiplicative identity matrix. Because A and B are 2 X 2 matrices, n 2. Thus, we denote the multiplicative identity matrix as I2; it is also a 2 X 2
matrix. We must show that
AB I2 1 0
0 1
BA I2 1 0
0 1
Show that B is the multiplicative inverse of A, where
A = and B =-523-1
1235
Text Example cont.
SolutionLet’s first show AB=I2
Both products give the multiplicative identity matrix. Thus, B is the multiplicative inverse of A and we can designate B as A-1
AB 1 3
2 5
5 3
2 1
1(5) 3(2) 1(3) 3(1)
2(5) ( 5)(2) 1(3) ( 5)(1)
1 0
0 1
Let’s now show BA=I2
BA 5 3
2 1
1 3
2 5
5( 1) 3(2) 5(3) 3( 5)
2( 1) 1(2) 2(3) 1( 5)
1 0
0 1
5 3
2 1
Example
41
23A
• Find the multiplicative inverse of A.
Solution
wz
yxALet 1
10
01
41
231
wz
yxAA
10
01
4141
2323
wyzx
wyzx
Example cont.
41
23A
• Find the multiplicative inverse of A.
Solution
14
04
023
123
10
01
4141
2323
wy
zx
wy
zx
wyzx
wyzx
Example cont.
41
23A
• Find the multiplicative inverse of A.
Solution
1404
023123
wyzx
wyzx
)14(3)04(3
023123
wyzx
wyzx
31230123
023123
wyzx
wyzx
Example cont.
41
23A
• Find the multiplicative inverse of A.
Solution
10
3
10
1
310110
31230123
023123
wz
wz
wyzx
wyzx
Example cont.
41
23A
• Find the multiplicative inverse of A.
Solution
10
2
10
4
140410
3
10
1
yx
wyzx
wz
Multiplicative Inverse of a 2x2 Matrix
ac
bd
bcadA
thendc
baAIf
1
,
1
The matrix A is invertible if and only if ad-bc0. Ifad-bc=0, then A does not have a multiplicative inverse.
Procedure for Finding the Multiplicative Inverse of an Invertible Matrix
• To find A-1 for any n X n matrix A for which A-1 exists:
1. Form the augmented matrix [A | I ], where I is the multiplicative identity matrix of the same order as the given matrix A.
2. Perform row transformations on [A | I ] to obtain a matrix of the form [I | B ]. This is equivalent to using Gauss-Jordan elimination to change A into the identity matrix.
3. Matrix B is A-1.
4. Verify the result by showing that AA-1 I and A-1A I.
Solving a System Using A-1
• If AXB has a unique solution, X A-1B. To solve a linear system of equations, multiply A-1 and B to find X.
Solve the system by using A-1, the inverse of the coefficient matrix
Solution The linear system can be written as
1/2=3y–-2x2=z+2y2=z+ y–x
0-3-21-201-11
zyx
1/222
=
The solution is given by X A-1B. Consequently, we must find A-1. Using the inverse of matrix A that we found previously,
Thus, x 1/2, y -1/2, and z 1. The solution set is {(1/2, -1/2, 1)}.
X A 1B 3 3 1
0 2 1
2 3 0
2
2
1/ 2
1/ 2
1/ 2
1
Text Example
Encoding a Word or Message1. Express the word or message numerically.2. List the numbers in step 1 by columns and form a square
matrix. If you do not have enough numbers to form a square matrix, put zeros in any remaining spaces in the last column.
3. Select any square invertible matrix, called the coding matrix, the same size as the matrix in step 2. Multiply the coding matrix by the square matrix that expresses the message numerically. The resulting matrix is the coded matrix.
4. Use the numbers, by columns, from the coded matrix in step 3 to write the encoded message.
Decoding a Word or Message That Was Encoded
1. Find the multiplicative inverse of the coding matrix.
2. Multiply the multiplicative inverse of the coding matrix and the coded matrix.
3. Express the numbers, by columns, from the matrix in step 2 as letters.
Determinants and Cramer’s Rule
Definition of the Determinant of a 2 x 2 Matrix
122122
11 bababa
ba
We also say that the value of the second-order determinant is a1b2 – a2b1.
The determinant of the matrix is denoted by And is defined by
a1 b1
a2 b2
a1 b1
a2 b2
a1 b1
a2 b2
Example
50
23
• Evaluate the determinant of:
15015
2*05*350
23
Solution:
Solving a Linear System in Two Variables Using Determinants
22
11
22
11
22
11
22
11
222
111
ba
ba
ca
ca
yand
ba
ba
bc
bc
x
then
cybxa
cybxa
• Cramer’s Rule
Example
534
823
yx
yx• Use Cramer’s rule to solve the system:
Solution:
34
23
54
83
34
23
35
28
yandx
Example cont.
534
823
yx
yx• Use Cramer’s rule to solve the system:
Solution:
117
17
89
3215
)2(*43*3
)8(*4)5(*3
217
34
89
1024
)2(*43*3
)5(*)2(3*8
y
x
Definition of a Third-Order Determinant
123123123321321321
333
222
111
bacacbcbabacacbcba
cba
cba
cba
Definition of a 3 X 3 Matrix
• A third-order determinant is defined by
a1 b1 c1
a2 b2 c2
a3 b3 c3
a1
b2 c2
b3 c3
a2
b1 c1
b3 c3
a3
b1 c1
b2 c2
Evaluating the Determinant of a 3 X 3 Matrix
1. Each of the three terms in the definition contains two factors - a numerical factor and a second-order determinant.
2. The numerical factor in each term is an element from the first column of the third-order determinant.
3. The minus sign precedes the second term.4. The second-order determinant that appears in
each term is obtained by crossing out the row and the column containing the numerical factor.
Evaluate:
2410-3-2059
SolutionNote that the last column has two 0s. We will expand the determinant about the elements in that column.
9 5 0
2 3 0
1 4 2
0 2 3
1 4 0
9 5
1 4 2
9 5
2 3
0 0 2[9( 3) ( 2)(5)]
2( 27 10) 2( 17) 34
Text Example
Determinants: Inconsistent and Dependent-Systems
1. If D 0 and at least one of the determinants in the numerator is not 0, then the system is inconsistent. The solution set is Ø.
2. If D 0 and all the determinants in the numerators are 0, then the equations in the system are dependent.