Chap. 2 Chap. 2 Matrices Matrices 2.1 Operations with Matrices 2.2 Properties of Matrix Operations 2.3 The Inverse of a Matrix 2.4 Elementary Matrices 2.5 Applications of Matrix Operations
Chap. 2Chap. 2MatricesMatrices
2.1 Operations with Matrices
2.2 Properties of Matrix Operations
2.3 The Inverse of a Matrix
2.4 Elementary Matrices
2.5 Applications of Matrix Operations
Ming-Feng Yeh Chapter 2 2-2
Matrix representations: An uppercase case: A, B, C, … A representative element enclosed in brackets: [aij], [bij]
A rectangular array of numbers:
Vector (column/row matrix): boldface lowercasea1, a2, …, an
2.1 2.1 Operations with MatricesOperations with Matrices
mnmm
n
n
aaa
aaa
aaa
21
22221
11211
Ming-Feng Yeh Chapter 2 2-3
DefinitionsDefinitions Equality of Matrices
Two matrices A = [aij] and B = [bij] are equal if they have the same size (mn) and aij = bij for 1 i m and 1 j n.
Matrix AdditionIf A = [aij] and B = [bij] are matrices of size mn, then their sum is the mn matrix given by A+B = [aij + bij].The sum of two matrices of different sizes is undefined.
Scalar Multiplication If A = [aij] is an mn matrix and c is a scalar, then the scalar multiplication of A by c is the mn matrix given by cA = [caij]
Section 2-1
Ming-Feng Yeh Chapter 2 2-4
Example 1Example 1Consider the four matrices
Matrices A and B are not equal because they are of different sizes.
Similarly, B and C are not equal. Matrices A and D are equal if and only if (iff) x = 3Remark: “p if and only if q” means that p implies q and
q implies p.
4
21,31,
3
1,
43
21
xDCBA
Section 2-1
Ming-Feng Yeh Chapter 2 2-5
Subtraction of MatricesSubtraction of Matrices If A and B are of the same size, AB represents the sum of
A and (B). That is, AB = A+(1)B = [aij bij].
cA dB = [caij dbij].
Example 3:
407
6410
1261
223313)1(23
3)1(3)4(031)3(3
043023213
231
341
002
212
103
421
33 BA
231
341
002
and
212
103
421
BA
Section 2-1
Ming-Feng Yeh Chapter 2 2-6
Matrix MultiplicationMatrix Multiplication If A = [aij] is an mn matrix and B = [bij] is an np matrix,
then the product AB is an mp matrix AB = [cij], where
njinjiji
n
kkjikij babababac
2211
1
pmpnnm
ABBA
mpmjmm
ipijii
pj
pj
npnjnn
pj
pj
mnmm
inii
n
n
cccc
cccc
cccc
cccc
bbbb
bbbb
bbbb
aaa
aaa
aaa
aaa
21
21
222221
111211
21
222221
111211
21
21
22221
11211
Section 2-1
Ming-Feng Yeh Chapter 2 2-7
Example 4Example 4Find the product AB, where and
05
24
31
A
14
23B
3231
2221
1211
14
23
05
24
31
cc
cc
cc
9)4)(3()3)(1(11 c 1)1)(3()2)(1(12 c
10)1)(0()2)(5(15)4)(0()3)(5(
6)1)(2()2)(4(4)4)(2()3)(4(
3231
2221
cc
cc
1015
64
19
23 22 23
Section 2-1
Ming-Feng Yeh Chapter 2 2-8
Example 5Example 5
111
001
242
212
301)(a
11
21
11
21)(c
1
1
2
321)(d
321
1
1
2
)(e
32663
175
2210
01
111
33321
321
642
BAAB
Matrix multiplication is not, in general, commutative.
Section 2-1
Ming-Feng Yeh Chapter 2 2-9
Systems of Linear EquationsSystems of Linear Equations Matrix Equation: Ax = b
A: coefficient matrix; x and b: column matrix (vector)
Example 6: Solve the matrix equation Ax = 0, where
3333232131
2323222121
1313212111
3
2
1
3
2
1
333231
232221
131211
bxaxaxa
bxaxaxa
bxaxaxa
b
b
b
x
x
x
aaa
aaa
aaa
0
0,,
232
121
3
2
1
0x
x
x
x
A
010
001
74
71
.,
7
4
1
3
2
1
Rtt
x
x
x
x
Section 2-1
Ming-Feng Yeh Chapter 2 2-10
Diagonal Matrix & Trace (p. 58)Diagonal Matrix & Trace (p. 58)
A square matrix
is called a diagonal matrix if all entries that not on the main diagonal are zero.
The trace of an nn matrix A is the sum of the main diagonal entries. That is,
nna
a
a
A
00
00
00
22
11
nnaaaATr 2211)(
Section 2-1
Ming-Feng Yeh Chapter 2 2-11
2.2 Properties of Matrix Operations2.2 Properties of Matrix Operations
Theorem 2.1Properties of Matrix Addition and Scalar Multiplication
If A, B, and C are mn matrices and c and d are scalars, then the following properties are true.1. A+B = B+A Commutative property of addition
2. A+(B+C) = (A+B)+C Associative property of addition
3. (cd)A = c(dA) Associative property of multiplication
4. 1A = A Multiplication identity
5. c(A+B) = cA + cB Distributive property
6. (c+d)A = cA + dA Distributive property
交換律結合律結合律乘法單位元素左分配律右分配律
Ming-Feng Yeh Chapter 2 2-12
Proof of Theorem 2.1Proof of Theorem 2.1 The proofs follow directly from the definitions of matrix
addition and scalar multiplication, and the corresponding properties of real numbers.
Let A = [aij] and B = [bij]
1. Use the commutative properties of addition of real numbers to writeA+B = [aij+bij] = [bij+aij] = B+A
5. Use the distributive properties (for real number) of multiplication over addition to write c(A+B) = [c(aij+bij)] = [caij+cbij] = cA+cB
Section 2-2
Ming-Feng Yeh Chapter 2 2-13
Zero Matrix & Additive IdentityZero Matrix & Additive Identity If A is an mn matrix and Omn is the mn matrix
consisting entirely of zeros, then A + Omn = A.
The matrix Omn is called a zero matrix, and it serves as the additive identity for the set of all mn matrices.
Theorem 2.2: Properties of Zero MatrixIf A is an mn matrix and c is a scalar, then the following properties are true.1. A + Omn = A.2. A + (A) = Omn. A is the additive inverse of A. 3. If cA = Omn, then c = 0 or A = Omn.
Section 2-2
Ming-Feng Yeh Chapter 2 2-14
Matrix EquationMatrix Equation Real Numbers m n Matrices
Ex. 2: Solve for X in the equation 3X+A = B, where
abx
abx
abaax
bax
0
)()(
ABX
ABOX
ABAAX
BAX
)()(
12
43and
30
21BA
32
32
34 2
22
64
3
1
30
21
12
43
3
1)(
3
1ABX
Section 2-2
Ming-Feng Yeh Chapter 2 2-15
Theorem 2.3Theorem 2.3 Properties of Matrix MultiplicationIf A, B, and C are matrices (with sizes such that the given
matrix products are defined) and c is a scalar, then the following properties are true.1. A(BC) = (AB)C Associative property2. A(B+C) = AB + AC Distribution property3. (A+B)C = AC + BC Distribution property4. c(AB) = (cA)B = A(cB)
Proof of Property 2: A: mn matrix, B: np matrix, C: np matrix. The entry in the ith row and jth column of A(B+C) is
The entry in the ith row and jth column of AB +AC is)()()( 222111 njnjinjjijji cbacbacba
)()( 22112211 njinjijinjinjiji cacacabababa equal
Section 2-2
Ming-Feng Yeh Chapter 2 2-16
NoncommutativityNoncommutativity A commutative property for matrix multiplication was
NOT listed in Theorem 2.3. If A is of size 23 and B is of size 33,
then the product AB is defined, but the product BA is not. Example 4: Show that AB and BA are not equal for the
matrices and
12
31A
20
12B
44
52
20
12
12
31AB
24
70
12
31
20
12BA
BAAB
Section 2-2
Ming-Feng Yeh Chapter 2 2-17
Cancellation PropertyCancellation Property It does NOT have a general cancellation property for
matrix multiplication. If AC = BC, it is NOT necessary true that A = B. Example 5: Show that AC = BC.
21
21,
32
42,
10
31CBA
21
42
21
21
10
31
21
42
32
42
10
31
AC
AB
BABCAC but,
Section 2-2
Ming-Feng Yeh Chapter 2 2-18
Identity Matrix & Theorem 4Identity Matrix & Theorem 4 A square matrix that has 1’s on the main diagonal
and 0’s elsewhere.
The identity matrix of order n:
Theorem 2.4: Properties of the Identity Matrix If A is a matrix of size mn, then the following properties are true.1. AIn = A. 2. ImA = A.
If A is a square matrix of order n, then AIn = InA = A.
1000
0100
0010
0001
nI
Section 2-2
Ming-Feng Yeh Chapter 2 2-19
Repeated MultiplicationRepeated Multiplication Repeated multiplication of a square matrix:
For a positive integer k, Ak is
A0 = In, where A is a square matrix of order n. Example 3: Find A3 for the matrix .
AAAAk
k factors
kjkj AAA jkkj AA )(
j and k are nonnegative integer.
03
12A
63
14
03
12
36
21
03
12
03
12
03
123A
Section 2-2
Ming-Feng Yeh Chapter 2 2-20
Theorem 2.5Theorem 2.5 Number of Solutions of a System of Linear Equations
For a system of linear equations in n variables, precisely one of the following is true.
1. The system has exactly one solution.
2. The system has an infinite number of solutions.
3. The system has no solution.
Section 2-2
Ming-Feng Yeh Chapter 2 2-21
The Transpose of a MatrixThe Transpose of a Matrix The transpose of a matrix is formed by
writing its columns as rows.
A matrix A is symmetric if A = AT. aij = aji, i j. a symmetric matrix must be square.
nmmnmmm
n
n
n
aaaa
aaaa
aaaa
aaaa
A
321
3333231
2232221
1131211
mnmnnnn
m
m
m
T
aaaa
aaaa
aaaa
aaaa
A
321
3332313
2322212
1312111
Section 2-2
Ming-Feng Yeh Chapter 2 2-22
Theorem 2.6Theorem 2.6Properties of Transpose If A and B are matrices (with sizes such that the given
matrix products are defined) and c is a scalar, then the following properties are true.1. Transpose of a transpose
2. Transpose of a sum
3. Transpose of a scalar multiplication
4. Transpose of a product
For any matrix A, the matrix is symmetric.
AA TT )(TTT BABA )(
)()( TT AccA TTT ABAB )(
TTTT CBACBA )( TTTT ABCABC )(TAA
Section 2-2
TTTTTT AAAAAApf )()(:
Ming-Feng Yeh Chapter 2 2-23
Example 9Example 9 Show that are equal.
Sol:
TTT ABAB )(
120
301
212
A
03
12
13
B
211
162)(
21
16
12
03
12
13
120
301
212TABAB
211
162
132
201
012
011
323TT AB
TTT ABAB )(
Section 2-2
Ming-Feng Yeh Chapter 2 2-24
Example 10Example 10 For the matrix
find the product and show that it is symmetric.
Sol:
12
20
31
A
TAA
325
246
5610
123
201
12
20
31TAA jiij aa
TTT AAAA )( TAASince , is symmetric.
Section 2-2
Ming-Feng Yeh Chapter 2 2-25
2.3 The Inverse of a Matrix2.3 The Inverse of a Matrix Definition of an Inverse of a Matrix
An nn matrix A is invertible (or nonsingular) if there exists an nn matrix B such that AB = BA = In
In is the identity matrix of order n. The matrix B is called the (multiplicative) inverse of A. A matrix that does NOT have an inverse is called
noninvertible (or singular). Nonsquare matrices do NOT have inverse. Theorem 2.7: Uniqueness of an Inverse Matrix
If A is an invertible matrix, then its inverse is unique.The inverse of A is denoted by .
1A IAAAA 11
Ming-Feng Yeh Chapter 2 2-26
Proof of Theorem 2.7Proof of Theorem 2.7 Because A is invertible, it has at least one inverse B such
that AB = BA = I. Suppose that A has another inverse C such that
AC = CA = I. Then you can show that B and C are equal as follows.
AB = I C(AB) = C(I) (CA)B = C (I)B = C B = C
Consequently B = C, and it follows that the inverse of a matrix is unique.
Section 2-3
Ming-Feng Yeh Chapter 2 2-27
Example 2Example 2Find the inverse of the matrix Sol: To find the inverse of A,
try to solve the matrix equation AX = I for X.
31
41A
1,413
04
1,303
14
10
01
33
44
10
01
31
41
22122212
2212
21112111
2111
22122111
22122111
2221
1211
xxxx
xx
xxxx
xx
xxxx
xxxx
xx
xx
11
431 XA
Using matrix multiplication to check the result.
10
01
11
43
31
41
Section 2-3
Ming-Feng Yeh Chapter 2 2-28
Gauss-Jordan EliminationGauss-Jordan Elimination
13
04
03
14
2212
2212
2111
2111
xx
xx
xx
xx
031
141
131
041 The same coefficient matrix
Double augment matrix
1031
0141
1110
0141
(4)
1110
4301
[ A ┇ I ] … [ I ┇ A1 ]
Section 2-3
Ming-Feng Yeh Chapter 2 2-29
ProcedureProcedureLet A be a square matrix of order n. Write the n2n matrix [ A┇I ] (adjoining the matrices A & I) If possible, row reduce A to I using elementary row
operations on the entire matrix [ A┇I ].The result will be the matrix [I ┇A1 ].If this in not possible, then A is not invertible.
Check your work by multiplying to see thatAAIAA 11
Section 2-3
Ming-Feng Yeh Chapter 2 2-30
Example 4Example 4 Show that the matrix has no inverse.
pf:
232
213
021
A
100232
010213
001021
IA
102270
013270
001021
111000
013270
001021
(3)
2
It is not possible to rewrite [A┇I ] in the form [I ┇A1 ].
Hence A has no inverse.
Section 2-3
Ming-Feng Yeh Chapter 2 2-31
The Inverse of a 2The Inverse of a 22 Matrix2 Matrix The matrix A is a 22 matrix given by The matrix A is invertible if and only if
= ad bc 0. If 0, then
pf:
dc
baA
ac
bdA
11
10
01
0
01
11
bcad
bcad
bcad
ac
bd
dc
ba
bcadAA
Interchanging the entires on the main diagonal and changing the signs of the other two entires.
Section 2-3
+
Ming-Feng Yeh Chapter 2 2-32
Example 5Example 5 If possible, find the inverse of each matrix.
22
13)( Aa
04 bcad
43
21
41
21
1
32
12
4
1A
26
13)( Bb
0)6)(1()2)(3( bcad
The matrix B is not invertible.
Section 2-3
Ming-Feng Yeh Chapter 2 2-33
Theorem 2.8Theorem 2.8 Properties of Inverse Matrix
If A is an invertible matrix, k is a positive integer, and c is a scalar, then A1, Ak, cA, and AT are invertible and the flowing are true.1. 2.3. 4.
Hint: if BC = CB = I, then C is the inverse of B.
pf: 1. Observe that , which means that A is the inverse of A1. Thus, .
3.
Section 2-3
AA 11)( kk AA )()( 11 0,)( 111 cAcA c
TT AA )()( 11
IAAAA 11
AA 11)(
IIAAccAA
IIAAcAcA
cc
cc
)1())(())((
)1())(())((1111
1111 Hence is the inverse of (cA), which implies that
11 AC
0,)( 111 cAcA c
Ming-Feng Yeh Chapter 2 2-34
Example 6Example 6Compute A2 in two different ways and show that the results
are equal.1. (A2)1:
2. (A1)2:
42
11A
1810
53
42
11
42
112A 4)10)(5()18)(3(
43
25
45
29
12
310
518
4
1)(A
2)1)(2()4)(1(42
11
A
21
21
1
1
2
12
14
2
1A
43
25
45
29
21
21
21
21
21
1
2
1
2)(A
the same result
Section 2-3
Ming-Feng Yeh Chapter 2 2-35
Theorem 2.9Theorem 2.9 The Inverse of a Product
If A and B are invertible matrices of size n,then AB is invertible and (AB)1 = B1A1.
pf: 1. (AB)(B1A1) = A(BB1)A1 = A(I)A1 = AA1 = I. 2. (B1A1)(AB) = B1(A1A)B = B1(I)B = B1B = I. Hence AB is invertible.
: in reverse order
Section 2-3
Recall: (AB)T = BTAT
11
12
1121 )( AAAAAA nn
Ming-Feng Yeh Chapter 2 2-36
Example 7Example 7Find (AB)1 for the matrices and
using the fact that A1 and B1 are given by
Sol:
431
341
331
A
342
331
321
B
101
011
3371A
31
32
1
0
011
121
B
37
31
32
111
25
348
258
101
011
337
0
011
121
)( ABAB
242712
242611
212310
AB
3725100
348010
258001
100242712
010242611
001212310
Section 2-3
Ming-Feng Yeh Chapter 2 2-37
Theorem 2.10Theorem 2.10 Cancellation PropertyIf C is an invertible matrix, then the following properties
hold.
1. If AC = BC, then A = B. Right cancellation property
2. If CA = CB, then A = B. Left cancellation property
pf: Use that fact that C is invertible and writeAC = BC (AC)C1 = (BC)C1
A(CC1) = B(CC1)
AI = BI
A = B
Section 2-3
Ming-Feng Yeh Chapter 2 2-38
Theorem 2.11Theorem 2.11 Systems of Equations with Unique Solutions
If A is an invertible matrix, then the system of linear equations Ax = b has a unique solution given byx = A1b.
pf: Ax = b A1(Ax) = A1(b) A1Ax = A1b x = A1b Example 8: Use an inverse matrix to solve each system
142133132)(
zyxzyxzyxa
042033032)(
zyxzyxzyxc
326101011
142133132
1AA
212
211
326101011
)( 1bx Aa
000
)( 1bx Ac
Section 2-3
Ming-Feng Yeh Chapter 2 2-39
2.4 Elementary Matrices2.4 Elementary Matrices Definition: An nn matrix is called an elementary
matrix if it can be obtained from the identity matrix In by a single elementary row operation.
Elementary row operations:1. Interchange two rows.2. Multiply a row by a nonzero constant.3. Add a multiple of a row to another row.
The identity matrix In is elementary. it can be obtained from itself by multiplying any one of its row by 1.
Ming-Feng Yeh Chapter 2 2-40
Example 1Example 1 Which matrices are elementary?
000010001
)(010001
)(100030001
)( cba
100020001
)(1201
)(010100001
)( fed
: two elementary row operations are required.
: (3)R2 R2: it is not a square matrix
: (0)R3 R3
must be by a nonzero const.
: R2 R3 : R2+R1 R2
Section 2-4
Ming-Feng Yeh Chapter 2 2-41
Example 2Example 2Elementary Matrices & Elementary Row Operations Interchange two rows: R1 R2
Multiply a row by a nonzero constant: (0.5)R2 R2
Add a multiple of a row to another row: R2+(2)R1 R2
123120631
123631120
100001010
131023101401
131046201401
10000001
21
540120101
540322101
100012001
Section 2-4
Ming-Feng Yeh Chapter 2 2-42
Theorem 2.12Theorem 2.12Representing Elementary Row Operations
Let E be the elementary matrix obtained by performing an elementary row operation on Im. If the same elementary row operation is performed on an mn matrix A, then the resulting matrix is given by the product EA.
Most applications of elementary row operations require a sequence of operations. Gaussian elimination
Section 2-4
Ming-Feng Yeh Chapter 2 2-43
Example 3Example 3Find a sequence of elementary matrices that can be used to
write the matrix A in row-echelon form.
Sol:
026220315310
A
026253102031
100001010
1E
The elementary matrix E is a 33 matrix.
(2)
420053102031
102010001
2E
(1/2)
210053102031
21
3
00010001
E
AE1
)( 12 AEE
)( 123 AEEE
Section 2-4
Ming-Feng Yeh Chapter 2 2-44
Row Equivalence & Thms. 2.13~14Row Equivalence & Thms. 2.13~14 Definition: Let A and B be mn matrices. Matrix B is
row-equivalent to A if there exists a finite number of elementary matrices E1, E2, …, Ek such thatB = EkEk1E2E1A.
Theorem 2.13: Elementary Matrices Are InvertibleIf E is an elementary matrix, then E1 exists and is an elementary matrix.
Theorem 2.14: A Property of Elementary MatricesA square matrix A is invertible if and only if it can be written as the product of elementary matrices.
Section 2-4
Ming-Feng Yeh Chapter 2 2-45
Elementary Matrices Are InvertibleElementary Matrices Are Invertible
Elementary Matrix Inverse Matrix
21
3
2
1
00
010
001
102
010
001
100
001
010
E
E
E
200
010
001
102
010
001
100
001
010
13
12
11
E
E
ER1 R2
R3+(2)R1 R3
(½)R3 R3
R1 R2
R3+(2)R1 R3
(2)R3 R3
Section 2-4
Ming-Feng Yeh Chapter 2 2-46
Proof of Theorem 2.14Proof of Theorem 2.14() If A can be written as the product of elementary matrices, then
A is invertible.pf: Assume that A is the product of elementary matrices. Then,
because every elementary matrix is invertible and the product of invertible matrices is invertible, it follows that A is invertible.
() If A is invertible, then it can be written as the product of elementary matrices.
pf: Assume that A is invertible. The system of linear equationsAX = O has only the trivial solution. This implies that [A┇O] can be rewritten in the form [I┇O] using the elementary operations as EkEk1E2E1A = I. Then it follows that . Thus A can be written as the product of elementary matrices.
112
11
kEEEA
Section 2-4
Ming-Feng Yeh Chapter 2 2-47
Example 4Example 4Find a sequence of elementary matrices whose product is
Sol:
83
21A
(1)
10
01
83
211E(3)
13
01
20
212E
213 0
01
10
21E
(½)
(2)
10
21
10
014E
IAEEEE 12341
41
31
21
1 EEEEA
10
0111E
13
0112E
20
0113E
10
2114E
Section 2-4
Ming-Feng Yeh Chapter 2 2-48
Theorem 2.15Theorem 2.15 Equivalent Conditions
If A is an nn matrix, then the following statements are equivalent.
1. A is invertible.
2. Ax = b has a unique solution for every n1 column vector b.
3. Ax = O has only the trivial solution.
4. A is row-equivalent to In.
5. A can be written as the product of elementary matrices.
Section 2-4
Ming-Feng Yeh Chapter 2 2-49
LU-FactorizationLU-Factorization A square matrix A is expressed as a product A = LU, where
the square matrix L is lower triangular and the square matrix U is upper triangular.
Step 1: EkE2E1A = U : row reduction Step 2: Step 3: A = LU
33
2322
131211
333231
2221
11
00
0,0
00
a
aa
aaa
U
aaa
aa
a
LBy row reducing A
Section 2-4
UEEEA k11
21
1
112
11
kEEEL
Ming-Feng Yeh Chapter 2 2-50
Example 6Example 6Find the LU-factorization of the matrix
Sol:
2102
310
031
A
Section 2-4
(2)
102
010
001
240
310
031
1E4
140
010
001
1400
310
031
2E
102
010
0011
1E
104
010
0011
2E
UAEE 12 UEEA 12
11
= U
142
010
0011
21
1 EE = L LU = A
Ming-Feng Yeh Chapter 2 2-51
Solving a Linear SystemSolving a Linear System Using LU-factorization to solve the linear system Ax = b:
Ax = b and A = LU LUx = bLet Ux = y. Ly = b1. Solve Ly = b for y. (forward substitution)2. Solve Ux = y for x. (back-substitution)
Section 2-4
Ming-Feng Yeh Chapter 2 2-52
Example 7Example 7Solve the linear system.Sol:
1. Let y = Ux and solve Ly = b for y
2. Solve Ux = y for x
202102
13
53
321
32
21
xxx
xx
xx
1400
310
031
142
010
001
2102
310
031
A
20
1
5
142
010
001
3
2
1
y
y
y
14
1
5
3
2
1
y
y
y
y
14
1
5
1400
310
031
3
2
1
x
x
x
1
2
1
3
2
1
x
x
x
x
Section 2-4