Escolar Documentos
Profissional Documentos
Cultura Documentos
Matrices
2.1
Homework: 2.1 (page 56): 7, 9, 13, 15, 17, 25, 27, 35, 37, 41, 46, 49,
67
41
42
CHAPTER 2. MATRICES
a
a
a
a
A=
31
32
33
3n
am1 am2 am3 amn
is also denoted by [aij ].
f or all
1 i m and
1 j n.
13
a = 19
23
is a column matrix.
2. A matrix with only one row is called a row matrix or row vector. For example
b=
is a row matrix.
4 11 13 19 23
43
3. Bold face lower case letters, as above, will often be used to denote
row or column matrices.
2.1.1
Matrix Addition
A= 3
15
13 10
8 , B = 5 18 we have A+B = 2 10
10 14
11 1
21 15
2.1.2
Scalar Multiplication
44
CHAPTER 2. MATRICES
A= 3
15
B = 5 18
11 1
8 ,
10 14
44
55
8 = 33 88 .
110 154
10 14
cA = 11 3
Likewise, A B = A + (1)B =
15
15
3 8 +(1) 5 18 = 3 8 + 5 18
11 1
10 14
11 1
10 14
49
5 15
5 20
8 18 = 8 26
1 13
10 11 14 1
= 3+5
45
2.1.3
Matrix Multiplication
The textbook gives a helpful motivation for defining matrix multiplication in page 49. Read it, if you are not already motivated.
Definition 2.1.5 Suppose A = [aij ] is a matrix of size m n and
B = [bij ] is a matrix of size n p. Then the product AB = [cij ] is a
matrix size m p where
cij := ai1 b1j + ai2 b2j + ai3 b3j + + ain bnj =
n
X
aik bkj .
k=1
1 1
A = 2 1
3
8 ,
1
B= 2
1
1 3 2
46
CHAPTER 2. MATRICES
6 21 15
= 8 23 19
4 1
5
11+12+23
BA = 2 1 + 1 2 + 1 3
1 (1) + 1 (1) + 2 1
1 7 + 1 8 + 2 (
2 (1) + 1 (1) + 1 1
2 7 + 1 8 + 1 (
9 0
13
= 7 2 21 .
1
19
2
0 1 3
A = 4 0 2 , and B = 3 .
1
8 1 7
AB =
0 2 + (1) (3) + 3 1
4 2 + 0 (3) + 2 1 = 10 .
26
8 2 + (1) (3) + 7 1
47
2.1.4
"
37 78 51 104 124
16 26 28
42
56
A=
a1n
a2n
a3n
amn
x=
x1
x2
x3
xn
b=
b1
b2
b3
bn
48
CHAPTER 2. MATRICES
1. With
a1 =
a11
a21
a31
am1
, a2 =
a12
a22
a32
am2
, aj =
a1j
a2j
a3j
amj
, an =
a1n
a2n
a3n
amn
A = a1 a2 a j a n
as a matrix of matrices.
+x2 3x3 = 1
x1 +2x2
x1 2x2
=1
+x3
=2
1
x1
1
1 3
2
0 x2 = 1
1
x3
2
1 2
1
49
This answers the first part. To solve, the augmented matrix of the
system is
1 3 1
2
1
1 2
1
2
1 0 0 5
0 1 0 3
0 0 1 3
The corresponding linear system is:
1 0 0
x1
0 1 0 x2 = 3
3
x3
0 0 1
Multiplying, this give the solution:
x1
x2 = 3 .
x3
3
Exercise 2.1.10 (Ex. 40, .58)
#"
#
"
a b
2 1
c d
3 1
"
17
4 1
2a + 3b a + b
2c + 3d c + d
"
17
4 1
50
CHAPTER 2. MATRICES
Equating respective entries:
2a +3b
=3
+b
= 17
2c +3d
c
The augmented matrix of the
=4
+d = 1
system:
3 0 0
17
0 2 3
4
0 1 1 1
1 0 0
Gauss-Jordan form:
0 0 0
48
1 0 0 31
0 1 0 7
0 0 1
6
2.2
51
Homework: 2.2 (page 70): 1, 3, 7, 9, 15, 17, 21, 23, 29, 31, 35, 37,
39, 43, 57, 59
52
CHAPTER 2. MATRICES
We start developing some algebra of matrices.
4. 1A = A
5. c(A + B) = cA + cB
6. (c + d)A = cA + dA
Proof. One needs to prove all these statements using definitions of addition and scalar multiplication. To prove the commutativity
of ma-
trix addition (1), Let A = [aij ], B = [bij ]. Both A and B have same size
m n, so A + B, B + A are defined. From definition
A + B = [aij ] + [bij ] = [aij + bij ] and B + A = [bij ] + [aij ] = [bij + aij ].
From commutative property of addition of real numbers, we have aij +
bij = bij +aij . Therefore, from definition of equality of matrices, A+B =
B + A. So, (1) is proved. Other properties are proved similarly.
Remark. For matrices A, B, C as in the theorem, by the expression
A + B + C we mean (A + B) + C or A + (B + C). It is well defined,
because (A + B) + C = A + (B + C) by associatieve property(2) of
matrix addition.
Theorem 2.2.2 Let Omn denote the m n matrix whose entries are
all zero. Let A be a m n matrix. Then
1. Then A + Omn = A.
53
2.2.1
2. (AB)C = A(BC)
Associativity of multiplication
an Associativity
a11
a12
a13
A=
a31 a32 a33
am1 am2 am3
a1n
a2n
a3n
,
amn
54
CHAPTER 2. MATRICES
and
b21
B=
b31
bn1
bn2 bn3 bnp
c21
C=
c31
cn1
cn2 cn3 cnp
Therefore, A(B + C) =
a11
a12
a13
am1 am2 am3
a1n
b11 + c11
b12 + c12
a3n
b31 + c31 b32 + c32 b33 + c33
amn
bn1 + cn1 bn2 + cn2 bn3 + cn3
b2p + c2p
b3p + c3p
.
bnp + cnp
which is
Pn
Pnk=1
Pnk=1
k=1
Pn
Pnk=1
Pnk=1
k=1
Pn
Pnk=1
Pnk=1
k=1
Pn
Pn
Pn
k=1 amk (bk1 + ck1 )
k=1 amk (bk2 + ck2 )
k=1 amk (bkp + ckp )
55
Pk=1
n
Pk=1
n
k=1
a1k bk1
a2k bk1
a3k bk1
Pn
k=1
Pn
Pk=1
n
Pk=1
n
k=1
a1k bk2
a2k bk2
amk bk1
Pn
k=1
a3k bk2
amk bk2
+
Pn
Pk=1
n
Pk=1
n
k=1
a1k bkp
a2k bkp
a3k bkp
Pn
Pn
Pn
a1k ck2
k=1 a1k ck1
Pk=1
Pn
n
a2k ck1
Pn
Pn
k=1 amk ck1 )
k=1 amk ck2
Pn
Pk=1
n
= AB + AC
a1k ckp
a2k ckp
a3k ckp
Pn
B = [bkj ],
C = [ckj ].
n
X
AB =
"
n
X
k=1
aik bkj +
aik bkj ,
and
n
X
aik ckj
k=1
k=1
k=1
But
n
X
AC =
"
n
X
k=1
aik ckj
56
CHAPTER 2. MATRICES
Remark. For matrices A, B, C as in the theorem so that all the multiplications in the associative law (2) are defined. Then the expression ABC would mean (AB)C or A(BC). It is well defined, because
(AB)C = A(BC) by associatieve property(2) of matrix multiplication.
Reading assignment
1. [Textbook, Example 3, p. 64] to experience that associativity
(property 2) works.
2. [Textbook, Example 4, p. 64] to see examples that commutativity
for multiplication fails (property 1).
3. [Textbook, Example 5, p. 65] to see examples that cancellation
fails. That means, examples AB = AC for nonzero A, B, C with
B 6= C. This makes solving matrix equation like AX = AC, different from solving equation in real numbers, like ax = c.
Theorem 2.2.4 Let In denote the square matrix of order n whose
main diagonal entries are 1 and all the entries are zero. So,
1
0
0
In = 0
0
1
0
0
0
1 0
0
1 0 0
0 1
0
, I3 = 0 1 0 , I4 = 0 0
0 0 1
0 0
1
0 0
0 0
1 0
0 1
57
Reading assignment
1. [Textbook, Example 6, p. 66]
2. [Textbook, Example 7, p. 66], just to get used to computing Ar .
Following the definition 1.1.2 in item (4) we gave a classification of
system of equation, which we state as a theorem and prove as follows.
Theorem 2.2.5 Let Ax = b be a linear system of m equations in n
unknowns. Then exactly one of the follwoing is true:
1. The system has no solution.
2. The system has exactly one solution.
3. The system has infinitely many solutions.
Proof. If the system has no solution or have exactly one solution,
then there is nothing to prove. So, assume, it has at least two distinct
solutions x1 , x2 . So, Ax1 = b and Ax2 = b. Subtracting the second
from the first, we have A(x1 x2 ) = 0. Write y = x1 x2 .
Then y 6= 0 and Ay = 0. So, for any scalar c, we have
A(x1 + cy) = Ax1 + A(cy) = b + (Ac)y = b + c(Ay) = b + c0 = b.
So, x1 +cy is a solution, for each scalar c (and they are all distinct). So,
the system has infinitely many solutuions. This completes the proof.
2.2.2
Transpose of a matrix
Definition 2.2.6 The transpose of a matrix A is obtained by writing the rows as columns (and/or writing the columns as rows). The
transpose of A is denoted bt AT . So, for the matrix
58
CHAPTER 2. MATRICES
a11
a12
a13
A=
a31 a32 a33
am1 am2 am3
a1n
a2n
a
T 12
a3n A =
a13
a1n
amn
a2n a3n amn
Theorem 2.2.8 Let A, B be matrices (of varying sizes so that the sum
or product is defined) and c be a scalar. Then,
1. (AT )T = A. (That means transpose of transpose is the same.)
2. (A + B)T = AT + B T .
3. (cA)T = cAT .
4. (AB)T = B T AT . (This is the most important one in this list.)
In fact, properties 2, 4 extends to sum of higher number of matrices.
Reading assignment
1. [Textbook, Example 8, p. 68] to compute transpose of a matrix.
2. [Textbook, Example 9, p. 66], about transpose and product of
matrices.
59
2 1
A= 1
0 , B =
3 4
Then
0 .
4 1
2
1. Solve X = 3A 2B
Solution: In this case
2 1
1
which is
0
0 2 2
4 1
3 4
X = 3A 2B = 3
0 4
0 = 1
0 .
9 12
8 2
17 10
3
2. Solve 2X = 2A B.
Solution: We have
2X = 2AB = 2
OR
2 1
4 2
0 =
0 2
4 1
3 4
1
2X =
4 5
0
0
10 7
4 5
2 2.5
1
X= 0
0 = 0
0 .
2
10 7
5 3.5
0
0 2
4 1
6 8
2
60
CHAPTER 2. MATRICES
3. Solve 2X + 3A = B.
Solution: We have 2X + 3A = B. Subtracting 3A from both
sides, 2X = B 3A. So,
0
3
2 1
6 6
2X = B 3A = 2
0 3 1
0 = 1 0 .
4 1
3 4
13 11
Divide by 2 (i.e. multiply by 12 ), we have
6 6
3
3
1
X = 1 0 = 0.5
0 .
2
13 11
6.5 5.5
61
"
0 1
"
0 2
1 1
A= 3
4 .
0 2
AT =
"
1 3
1 4 2
So, AT A =
"
1 3
1 4 2
1 1
4 =
3
0 2
"
1 + 9 + 0 1 + 12 + 0
1 + 12 + 0
1 + 16 + 4
"
10 11
11 21
62
CHAPTER 2. MATRICES
Also AAT =
#
1 1 "
1+1 34 0+2
1 3
0
= 3 4 9 + 16 0 8
4
3
1 4 2
0 2
0+2 08 0+4
which is
2 1
= 1
25 8
2 8
4
AAT
T
= AT AT = AAT .
1
1
X = 2 ,Y = 0 ,Z =
2
3
Let
0
0
1
4 ,W = 0 ,O = 0 .
0
1
4
" #
" #
1
1
1
h
i a
a
= Z. OR 2 0
= 4
X Y
b
b
3 2
4
63
1 1 1
2 0 4
3 2 4
1 0
2
0 1 1
0 0
Gauss-Jordan form:
" #
" #
0
1
1
h
i a
a
= 0
= W. OR 2 0
X Y
b
b
1
3 2
Here a, b are unknown to be solved for. The augmented matrix
of this system is: Here a, b are unknown to be solved for. The
augmented matrix of this system is:
1 1 0
2 0 0
3 2 1
1 0 0
0 1 0 .
0 0 1
64
CHAPTER 2. MATRICES
The system corresponding to this matrix is a = 0, b = 0, 0 = 1,
which is inconsistent.
3. Show that aX + bY + cW = O then a = b = c = 0.
Solution: This is, again, a problem of solving a system of linear
equations. Suppose O = aX + bY + cW. Then,
h
X Y
b =O
c
OR
1 1 0
2 0 0 b = 0
0
3 2 1
c
1 1 0 0
2 0 0 0
3 2 1 0
From TI-83/84, the matrix reduces to the following Gauss-Jordan
form:
1 0 0 0
0 1 0 0 .
0 0 1 0
X Y
b =O
c
OR
1 1 1
2 0 4 b = 0
c
3 2 4
0
65
1 1 1 0
2 0 4 0
is given by
3 2 4 0
1 0
0 1 1 0 .
0 0 0 0
a
b
c
0
=0 .
=0
"
5 4
"
29 28
1 2
Compute f (A).
Solution: We have
A2 = AA =
"
5 4
1 2
#"
5 4
1 2
66
CHAPTER 2. MATRICES
"
29 28
7
"
35 28
7
14
"
6 0
0 6
"
0 0
0 0
2.3
67
Homework: [Textbook, Ex. 9, 13, 25, 27, 33, 35, 37, 41, 45 ; page
84-]
Main point in the section is to define and compute inverse of
matrices:
1. We give a formula to compute inverse of a 2 2 matrices.
2. We describe the method of row reduction to compute inverse of a
matrix of any size.
3. We use inverse of matrices to solve system of linear equations.
68
CHAPTER 2. MATRICES
and
AC = CA = I.
So,
B = BI = B(AC) = (BA)C = IC = C.
So, the proof is complete.
Remark. (1) Note that the proof works if C was only a right-inverse
and B was a left-inverse of A. (2) Also note that the proof did not use
any property of matrices, except associativity.
2.3.1
69
A=
a b
c d
1
=
ad bc
Proof. Write
d b
c
a
B=
First,
AB =
a b
c d
d b
c
a
"
d b
c
ad bc
0
0 ad bc
= (ad bc)I2 .
1
A
B = I2 .
ad bc
1
B A = I2 . So, the proof is complete.
Similarly, adbc
70
CHAPTER 2. MATRICES
Solution: We have ad bc = 1(3) (2)2 = 1. So, by theorem
2.3.3,
A1
1
=
ad bc
"
d b
c
"
3 2
2 1
2.3.2
The second mothod of finding the inverse evolves out of the spirit of
solving equation. Suppose A is an n n matrix and it has an inverse
X, where X is an n n matrix. To find X, we have to solve the
equation AX = In . The following method is suggested to solve
this equation:
1. Write the augmented matrix of this Equation AX = In as
[A | In ] .
2. If possible, row reduce A to the identity matrix I using elementary
row operations on the entire augmented matrix [A | I] . If the
result is [I | C] , then A1 = C. If this is not possible, the matrix
is not invertible (or singular).
3. Check your work by multiplying AA1 and A1 A to see AA1 =
A1 A = I.
Justifcation or Proof. Suppose B is an m n matrix. Then, each
elemetary row operation on a matrix B is same as left-multiplication
of B by a matrix:
1. For example, multiplying the ith row B by a constant is same as
left-multiplication of B by the diagonal matrix of order n, whose
(i, i)entry is c and other digonal entries are 1 (and rest of the
entries are zero).
71
0 1
O
.
S= 1 0
O
Im2
We use the notation O to denote the zero matrix of appropriate
size. So, we mean SB is the matrix obtained by switching first
and second row of B.
1 0
O
.
E = c 1
O
Im2
So, we mean EB is the matrix obtained from B by adding ctimes
the first row to second. We can write down a similar fact for
adding ctimes the ith row to j th row.
[EA | E] = [I | C].
1
2
3
A= 3
7
9 .
1 4 7
72
CHAPTER 2. MATRICES
Solution: Augment this matrix with the idetity matrix I3 and we have
1
2
3 1 0 0
7
9 0 1 0 .
3
1 4 7 0 0 1
to I3 , using row operations. Subtract 3 times first row from second and
add first roe to third:
1 0 0
1
0 3 1 0 .
0
0 2 4
1 0 1
Now subtract 2 times second row from first and add 2 times second row
to third:
1 0
1 0 .
2 1
0 3
0 1
0 0 4 5
1 0 3
7
0 1 0 3
7 2 0
0 .
0 0 1 1.25 .5 .25
1
1 0 0 3.25 .5
1
0 1 0 3
So,
.75
0 .
0 0 1 1.25 .5 .25
3.25 .5
A1 = 3
.75
0 .
1.25 .5 .25
1
73
Exercise 2.3.6 (Ex. 12, p. 84) Compute the inverse of the matrix
10 5 7
A = 5 1
4 .
3 2 2
Solution: Augment this matrix with the idetity matrix I3 and we have
10 5 7 1 0 0
4 0 1 0 .
5 1
3 2 2 0 0 1
According to the above method, we will try to reduce the left 3 3 part
to I3 , using row operations. Divide first row by 10:
1 .5 .7 .1 0 0
4 0 1 0 .
5 1
3 2 2 0 0 1
Add 5 times first row to second and substract 3 times first row from
third:
.5 .7
0 3.5
0 .5
.5 1 0 .
.1 .3 0 1
.5
1 .5 .7
1
0 1
7
0 .5
.1 0 0
.1 0 0
1
7
2
7
0 .
.1 .3 0 1
Subtract .5 times second row from both the first and third:
1
1
1 0 54
0
70
35
7
1
1
2
0 .
0 1
7
7
7
1
13
0 0
35
17 1
35
74
CHAPTER 2. MATRICES
1 0 54
70
1
7
1
7
71
2
7
0 .
1 13 5 35
0 1
0 0
Subtract
1
35
1
7
54
70
1 0 0 10 4
27
2
1 5 .
0 1 0
0 0 1 13 5 35
So,
A1 =
2.3.3
10 4
27
1 5 .
13 5 35
2
Properties of Inverses
75
1 1
A
c
1
(cA)
= (c )(AA1 ) = 1I = I.
c
1 1
(cA) = I. So, (3) is proved. Finally,
Similarly, c A
T
T
AT A1 = A1 A = I T = I.
T
(AB) B 1 A1 = I = B 1 A1 (AB).
But
76
CHAPTER 2. MATRICES
Theorem 2.3.9 (Cancellation Property) Let A, B be two invertible matrices of order n and C be an invertible matrix of the same
order. Then
AC = BC = A = B
CA = CB = A = B.
and
x=
"
x
y
b=
"
3
7
77
1
=
4
"
1 1
2 2
The solution is
1
x = A1 b =
4
"
1 1
2 2
#"
3
7
"
1
5
"
1 1
2 2
#"
1
3
"
1
1
2x +y = 10
Solution: The system can be writeen as Ax = b where A, x are
same as in (1) and
"
#
"
#
6
1
1
1
b=
. W e already computed A1 =
.
4 2 2
10
78
CHAPTER 2. MATRICES
The solution is
x = A1 b =
1
4
"
1 1
2 2
#"
6
10
"
4
2
Exercise 2.3.12 (Ex. 28, p. 85) Solve the following two linear systems.
1. Solve the linear system of equations:
x1
+x2 3x3 =
x1 2x2
x1
x2
Solution: With
1
1 3
A = 1 2
1
1 1 1
+x3 =
x3 = 1
x1
x = x2
x3
b=
0
1
1
1 3 1 0 0
1 0 1 0
1 2
1 1 1 0 0 1
1
1 3
1 0 0
4 1 1 0
0 3
0 2
2 1 0 1
1
1 3
1
0 0
1
1 43
31 0
0
3
0 2
2 1
0 1
79
Subtract second row from first and add 2 times second to third
row:
1 0 53
2
3
1
3
13
0 1 43
0 0 23
1
3
31
32
0
1
Add
5
3
1 0 53
2
3
1
3
1
2
0 1 43
0 0
1
1
3
13
1 32
4
3
second:
By theorem 2.3.3,
2 52
0 1 0 1 1 2
0 0 1 12 1 32
The solution is
3
2
1 0 0
3
2
2 52
A1 = 1 1 2
1
1 32
2
3
2
2 25
5
2
x = A1 b = 1 1 2 0 = 2
1
3
1 23
1
2
2
2. Solve the linear system of equations:
x1
+x2 3x3 = 1
x1 2x2
+x3 =
x2
x3 =
x1
80
CHAPTER 2. MATRICES
Solution: With A and x as in (1) and with
b= 2
0
3
2
2 52
x = A1 b = 1 1 2
1
1 32
2
2.5
2 = 1 .
0
1.5
Exercise 2.3.13 (Ex. 34, p. 85) Suppose A, B arer two 2 2 matrices and
A1 =
"
1
7
2
7
27
3
7
and B 1 =
"
5
11
3
11
2
11
1
11
72
1
7
2
7
4 9
1. Compute (AB)1 .
Solution: By theorem 2.3.8, we have
"
(AB)
1 1
=
11 7
=B A
"
3 1
#"
5
11
3
11
2 1
3 2
2
11
1
11
#"
1
=
77
"
3
7
9 1
2. Compute (AT )1 .
Solution: By theorem 2.3.7, we have
"
#!T "
1
2
72
7
7
(AT )1 = (A1 )T =
=
3
1
2
7
3
7
2
7
81
17
1
1
7
7
(2A)1 = A1 =
=
3
3
2
2
2
7
7
14
1
14
2
14
2.4
"
1 0
0 1
. so 4 x = 1;
so x = 3.
Elementary Matrices
82
CHAPTER 2. MATRICES
2.5
Homework: [Textbook, 2.5 Ex. 15, 17, 19, 21, 23; p. 113].
Main point in this section is to do some applications of matrices.
1. We discuss stochastic matrices. But we will not go deeper into it.
2. We discuss application of matrices in Cryptography.
2.5.1
83
Stochastic matrices
P =
of size n n
2.5.2
Cryptography
84
CHAPTER 2. MATRICES
First, we assign a number to each letter in the letter as follows:
0 = space 1 = A 2 = B
3=C 4=D
5=E
6=F
7=G
8=H
9 = I 10 = J 11 = K 12 = L 13 = M 14 = N 15 = O
16 = P 17 = Q 18 = R 19 = S 20 = T 21 = U 22 = V 23 = W
24 = X 25 = Y 26 = Z
2.5.3
Encoding
14
A = 3 3 1
3
2
1
85
uncoded A
encoded
h
i
h
i
= 203 6 9
16 12 5 A
h
i
h
i
A
=
1 19 5
28 45 13
h
i
h
i
= 42 47 14
0 19 5 A
h
i
h
i
= 184 16 10
14 4 0 A
h
i
h
i
= 179 9 12
13 15 14 A
h
i
h
i
= 5 65 20
5 25 0 A
3 4 2
A= 0 2 1
4 5 3
11
A1 = 4
3 .
8 1 6
86
CHAPTER 2. MATRICES
So, the uncoded matrices (and corresponding letters) are given by:
encoded A1
h
i
112 140 83 A1
h
i
19 25 13 A1
h
i
72 76 61 A1
h
i
95 118 71 A1
h
i
20 21 38 A1
h
i
35 23 36 A1
h
i
42 48 32 A1
unencoded
i
= 8 1 22
h
i
= 5 0 1
h
i
= 0 7 18
h
i
= 5 1 20
h
i
= 0 23 5
h
i
= 5 11 5
h
i
= 14 4 0
h
word
HAV
E A
GR
EAT
WE
EKE
ND