20120229000242SMA3013 - Chapter 1
20120229000242SMA3013 - Chapter 1
20120229000242SMA3013 - Chapter 1
CHAPTER 1
1.1 INTRODUCTION Definition 1 : Linear Equation A linear equation in the n variables x1, x2, , xn is an equation that can be written in the form
a1 x1 a2 x2 ... an xn ! b
Where the coefficients a1, a2, , an and the constant term b are constants.
Example
The following equations are linear.
(i ) 3 x 4 y ! 1
1 15 (ii) r s t ! 9 2 3 T T (iii ) 2 x y sin z ! 1 4 5 (iv) 3.2 x1 4.6 ! 0.01x2
Linear since can be written in the form of 3.2x1 0.01x2= 4.6
4
Examples
The following equations are not linear.
(i ) xy 2 z ! 1
3 (ii ) x12 x2 ! 3
Linear equations do not contain products, reciprocals, or other functions of the variables.
z !1
A solution of a linear equation a1x1 + a2x2 + + anxn = b is a vector [s1, s2, , sn] whose components satisfy the equation when we substitute x1=s1, x2=s2, , xn=sn.
Example
(a) [5,4] is a solution of 3x (Other solution : [1,1]) 4y = -1.
If x = t, solving for y: [t, + ()t] (the parametric form)
(b) [3,0,0] , [0,1,2] & [6,1,-1] are solutions of x1 x2 +2x3 = 3. If x2 = s, x3=t, solving for x1:
[3+s 2t, s, t]
In general, the solutions simply correspond to the points on the line determined by the given equation.
SMA3013 sem 2 2011/2012 6
Definition 2 : System of Linear Equations A system of m linear equation in the n variables x1, x2, , xn is a collection of equations:
a11x1 + a12x2 + a21x1 + a22x2 + + a1nxn = b1 + a2nxn = b2
Also referred as mxn linear system
:
am1x1 + am2x2 +
:
+ amnxn = bn
Where the coefficients a1, a2, , an and the constant term b are constants.
SMA3013 sem 2 2011/2012 7
3 x 3 linear system
ii.
4x4= 1 4x4 =3 =6
3 x 4 linear system
Notes: A system of linear equations is a finite set of linear equations, each with the same variables. A solution of a system of linear equations is a vector that is simultaneously a solution of each equation in the system. The solution set of a system of linear equations is the set of all possible solutions of the system.
[2,1] is a solution for this system since it is a solution for both equations.
How about [1,-1] ?
[1,-1] is not a solution of the system since it satisfies only the first equation.
SMA3013 sem 2 2011/2012 10
A system of linear equations is called consistent if it has at least one solution. A system with no solutions is called inconsistent. A system of linear equations with real coefficients has either (a) A unique solution (a consistent system) or (b) Infinitely many solutions (a consistent system) or (c) no solutions (an inconsistent system)
11
Example
Solve the following systems of linear equations. (a) x y=1 (b) x 2x y=2 2y = 4 (c) x x y=1 y=3
x+y=3
(a) [2,1] is the only solution for both equations. Therefore, [2,1] is a unique solution. (with point of intersection (2,1))
12
(b) The second equation just twice the first. (the solutions are the solutions of the first equation alone namely, the points on the line x y = 2) Can be represented parametrically as : [2 + t, t] Then, this system has infinitely many solutions.
no intersection.
13
Solving a System of Linear Equations Two linear systems are called equivalent if they have the same solution sets. Example x y=1 and x y=1 y=1
x+y=3
This two linear systems are equivalent, since they both have the unique solution [2,1].
14
y + 3z = 5 5z = 10
Starting from the last equation and working backward, we have the unique solution of the system : [3, -1, 2].
This procedure is called back substitution.
SMA3013 sem 2 2011/2012 15
Next, substitute (4) in (2): -(4 y z) y + z = -2 2z = -2 + 4 z = 1. (5) Next, find the values of x & y : answer: x = 1 , y = 2 Then, the system is consistent with the unique solution (1, 2, 1) #
SMA3013 sem 2 2011/2012 16
3y + 2z = 16 y+z=9
17
Eg. ( 3 x 3 matrix)
18
Types of Matrices
Some terms : row matrix column matrix diagonal entries square matrix diagonal matrix scalar matrix identity matrix
19
Examples of matrices
a11 a A ! 21 : am1
a12 a22 : am 2
2 5 0 B! 1 4 1
1 0 0 0 1 0 E! 0 0 1
3 1 C! 4 5
3 0 0 D ! 0 6 0 0 0 2
20
Notes: Two matrices are equal if they have same size & if their corresponding entries are equal. Example.
2 5 0 B! 1 4 1 H ! ?1 4 3A
a b c F ! d e f 1 J ! 4 3
SMA3013 sem 2 2011/2012
2 5 G! 1 4
21
Matrix Operations
1. Matrix Addition Defined with componentwise. If A ! [aij ] then the sum A B and B ! [bij ] are m v n matrices, is the
mv n .
A B ! [aij bij ]
22
Examples
2 5 0 Let B ! 1 4 1
6 2 3 and K ! , then, 2 1 5
23
2 5 0 6 2 3 4 7 3 BK ! 1 5 ! 0 2 1 1 1 4 1
A0 ! A ! 0 A
and
A A ! 0 ! A ( A)
24
2. Matrix Multiplication If A is an m v n matrix and B is an n v r matrix, then the product C=AB is an m v r matrix. The (i,j) entry of the product is computed as follows:
A mv n
Same
B nvr
AB mvr
Size of AB
SMA3013 sem 2 2011/2012 25
Example
21 16 2 5 6 2 3 7 GK ! 1 5 ! 10 22 5 2 1 4
26
3. Matrix Power
(A ) ! A
r s
rs
27
28
4. The transpose of a matrix The transpose of an m v n matrix A is the n v m matrix AT obtained by interchanging the rows and columns of A. That is, the i th column of AT is the i th row of A for all i. Examples
2 B! 1 2 B T ! 5 0 5 0 4 1 1 4 1 H ! ?1 4 3A 1 H T ! 4 3
29
Note: A square matrix A is symmetric if and only if Aij ! A ji for all i and j. Examples
1 3 2 A ! 3 5 0 2 0 4 1 2 B! 1 3
30
Theorem: Let A, B and C be matrices of the same size and let c and d be scalars. Then, a. A+B = B+A b. (A+B)+C = A+(B+C) c. A+ 0 =A d. A+ (-A) = 0 e. c(A+B) = cA + cB f. (c+d)A = cA + dA g. c(dA) = (cd)A h. 1A = A
SMA3013 sem 2 2011/2012 31
(Commutativity) (Associativity)
(Distributivity) (Distributivity)
Note: Generally, if A1, A2, , Ak are matrices of the same size and c1, c2, , ck are scalars, we may form the linear combination:
c1 A1 c2 A2 ... ck Ak
where c1, c2, , ck are called as the coefficients of the linear combination.
32
33
34
Note: Properties (b) & (d) can be generalized to sums and products of finitely many matrices.
35
Example
4 1 0 1 2 Let A ! and B ! 2 3 1 . 3 4
Then, A + AT and BBT are symmetric.
36
Theorem a. If A is a square matrix, then A + AT is a symmetric matrix. b. For any matrix A, AAT and ATA are symmetric matrices. Proof (a): (A + AT)T = AT + (AT)T = AT + A = A + AT . Then, A + AT is symmetric .
SMA3013 sem 2 2011/2012 37
y1 ! 2 x1 x3 y2 ! 5 x1 x2 3 x3
x1 y1 2 0 1 y ! 5 1 3 x2 2 x3
y F x Also can be written as y = Fx
38
x1 2 x2 3 x3 ! 5 x1 3 x2 x3 ! 1 2 x1 x2 4 x3 ! 14
Linear system
1 2 3 x1 5 1 3 1 x ! 1 2 2 1 4 x3 14
Ax = b
SMA3013 sem 2 2011/2012
Matrix equation
39
Augmented Matrix
40
Example
2x y z ! 3 x 5z ! 1
Linear System
x 3y 2z ! 0
2 1 1 1 0 5 1 3 2
Coefficient matrix
2 1
1 1 3 0 5 1
1 3 2 0
SMA3013 sem 2 2011/2012
Augmented matrix
41
Definition 4 : (ERO)
The following elementary row operations can be performed on a matrix: 1. Interchange two rows. 2. Multiply a row by a nonzero constant. 3. Add a multiple of a row to another row.
SMA3013 sem 2 2011/2012 42
Note: ERO a procedure to reduce any matrix to a matrix in row echelon form. - can be performed on a system of linear equations to transform it into an equivalent system.
43
Notes:
Some notations for the three elementary row operations: 1. Ri m Rj means the interchange rows i and j. 2. kRi means multiply row i by k. 3. Ri + kRj means add k times row j to row i (and replace row i with the result).
Row reduction
The process of applying elementary row operations to bring a matrix into row echelon form.
44
Definition 5. (Row Echelon Form) A matrix is in row echelon form if it satisfies the following properties: 1. Any rows consisting entirely of zeros are at the bottom. 2. In each nonzero row, the first nonzero entry (called the leading entry/ pivot ) is in the column to the left of any leading entries below it.
45
Example
The following matrices are in row echelon form.
2 4 1 0 1 2 0 0 0
1 0 1 0 1 5 0 0 1
1 1 2 1 0 0 1 3 0 0 0 0
0 0 0 0
1 1 3 0 1 1 2 2 0 0 0 4 0 0 0 0 0 5 2 0
46
Example
Solve the following augmented matrix.
4 1
1 0 0
01 1 5 0 4
1 1
21
0 1 2
0 0 1 3
9 x1 ! , x2 ! 2 2
No Solution
x1 ! 5 t x2 ! t x3 ! 3
47
Example
Reduce the following matrix to echelon form.
1 1 1 2 3 1 1 1 2
Answer:
1 1 1 2 3 1 1 1 2
R2 R3
2R1 R1
1 1 1 0 1 1 0 2 3
R3 + 2R2
1 1 1 0 1 1 0 0 5
48
Notes: The row echelon form of a matrix is not unique. The leading entry in each row is used to create the zeros below it. The pivots are not necessarily the entries that are originally in the positions eventually occupied by the leading entries. Once we have pivoted and introduced zeros below the leading entry in a column, that column does not change. (The row echelon form emerges from left to right, top to bottom).
49
Examples.
Use ERO to reduce the following matrices to the row echelon form.
a.
0 2 1 0 0 5 6 3 1
b.
3 5 5 2 2 4
c.
3 2 1 2 1 1 4 3 1
50
Solution (a):
0 2 1 0 0 5 6 3 1
R1 m R3
6 3 1 0 0 5 0 2 1
R2 m R3
6 3 1 0 2 1 0 0 5
51
Solution (b):
3 5 5 2 2 4
R1
R3
1 1 5 2 2 4
R2
5R1
1 1 0 7 2 4
R3
2R1
1 1 0 7 0 2
7R3 + 2R2
1 1 0 7 0 0
52
Solution (c):
3 2 1 2 1 1 4 3 1
R1
R2
1 1 0 2 1 1 4 3 1
R3 R2
R2
2R1
1 1 0 0 1 1 4 3 1
R3
4R1
1 1 0 0 1 1 0 1 1
1 1 0 0 1 1 0 0 0
53
Definition (Row Equivalent) Matrices A and B are row equivalent if there is a sequence of elementary row operations that converts A and B. Example
1 1 1 2 3 1 1 1 2
are row equivalent.
SMA3013 sem 2 2011/2012 54
and
1 1 1 0 1 1 0 0 5
Theorem Matrices A and B are row equivalent if and only if they can be reduced to the same row echelon form.
55
56
Example:
2 4 1 0 1 2 0 0 0
Rank 2
1 0 1 0 1 5 0 0 1
Rank 3
1 1 2 1 0 0 1 3 0 0 0 0
Rank 2
Theorem (The Rank Theorem) Let A be the coefficient matrix of a system of linear equations with n variables. If the system is consistent, then number of free variables = n rank(A)
57
1 0 1 0 1 5 0 0 1
3 3 = 0 free variable
1 1 2 1 0 0 1 3 0 0 0 0
4 2 = 2 free variables
58
Exercises: Determine whether the following augmented matrices has a unique solution, infinitely many solutions, or no solution.
a.
0 0 12 0 1 31 1 0 11
b.
3 2 0 1 1 1 2 3 1 1 2 4 6 2 0
c.
1 2 3 4 56 6 5 4 3 21 7 7 7 7 77
59
Determinant of a Matrix
a23 a21 a23 a21 a22 a12 a13 a33 a31 a33 a31 a32
60
a11 A! a21
a12 is a22
! (1) a1 j det A1 j
61
Example
Compute the determinant of
5 3 2 A ! 1 0 2 2 1 3
Solution:
det A ! 5
1 3
(3)
1 2 2 3
2
2 1
62
Definition 8 (Determinant of nxn matrix) Let A=[aij] be an nxn matrix, where n u 2. Then the determinant of A is the scalar
det A !| A |! a11 det A11 a12 det A12 ... ( 1)1 n a1n det A1n ! (1)1 j a1 j det A1 j
j !1 n
63
Example
Compute the determinant of
2 3 0 5 4 2 A! 1 1 0 2 1 0
1 0 3 0
Solution.
4 1 2 0 0 0 5 2 0 5 2 4 1 2 0
det A ! 2 1 0 3 (3) 1
0 3 0 (1) 1
1 0
2 0 0
64
Definition 9 (Minors & Cofactors of a Matrix) If A is a square matrix, then the minor Mij, associated with the entry aij , is the determinant of the (n 1)x(n 1) matrix obtained by deleting row i and column j from the matrix A. The cofactor of aij is Cij = (-1)i + j Mij
OR
65
det A ! a1 j C1 j
j !1
66
Example
Compute the determinant of the matrix
by
5 3 2 A ! 1 0 2 2 1 3
(a)cofactor expansion along the third row and, (b) cofactor expansion along the second column.
67
Solution:
! 2(6) 8 3(3) !5 (b) det A ! a12C12 a22C22 a32C32 1 2 5 2 (1) 5 2 ! (3) 0 1 2 2 3 2 3 ! 3(1) 0 8 !5
SMA3013 sem 2 2011/2012 68
Example Compute the determinant of the following matrix using the cofactor expansion.
2 3 0 5 4 2 A! 1 1 0 2 1 0 1 0 3 0
Which row/ column suitable to choose?
69
Solution:
Exercise
Compute the determinants for the following matrices.
1 1 2 5 (b) B ! 0 1 1 4
0 2 0 2
3 6 0 1
3 1 2 2 1 4 1 3
71
Definition 10 (Triangular Matrices) An m x n matrix is an upper triangular if aij = 0, for all i > j, and is lower triangular if aij = 0, for all i < j. A square matrix is a diagonal matrix if aij = 0, for all i { j.
72
73
Theorem The determinant of a triangular matrix is the product of the entries on its main diagonal. Specifically, if A = [aij] is nxn, then
Example
To compute the determinant of
1 1 3 A ! 0 4 2 0 0 1
det A = 1(4)(1) = 4
74
Properties of Determinant
Let A=[aij] be a square matrix. a. If A has a zero row (column), then det A = 0. b. If B is obtained by interchanging two rows (columns) of A, then det B = - det A. c. If A has two identical rows (columns), then det A = 0. d. If B is obtained by multiplying a row (column) of A by k, then det B = k det A. e. If A, B and C are identical except that the ith row (column) of C is the sum of the ith rows (columns) of A & B, then det C = det A + det B. f. If B is obtained by adding a multiple of one row (column) of A to another row (column), then det B = det A.
75
76
77
THE INVERSE OF A SQUARE MATRIX Definition 11 (Inverse/ invertible) If A is an n v n matrix, an inverse of A is an n v n matrix A with the property that
AA ' ! I and A' A ! I
78
Example
If
79
0 0 O! 0 0
b.
1 2 B! 2 4
There is no O such that OO =I=O O since any product with the zero matrix will never equal to the identity matrix I.
w 2y !1
x 2z ! 0 2w 4 y ! 0 2x 4z ! 1
By our calculations, we can show that 0 = -2. Therefore, there is no solution.
80
Some questions: How can we know when a matrix has an inverse? If a matrix does have an inverse, how can we find it?
81
Theorem
If A is invertible matrix, then its inverse is unique.
Proof: Suppose A has two inverses A & A . Then, AA = I = A A AA = I = A A Thus, A = AI = A (AA ) by (2) = (A A) A = IA =A .
82
(1) (2)
and
by associativity by (1)
Theorem
If
a b A! , then A is invertible if c d
ad bc { 0 , in which
case
1 d b A ! ad bc c a
1
If
Matrix A will have an inverse if and only if it is row equivalent to the identity matrix
SMA3013 sem 2 2011/2012 83
Example
1 2 1 A ! 2 2 4 , reduce A to I. 1 3 3
If
Solution: 1 2 1 2 2 4 1 3 3
R1 2R2 R2 R3 2R1 R1
1 2 1 0 2 6 0 1 2
R3 m R2
1 2 1 0 1 2 0 2 6 1 0 10 0 1 2 0 0 1
R3 + 2R2
1 0 3 R1 + R2 0 1 2 0 0 10
1 0 1 R1 m R3 0 1 2 0 0 10
84
R2 + 2R3 R1 + 10R3
1 0 0 0 1 0 0 0 1
85
Note:
ad bc is called the Recall that the expression determinant of A, and denoted by det A.
a b The formula for the inverse of c d
86
Examples
Find the inverses of exist.
2 1 4 2 1 A1 ! 1 3 1 ! 3 2 2 2
(-15)(4) = 0, so that B is not invertible.
87
4 7 a. A ! 1 2
b.
3 4 B! 5 6
3 5 2 3
c.
2 C! 2 2 2
2 2
det = 8
7=1
det B = 6/12 =0
15/30
1 2 7 1 A ! 1 1 4 2 7 ! 1 4
@ B is not invertible
2 2 1 1 C ! 2 9 2 2 2 2 2 9 9 ! 2 2 2 18 88 9
Theorem If A is an invertible nvn matrix, then the system of linear equations given by Ax = b has a unique solution x = A-1b for any b in Rn .
Proof: To show : 1. Ax = b has a solution 2. Ax = b has unique solution
A(A-1b) = (AA-1)b =Ib = b. Then, A-1b satisfies equation Ax = b. Hence, there is at least this solution.
89
2. To show x is unique. Suppose y is another solution. Then, Ay = b A-1(Ay) = A-1b (A-1A)y = A-1b Iy = A-1b y = A-1b. Thus, x = y. Therefore, the solution is unique. Multiplying A-1 to both sides
90
Example Use the inverse of the coefficient matrix to solve the linear system
x 2y ! 3 3 x 4 y ! 2
Solution: Here we have,
By theorem, Also,
1 2 A! and 3 4
3 . b! 2
2 1 8 3 x! 3 1 ! 11 2 2 2 2
Hence,
91
( A 1 ) 1 ! A
b. If A is an invertible matrix and c is a nonzero scalar, then cA is an invertible matrix and
1 1 (cA) ! A c
1
c. If A and B are invertible matrices of the same size, then AB is invertible and
( AB) 1 ! B 1 A1
92
( AT ) 1 ! ( A1 )T
e. If A is an invertible matrix, then An is invertible for all nonnegative integers n and
(A ) ! (A )
n 1
1 n
Note: Property (c) can be generalized to products of finitely many invertible matrices: If
A1 , A2 ,..., An are invertible matrices of the same size, then A1 , A2 ,..., An is invertible and
( A1 A2 ... An ) 1 ! An1... A2 1 A11
SMA3013 sem 2 2011/2012
93
Notes: The inverse of a product of invertible matrices is the product of their inverses in the reverse order. If A is an invertible matrix and n is a positive integer, then A-n is defined by
A n ! ( A 1 ) n ! ( An ) 1
( A B ) 1 ! A1 B 1 is not true in general, for square
matrices A, B.
94
Example
Suppose that B is an invertible matrix and A is any matrix with AB = BA. Show that A and B-1 commute. Solution: ( To show AB-1 = B-1A ) From hypothesis AB = BA. Multiply both sides with B-1. Then, (AB)B-1 = (BA) B-1 A(B B-1) = B (A B-1) A I = B A B-1 B-1 A = B-1 B A B-1 B-1 A = A B-1 . Therefore, A and B-1 commute.
95
Example Solve the following matrix equation for X (assuming that the matrices involved are such that all of the indicated operations are defined):
A1 ( BX ) 1 ! ( A1 B 3 ) 2
A ( BX ) ! ( A B ) (( BX ) A) ! ( A B )
1 1 1 3 2
1
1
3 2
96
X ! B 4 AB 3
Exercises
Solve the given matrix equation for X (Simplify the answers as much as possible).
AXB ! ( BA)
ABXA1 B 1 ! I A
97
Solutions:
(a)AXB
1
1
Elementary Matrices
Example If
1 0 0 E ! 0 0 1 0 1 0
5 7 EA ! 8 3 1 0
and
5 7 A ! 1 0 8 3
Then,
Note: Multiplying A by E has the same effect as interchanging rows 2 and 3 of A (same as we do ERO R2m R3 of A). Hence, A is called an elementary matrix.
SMA3013 sem 2 2011/2012 99
Definition 12 : (Elementary Matrix) An elementary matrix is any matrix that can be obtained by performing an elementary row operation on an identity matrix.
Examples Let
1 0 E1 ! 0 0 0 0 0 3 0 0 0 1 0 0 0 1 0 0 E2 ! 1 0 0 1 0 1 0 0 0 0 0 0 0 1 1 0 0 1 E3 ! 0 0 0 2 0 0 0 0 1 0 0 1
and
3R2
R1 m R3
SMA3013 sem 2 2011/2012
R4
2R2
100
Theorem Let A be a square matrix. If B is a square matrix such that either AB = I or BA = I, then A is invertible and B = A-1.
101
Example
3 9 1 2 1 2 2 2 4 A! and B ! 5 1 1 3 3 1 2 2 5 3. 1
Let
Since Then,
1 0 0 1 0 0 AB ! 0 1 0 ! I or BA ! 0 1 0 ! I , 0 0 1 0 0 1
and B = A-1.
A is invertible
102
Theorem Let A be a square matrix. If a sequence of elementary row operations reduces A to I, then the same sequence of elementary row operations transforms I into A-1.
Example
If , reduce A to I and determine A-1.
103
Solution:
R2 + R1 R2 m R3
R2
R1 R3
R2 3R2
R2 + R3 R1 + R3 Then, This method is called as Gauss Jordan Elimination more detail in Chapter 2
SMA3013 sem 2 2011/2012 104
Exercise:
Determine the inverse matrix of the following matrices:
105