Linear Algebra Chapter 2 Matrices.
-
Upload
elisabeth-douglas -
Category
Documents
-
view
308 -
download
4
description
Transcript of Linear Algebra Chapter 2 Matrices.
Chapter 2Matrices
Linear Algebra
Ch2_2
2.1 Addition, Scalar Multiplication, and Multiplication of Matrices
DefinitionTwo matrices are equal if they are of the same size and if their corresponding elements are equal.
• aij: the element of matrix A in row i and column j.• For a square nn matrix A, the main diagonal is:
nnnn
n
n
aaa
aaaaaa
A
21
22221
11211
Thus A = B if aij = bij i, j. ( for every, for all)
Ch2_3
Addition of MatricesDefinitionLet A and B be matrices of the same size. Their sum A + B is the matrix obtained by adding together the corresponding elements of A and B. The matrix A + B will be of the same size as A and B. If A and B are not of the same size, they cannot be added, and we say that the sum does not exist.
. then , if Thus i,jbacBAC ijijij
Ch2_4
Example 2.72
45 and ,813652 ,320
741Let
CBA
Determine A + B and A + C, if the sum exist.
Solution
.1113193
831230675421
813652
320741 )1(
BA
(2) Because A is 2 3 matrix and C is a 2 2 matrix, there are not of the same size, A + C does not exist.
Ch2_5
Scalar Multiplication of matricesDefinitionLet A be a matrix and c be a scalar. The scalar multiple of A by c, denoted cA, is the matrix obtained by multiplying every element of A by c. The matrix cA will be the same size as A.
Example 3
.027421Let
A
.09211263
03)3(37343)2(3133
A
Observe that A and 3A are both 2 3 matrices.
., then , if Thus jicabcAB ijij
Ch2_6
Negation and SubtractionDefinitionWe now define subtraction of matrices in such a way that makes it compatible with addition, scalar multiplication, and negative. Let
A – B = A + (–1)B
Example
.640182 and 563
205 Suppose
BA
.1123183
654603)1(28025
BA
Ch2_7
njinjiji
nj
j
j
iniiij bababa
b
bb
aaac
22112
1
21
Multiplication of MatricesDefinitionLet the number of columns in a matrix A be the same as the number of rows in a matrix B. The product AB then exists.
If the number of columns in A does not equal the number of row B,
we say that the product does not exist.
Let A: mn matrix, B: nk matrix,The product matrix C=AB has elements
C is a mk matrix.
Ch2_8
Example 4
exist. products theif , and , , Determine
.526 and ,623105
,0231
Let
ACBAAB
CBA
623
1050231AB
.201091614
)60()12())2(0()02()30()52()63()11())2(3()01()33()51(
61
0220
0235
02
61
3120
3135
31
BA and AC do not exist.
Sol.
Note. In general, ABBA.
Ch2_9 2)14()23(1
243
Example 5
.5301 and
230712
Let
BA
50233
123
50073
107
50123
112
5301
230712
AB
1030751
1006300075032
23c
Determine AB.
105
237 and 4312 BA
Example 6 Let C = AB, Determine c23.
Ch2_10
Size of a Product MatrixIf A is an m r matrix and B is an r n matrix, then AB will be an m n matrix.
A
m r
Br n
= ABm n
Example 7
If A is a 5 6 matrix and B is an 6 7 matrix. Because A has six columns and B has six rows. Thus AB exits.And AB will be a 5 7 matrix.
Ch2_11
DefinitionA zero matrix is a matrix in which all the elements are zeros. A diagonal matrix is a square matrix in which all the elements not on the main diagonal are zeros. An identity matrix is a diagonal matrix in which every diagonal element is 1.
matrix zero
000
000000
mn0
Amatrix diaginal
00
0000
22
11
nna
aa
A
matrixidentity
100
010001
nI
Special Matrices
Ch2_12
Theorem 2.1Let A be m n matrix and Omn be the zero m n matrix. Let B be an n n square matrix. On and In be the zero and identity n n matrices. Then
A + Omn = Omn + A = ABOn = OnB = On
BIn = InB = BExample 8
.4312 and 854
312Let
BA
AOA
854312
000000
854312
23
22 0000
0000
3312
OOB
BBI
4312
1001
4312
2
Ch2_13
Homework
Exercise 11
Let A be a matrix whose third row is all zeros. Let B be any matrix such that the product AB exists. Prove that the third row of AB is all zeros.
Solution
. ,0 ]0 0 0[ ] [)( 2
1
2
1
332313 i
b
bb
b
bb
aaaAB
ni
i
i
ni
i
i
ni
Ch2_14
2.2 Algebraic Properties of Matrix Operations
Theorem 2.2 -1
Let A, B, and C be matrices and a, b, and c be scalars. Assume that the size of the matrices are such that the operations can be performed.Properties of Matrix Addition and scalar Multiplication1. A + B = B + A Commutative property of addition2. A + (B + C) = (A + B) + C Associative property of addition3. A + O = O + A = A (where O is the appropriate zero matrix)4. c(A + B) = cA + cB Distributive property of addition5. (a + b)C = aC + bC Distributive property of addition6. (ab)C = a(bC)
Ch2_15
Let A, B, and C be matrices and a, b, and c be scalars. Assume that the size of the matrices are such that the operations can be performed.Properties of Matrix Multiplication1. A(BC) = (AB)C Associative property of multiplication2. A(B + C) = AB + AC Distributive property of multiplication3. (A + B)C = AC + BC Distributive property of multiplication4. AIn = InA = A (where In is the appropriate zero matrix)
5. c(AB) = (cA)B = A(cB)Note: AB BA in general. Multiplication of matrices is not
commutative.
Theorem 2.2 -2
Ch2_16
15
201873
5431
.5964
115584273031
CBA
.1520 and ,18
73 ,5431Let
CBA
Example 1
Proof of Thm 2.2 (A+B=B+A)
.)()( ijijijijijij ABabbaBA Consider the (i,j)th elements of matrices A+B and B+A:
A+B=B+A
Ch2_17
Example 2 and 3
.1131112
201310
1321
AB
.19
014
1131112)(
CAB
.014
and ,201310 ,13
21Let
CBA Compute ABC.
Sol. (1) (AB)C
(2) A(BC)
4
1014
201310BC
.19
41
1321)(
BCA
Count the number of multiplications.
Which method is better?
26+32=12+6=18
32+22=6+4=10
A(BC) is better.
Ch2_18
Arithmetic Operations
If A is an m r matrix and B is r n matrix, the number of scalar multiplications involved in computing the product AB is mrn.
A B C = D22 23 31 21
ProofConsider the (i,j)th element of matrix AB:
AB mn mrnrjirjijiij bababaAB 2211)(
(1) (AB)C: 223+ 231=18(2) A(BC): 231+ 221=10 better
Ch2_19
In algebra we know that the following cancellation laws apply. If ab = ac and a 0 then b = c. If pq = 0 then p = 0 or q = 0.
However the corresponding results are not true for matrices. AB = AC does not imply that B = C. PQ = O does not imply that P = O or Q = O.
Caution
Example
.but ,8643
that Observe
.23
83 and ,
1221
,4221
matrices heConsider t (1)
CBACAB
CBA
. and but , that Observe
.3162
and ,4221
matrices heConsider t (2)
OQOPOPQ
QP
Ch2_20
Powers of Matrices
Theorem 2.3
If A is an n n square matrix and r and s are nonnegative integers, then 1. ArAs = Ar+s.2. (Ar)s = Ars.3. A0 = In (by definition)
Definition
If A is a square matrix, then
timesk
k AAAA
Ch2_21
Example 4. compute ,
0121
If 4AA
2123
0121
01212A
.65
10112123
21234
A
Solution
2
2222
22
4635736257)2(3)2(
BBAABABBABBAABAABBABABBAA
Example 5 Simplify the following matrix expression.ABBABABBAA 57)2(3)2( 22
Solution
Ch2_22
Systems of Linear Equations
A system of m linear equations in n variables as follows
mnmnm
nn
bxaxa
bxaxa
11
11111
Let
mnmnm
n
b
bB
x
xX
aa
aaA
11
1
111 and , ,
We can write the system of equations in the matrix form
AX = B
Ch2_23
Idempotent and Nilpotent Matrices(Exercise 30~36)
Definition(1) A square matrix A is said to be idempotent if A2=A.(2) A square matrix A is said to nilpotent if there is a
positive integer p such that Ap=0. The least integer p such that Ap=0 is called the degree of nilpotency of the matrix.
.2163
,2163
(1) 2 AAA
Example
2 :nilpotency of degree The .0000
,3193
(2) 2
BB
Ch2_24
Homework
Exercise 2.2:6, 8, 11, 19, 27, 31, 33, 34, 35, 38
Exercise 8
A : m r matrix, B: r n matrix, C: n s matrix. Derive formulas for the number of scalar multiplications involved in computing (AB)C and A(BC).
Exercise 27
A, B: diagonal matrix of the same size, c: scalar Prove that A+B and cA are diagonal matrices.
Ch2_25
Homework
Exercise 31
Determine b, c, and d such that is idempotent.
Exercise 33
Prove that if A and B are idempotent and AB=BA, then AB is idempotent.
dcb1
Ch2_26
2.3 Symmetric Matrices
DefinitionThe transpose of a matrix A, denoted At, is the matrix whose columns are the rows of the given matrix A.
Example 1
.431 and ,654721 ,08
72
CBA
07
82tA
675241
tB .431
tC
jiAAmnAnmA jiijtt ., )( ,: : i.e.,
Ch2_27
Theorem 2.4 Properties of Transpose
Let A and B be matrices and c be a scalar. Assume that the sizes of the matrices are such that the operations can be performed.1. (A + B)t = At + Bt Transpose of a sum2. (cA)t = cAt Transpose of a scalar multiple3. (AB)t = BtAt Transpose of a product4. (At)t = A
Ch2_28
nijnijij
ni
i
i
jnjjjiijt
bababa
b
bb
aaaABAB
2211
2
1
21
)()(
Theorem 2.4 Properties of Transpose
Proof for 3. (AB)t = BtAt
nijnijij
jn
j
j
niii
ttttij
tt
bababa
a
aa
bbb
AjBiAjBiAB
22112
1
21
] of [row ] of column [] of [column ] of row[)(
Ch2_29
Symmetric Matrix
6394323293704201
384871410
4552
match
match
DefinitionA symmetric matrix is a matrix that is equal to its transpose.
jiaaAA jiijt , i.e., ,
Example
Ch2_30
If and only if
Let p and q be statements.Suppose that p implies q (if p then q), written p q,and that also q p, we say that
“p if and only if q” (iff )
Ch2_31
Example 3
*We have to show (a) AB is symmetric AB = BA, and the converse, (b) AB is symmetric AB = BA.
() Let AB be symmetric, thenAB= (AB)t by definition of symmetric matrix = BtAt by Thm 2.4 (3) = BA since A and B are symmetric
() Let AB = BA, then(AB)t = (BA)t
= AtBt by Thm 2.4 (3) = AB since A and B are symmetric
Proof
Let A and B be symmetric matrices of the same size. Prove that the product AB is symmetric if and only if AB = BA.
Ch2_32
Example 3
Proof
Let A be a symmetric matrix. Prove that A2 is symmetric.
tA )( 2 tAA)( )( tt AA 2AAA
Ch2_33
DefinitionLet A be a square matrix. The trace of A, denoted tr(A) is the sum of the diagonal elements of A. Thus if A is an n n matrix.
tr(A) = a11 + a22 + … + ann
Example 4
Determine the trace of the matrix .037652214
A
SolutionWe get
.10)5(4)( Atr
Ch2_34
Theorem 2.5 Properties of TraceLet A and B be matrices and c be a scalar. Assume that the sizes of the matrices are such that the operations can be performed. 1. tr(A + B) = tr(A) + tr(B) 2. tr(AB) = tr(BA) 3. tr(cA) = c tr (A) 4. tr(At) = tr(A)
Since the diagonal element of A + B are (a11+b11), (a22+b22), …, (ann+bnn), we get
tr(A + B) = (a11 + b11) + (a22 + b22) + …+ (ann + bnn)
= (a11 + a22 + … + ann) + (b11 + b22 + … + bnn)
= tr(A) + tr(B).
Proof of (1)
Ch2_35
Example of (2) tr(AB)=tr(BA)
101123
,21
0231
BA
52118
,121246
220BAAB
)( 3)( BAtrABtr
Ch2_36
Matrices with Complex ElementsThe element of a matrix may be complex numbers. A complex number is of the form
z = a + biWhere a and b are real numbers and a is called the real part and b the imaginary part of z.
.1i
The conjugate of a complex number z = a + bi is z = a bi
Ch2_37
Example 6.321
23 and 54232Let
ii
iBiiiA
Compute A + B, 2A, and AB.Solution
iii
iiiiii
iii
iiiBA
82535
3251422332
32123
54232
i
iiiiiA 108
46245423222
iiii
iii
iiiAB
iiiiiiiiiiii
181557910411
32123
54232
)32)(5()2(4)1)(5()3)(4()32)(23()2)(2()1)(23(3)2(
Ch2_38
Definition(i) The conjugate of a matrix A is denoted A and is obtained by taking the conjugate of each element of the matrix.(ii) The conjugate transpose of A is written and defined by A*=A
t.(iii) A square matrix C is said to be hermitian if C=C*.
iii
A76
4132
Example (i), (ii)
iii
A764132
iii
AAt
741632*
Example (iii)
*
643432
Ci
iC
Ch2_39
Homework
Exercise 2.3:2, 5, 11, 13, 15, 23
Exercise 11
A matrix A is said to be antisymmetric if A = At. (a) give an example of an antisymmetric matrix.(b) Prove that an antisymmetric matrix is a square matrix having diagonal elements zero.(c) Prove that the sum of two antisymmetric matrices of the same size is an antisymmetric matrix.
Ch2_40
Homework
Exercise 13
Prove that any square matrix A can be decomposed into the sum of a symmetric matrix B and an antisymmetric matrix C: A = B+C.(Find B: B = Bt, C: C = Ct, such that A = B + C.)
A = B + C
Solution
A = Bt Ct At = B C(1) (2)
(1)+(2): A + At = 2B B = ½(A + At )
(1)(2): A At = 2C C = ½(A At )
Ch2_41
2.4 The Inverse of a MatrixDefinitionLet A be an n n matrix. If a matrix B can be found such that AB = BA = In, then A is said to be invertible and B is called the inverse of A. If such a matrix B does not exist, then A has no inverse. (denote B = A1, and Ak=(A1)k )
43
21AExample 1Prove that the matrix has inverse .
12
2
1
2
3
B
Proof
221
23 10
01124321 IAB
221
23 10
01432112 IBA
Thus AB = BA = I2, proving that the matrix A has inverse B.
Ch2_42
Theorem 2.7The inverse of an invertible matrix is unique.
ProofLet B and C be inverses of A. Thus AB = BA = In, and AC = CA = In.
Multiply both sides of the equation AB = In by C.
C(AB) = CIn
(CA)B = CInB = C
B = CThus an invertible matrix has only one inverse.
Thm2.2
Ch2_43
A: an invertible nn matrixHow to find A-1?
. ,Let 21211
nnn CCCIXXXA
We shall find A1 by finding X1, X2, …, Xn.
Since AA1 =In, then .2121 nn CCCXXXA
.,, , i.e., 2211 nn CAXCAXCAX
Solve these systems by using Gauss-Jordan elimination: .:
::matrix augmented
21
21
nn
n
XXXICCCA
.:: 1 AIIA nn
Note. [In:B] , A1 。
Ch2_44
Gauss-Jordan Elimination for finding the Inverse of a Matrix
Let A be an n n matrix.1. Adjoin the identity n n matrix In to A to form the matrix
[A : In].
2. Compute the reduced echelon form of [A : In].
If the reduced echelon form is of the type [In : B], then B is the inverse of A.
If the reduced echelon form is not of the type [In : B], in that the first n n submatrix is not In, then A has no inverse.
An n n matrix A is invertible if and only if its reduced echelon form is In.
Ch2_45
Example 2Determine the inverse of the matrix
531532211
A
Solution
100531010532001211
]:[ 3IA
101320012110001211
1RR1R3
2)(R2
101320012110001211
R2)1(
123100012110013101
R2)2(R3R2R1
123100135010010001
R3)1(R2R3R1
.123135110
Thus, 1
A 隨堂作業: 14
Ch2_46
135000011210012301
3R2R3R2)1(R1
Example 3Determine the inverse of the following matrix, if it exist.
412721511
A
Solution
100412010721001511
]:[ 3IA
102630011210001511
R1)2(R31)R1(R2
There is no need to proceed further. The reduced echelon form cannot have a one in the (3, 3) location. The reduced echelon form cannot be of the form [In : B]. Thus A–1 does not exist.
Ch2_47
Properties of Matrix InverseLet A and B be invertible matrices and c a nonzero scalar, Then
AA 11)( 1.11 1)( .2 A
ccA
111)( .3 ABAB
nn AA )()( .4 11 tt AA )()( .5 11
Proof1. By definition, AA1=A1A=I.
))(())(( .2 11 11 cAAIAcA cc
))(( )())(( .3 1111111 ABABIAAABBAABAB nn
nn
nn AAIAAAAAA )( )( .4 1
times
11
times
1
,)( )( ,
,)( )( , .5111
111
IAAAAIAA
IAAAAIAAttt
ttt
Ch2_48
Example 4
.)( compute n toinformatio
this Use.4311 shown that becan it then ,13
14 If1
1
tA
AA
Solution
.)()(4131
431111
ttt AA
Ch2_49
Theorem 2.8
Let AX = Y be a system of n linear equations in n variables. If A–1 exists, the solution is unique and is given by X = A–1Y.
Proof(X = A–1Y is a solution.)Substitute X = A–1Y into the matrix equation.
AX = A(A–1Y) = (AA–1)Y = InY = Y.
(The solution is unique.)Let X1 be any solution, thus AX1 = Y. Multiplying both sides of this equation by A–1 gives
A–1AX1= A–1Y InX1 = A–1YX1 = A–1Y.
Ch2_50
Example 5Solve the system of equations
253353212
321
321
321
xxxxxxxxx
SolutionThis system can be written in the following matrix form:
231
531532211
3
2
1
xxx
If the matrix of coefficients is invertible, the unique solution is
231
531532211 1
3
2
1
xxx
This inverse has already been found in Example 2. We get
121
231
123135110
3
2
1
xxx
.1 ,2 ,1 issolution unique The 321 xxx
Ch2_51
Elementary MatricesDefinition An elementary matrix is one that can be obtained from the identity matrix In through a single elementary row operation.
Example
100010001
3I
010100001
1ER2 R3
100050001
2E5R2
100012001
3ER2+ 2R1
Ch2_52
Elementary Matrices
ihgfedcba
A
AEAfedihgcba
1
010100001
R2 R3
AEAihgfed
cba
2
100050001
555
5R2
AEAihg
cfbeadcba
3
100012001
222
R2+ 2R1
elementary row operation, elementary matrix 。
Ch2_53
Notes for elementary matricesEach elementary matrix is invertible.
Example
If A and B are row equivalent matrices and A is invertible, then B is invertible.
ProofIf A … B, thenB=En … E2 E1 A for some elementary matrices En, … , E2 and E1. So B1 = (En … E2 E1A)1 =A1E1
1 E21 … En
1.
1221EI
RR
100010021
1E
100010001
I
100010021
2E
, 2211 IE
RR IEE 12 i.e.,
Ch2_54
Homework
Exercise 2.4:6, 14, 15, 16, 19, 21, 27
dcba
A
(section 2.5~2.7)
Exercise 7
If , show that .)(
11
acbd
bcadA
Ch2_55
Homework
Exercise 21
Prove that (AtBt)1 = (A1B1)t.
Exercise 27
True or False:(a) If A is invertible A1 is invertible.(b) If A is invertible A2 is invertible.(c) If A has a zero on the main diagonal it is not invertible.(d) If A is not invertible then AB is not invertible.(e) A1 is row equivalent to In.