Systems of Linear Equations and
3 Matrices
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-1
3.1 Basic Matrix Operations
What is a Matrix? ▪ Sizing a matrix▪ Special Matrices▪ Addition
and Subtraction of Matrices ▪ Scalar Multiplication
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-2
What is a matrix?
A Matrix is just rectangular array of items.
A typical matrix is a rectangular array of numbers
arranged in rows and columns.
21 62 33 93
A = 44 95 66 13
3x 4
77 38 79 33
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-3
Sizing a matrix
By convention matrices are “sized” using the
number of rows (m) by number of columns (n).
21 62 33 93 7 3 2
A = 44 95 66 13
B = 8 4 1
3x 4 3 x3
77 38 79 33 6 5 9
11 4
14 7
C = D = 17
4x2 16 8 1x1
22 3
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-4
“Special” Matrices
Square matrix: a square matrix is an mxn matrix in which m = n.
That is a matrix with equal number of rows and columns.
7 3 2
B = 8 4 1
3 x3
6 5 9
Vector: a vector is an mxn matrix where either m OR n = 1
(but not both).
If m = 1, it is a row vector 12
9
If n = 1, it is a column vector X= Y = 7 −22 14
4 x1 −4 1x 3
0
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-5
“Special” Matrices
Scalar: A scalar is an mxn matrix where BOTH m and n = 1.
D = 17
1x1 0 0
0 = 0 0
Zero matrix: A matrix of zeros.
3x2
0 0
Identity Matrix: A square (mxm) matrix with 1s on the
diagonal and zeros everywhere else. 1 0 0
I = 0 1 0
3 x3
0 0 1
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-6
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-7
Example1 Finding Values to Make Two Matrices Equal
Find the values of the variables for which each
statement is true, if possible.
(a)
Since corresponding elements are equal, a = –3,
b = 9, c = –5, and d = 0.
(b)
The statement cannot be true.
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-8
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-9
Example 2 Adding Matrices
Find each sum, if possible.
(a)
10 −13
=
6 0
−18
12
(b) =
0
7
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-10
Example 2 Adding Matrices (cont.)
(c) A + B if and
A and B cannot be added because A is a 2 × 3
matrix, while B is a 3 × 2 matrix.
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-11
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-12
Example 3 Subtracting Matrices
Find each difference, if possible.
(a)
16 −13
=
1 −9
−9
(b) = −15
12
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-13
Example 3 Subtracting Matrices (cont.)
(c) A – B if and
A – B is not possible because, A is a 2 × 3 matrix,
while B is a 2 × 2 matrix.
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-14
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-15
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-16
Example 4 Multiplying Matrices by Scalars
Find each product.
−6 15
(a) =
12 0
−20 8
(b) =
12 −36
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-17
Section 3.2 - Matrix Products and Inverses
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-18
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-19
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-20
Example 5 Deciding Whether Two Matrices Can Be Multiplied
Suppose C is a 2 × 5 matrix and D is a 4 × 2 matrix.
Can the product CD be calculated? If so, what size is it?
No, CD cannot be calculated.
Can the product DC be calculated? If so, what size is it?
Yes, DC can be calculated.
The result is a 4 × 5 matrix.
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-21
Example 6 Multiplying Matrices
Find each product, if possible.
(a) AB AB cannot be calculated.
(b) BA
A 2 × 2 matrix multiplied by a 2 × 3 matrix results in a
2 × 3 matrix.
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-22
Example 6 Multiplying Matrices (cont.)
13 −16 14
=
−1 12 −63
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-23
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-24
Example 7 Multiplying Square Matrices
❑ Find each product.
(a) CD
−4 −23
=
−16 27
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-25
Example 7 Multiplying Square Matrices (cont.)
(b) DC
30 −19
=
−14 −7
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-26
Example 8 Multiplying Square Matrices
2 −3 2 3
𝐿𝑒𝑡 𝐴 = ,𝐵 =
1 −1 −1 −1
❑ Find each of the following.
(a) 𝐴2
2 2 −3 2 −3
𝐴 = 𝐴 ∙ 𝐴=
1 −1 1 −1
2 2 + (−3)(1) 2 −3 + (−3)(−1)
=
1 2 + (−1)(1) 1 −3 + (−1)(−1)
= 4 − 3 −6 + 3
2 − 1 −3 + 1
= 1 −3
2 −2
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-27
Example 8 Multiplying Square Matrices (cont.)
(b) (𝐴 + 𝐵)2
(𝐴 + 𝐵)2 = (𝐴 + 𝐵) (𝐴 + 𝐵)
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-28
The Determinant of a Matrix
The determinant of a matrix A is denoted by |A|
(or det(A)).
Determinants exist only for square matrices.
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-29
Example
3 1
A=
1 2
A = (3)(2) − (1)(1) = 5
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-30
The Inverse of a Matrix (A-1)
For an n n matrix A, if there is a matrix B such
that AB = I = BA, then matrix B is the inverse of
matrix A.
The inverse is analogous to a reciprocal
A matrix which has an inverse is non-singular.
A matrix which does not have an inverse is
singular.
An inverse of a matrix A exists only if A 0
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-31
How to find inverse of matrices? determinants? and
more?
a b
If A = and |A| 0
c d
1 d − b
A -1
= − c a
det( A)
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-32
Example
1 2
Find the inverse of A= − 3 4
−1 1 4 − 2 0.4 − 0.2
A = =
10 3 1 0.3 0.1
To check AA-1 = A-1 A = I
1 2 0.4 − 0.2 1
−1 0
AA = = =I
− 3 4 0.3 0.1 0 1
−1 0.4 − 0.2 1 2 1 0
A A= = =I
0.3 0.1 − 3 4 0 1
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-33
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-34
Singular Matrix
Singular Matrix: A matrix is considered singular if
the determinant of the matrix is zero and the matrix
cannot be inverted
2 6
A = A = ( 2*3) − (1*6 ) = 0
2x2
1 3
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-35
Given matrices A and B as follows, determine whether B is the
Example: inverse of A:
−3 1
1 2
A= ; B= 1 .
4 6 2 −
2
Solution: B is the inverse of A if AB = I and BA = I , so we find those
products.
−3 1
1 2 1 0
AB = 1 = = I;
4 6 2 − 0 1
2
−3 1
1 2 1 0
BA = 1 = = I.
2 − 4
6 0
1
2
Therefore, B is the inverse of A; that is, A−1 = B. (It is also
true that A is the inverse of B, or B −1 = A.)
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-36
Section 3.3 - Applications of Matrices
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-37
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-38
Example 1 Solving Systems of Equations Using Matrix
Inverses
Use the inverse of the coefficient matrix to solve the
system.
Write the system in matrix form. That is A X = B
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-39
Example 1 Solving Systems of Equations Using Matrix
Inverses (cont.)
Find :
𝒅𝒆𝒕𝒆𝒓𝒎𝒊𝒏𝒂𝒏𝒕 𝒐𝒇 𝑨 𝒊𝒔 𝑨 = (𝟓)(𝟑) − (𝟐)(𝟐) = 𝟏𝟏
𝟏 𝟑 −𝟐
𝑨−𝟏 =
𝟏𝟏 −𝟐 𝟓
−1 3 −2
A = −2
11 11
5
11 11
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-40
Example 1 Solving Systems of Equations Using Matrix
Inverses (cont.)
Now find :
−3
=
7
Solution set: {(–3, 7)}
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-41
Example 2
Use matrix algebra to solve the given matrix equation for X.
8 12 3 2
𝐴 = 𝐵𝑋 − 𝑋; 𝐴= ,𝐵 =
2 4 2 1
Given, 𝐴 = 𝐵𝑋 – 𝑋
𝐴 = 𝐵𝑋 – 𝐼𝑋 where 𝐼 is an identity matrix
𝐴 = (𝐵– 𝐼)𝑋
(𝐵– 𝐼)−1 𝐴 = (𝐵– 𝐼)−1 (𝐵– 𝐼)𝑋
(𝐵– 𝐼)−1 𝐴 = 𝐼𝑋
(𝐵– 𝐼)−1 𝐴 = 𝑋
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-42
Example 2 (cont.)
Find 𝐵 – 𝐼 :
3 2 1 0 2 2
𝐵−𝐼 = − =
2 1 0 1 2 0
Find (𝐵 – 𝐼)−1 :
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-43
Example 2 (cont.)
Now find 𝑋 = (𝐵– 𝐼)−1 𝐴:
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-44
Copyright © 2017, 2013, 2009 Pearson Education, Ltd. 5-45