Chapter 1
Chapter 1
Chapter 1
International University
Spring 2014
1 / 102
Contents
1
Basic concepts
Matrix Operations
Inverse matrices
The LU factorization
Spring 2014
2 / 102
Introduction
Linear Algebra has become as basic and as applicable as calculus, and
fortunately it is easier. Gilbert Strang, MIT
Spring 2014
3 / 102
Introduction
Spring 2014
4 / 102
What is a Vector?
A vector, represented by an arrow, has both a direction and a
magnitude. Magnitude is shown as the length of a line segment.
Direction is shown by the orientation of the line segment, and by an
arrow at one end.
Equal vectors have the same length and direction but may have
different starting points.
Spring 2014
5 / 102
What is a Vector?
Consider the figure below:
Each of the directed line segments in the sketch represents the same
vector. In each case the vector starts at a specific point then moves 2
units to the left and 5 units up.
Notation: ~v = h2, 5i or ~v = (2, 5).
Be careful to distinguish vector notation ~v = (2, 5) from the notation we
use to represent coordinates of points, A(2, 5) .
Nguyen Minh Quan (HCMIU-VNU)
Spring 2014
6 / 102
Vectors
Given the two points A(a1 , a2 ) and B(b1 , b2 ), the vector with the
~ is AB
~ = (b1 a1 , b2 a2 ).
representation AB
The magnitude, or length, of the vector ~v = (a, b) is given by,
p
k~v k = a2 + b 2
Example, if ~v = (3, 5) then its magnitude
k~v k = 9 + 16 = 5
Any vector with magnitude of 1 is called a unit vector, e.g.,
~v1 = (0, 1), or ~v2 = (1, 0) (standard basis vectors).
Zero Vector, ~0 = (0, 0), is a vector that has no magnitude or
direction.
Nguyen Minh Quan (HCMIU-VNU)
Spring 2014
7 / 102
Spring 2014
8 / 102
Spring 2014
9 / 102
(1)
4x + 5y = 6
(2)
Spring 2014
10 / 102
Spring 2014
11 / 102
Spring 2014
12 / 102
Spring 2014
13 / 102
Spring 2014
14 / 102
Spring 2014
15 / 102
Spring 2014
16 / 102
Spring 2014
17 / 102
Spring 2014
18 / 102
What is a Matrix?
A matrix is a set of elements, organized into rows and columns
=
cx + dy = f
c d
y
f
Nguyen Minh Quan (HCMIU-VNU)
Spring 2014
19 / 102
Example of matrix
The following matrix gives the airline distance between the indicated cities
(in statute miles):
Spring 2014
20 / 102
Example of matrix
Suppose that a manufacturer has four plants, each of which makes three
products. If we let aij denote the number of units of product i made by
plan j in one week, then the 3 4 matrix
gives the manufacturers production for the week. For example, plant 2
makes 270 units of product 3 in one week.
Spring 2014
21 / 102
Matrices
A matrix with m rows and n columns is called an m n matrix (m by n
matrix) or a matrix of order m n.
A matrix consisting of a single column is called a column vector and a
matrix consisting of a single row is called a row vector.
If m = n the matrix is called a square matrix. For example,
1 2 3
is a 2 by 3 matrix
4 5 6
1 2 3
3 5 1 is a (square) 3 by 3 matrix
7
0 9
Equality: Two matrices are said to be equal if they have the same order
and all the corresponding entries are equal.
Nguyen Minh Quan (HCMIU-VNU)
Spring 2014
22 / 102
Spring 2014
23 / 102
A= .
..
..
..
..
.
.
.
columns:
A=
a11
a21
..
.
a12
a22
..
.
..
.
a1n b1
a2n b2
..
.
Spring 2014
24 / 102
Example
Consider the linear system of equations
x1 2x2 + x3 = 0
2x2 8x3 = 8
4x1 + 5x2 + 9x3 = 9
Matrix of Coefficients is
1 2 1
0
2 8
4 5
9
Augmented matrix is
1 2 1 0
0
2 5 8
4 5
9 9
Spring 2014
25 / 102
Spring 2014
26 / 102
Definition
A matrix is in (row) echelon form if
a. All rows that contain only zeros are grouped at the bottom of the
matrix
b. For each row that does not contain only zeros, the pivot appears
strictly to the right of the pivot of each row that appears above it
Intuitively, a matrix is in row echelon
staircase pattern like
0
0 0
0 0 0 0
0 0 0 0
0 0 0 0
Nguyen Minh Quan (HCMIU-VNU)
0
0
Spring 2014
27 / 102
1 3 2 7
b) 0 3 1 7
0 0 2 9
4 2 1 7 9 1
0 0 5 9 1 2
c)
0 0
0 8 3 5
0 0
0 0 0 0
Spring 2014
28 / 102
1 3 2 7
b) 0 0 1 7
0 2 2 9
4 2 1 7 9 1
0 0 5 9 1 2
c)
0 0
0 8 3 5
0 0
0 7 1 0
Spring 2014
29 / 102
1 0 0
0 1 0
0 0 1
1 0 0
0 1 0
0 0 1
0 0 0
29
16
1
0
0
0
1
Remark:
(1) If the reduced augmented matrix is in echelon form, the method is
called Gauss Elimination.
(2) If the reduced augmented matrix is in reduced echelon form, the
method is called Gauss-Jordan Elimination.
Nguyen Minh Quan (HCMIU-VNU)
Spring 2014
30 / 102
2 1 3
5
0 3 2
17
0 0
5 10
Variables: x, y , z
Solution The first step is to find the associated linear system
2x + y 3z = 5
3y + 2z = 17
5z = 10
The system is in triangular form and we solve it by backward substitution:
5z = -10 leads to z = -2. Thus, y=-7, x=3.
Nguyen Minh Quan (HCMIU-VNU)
Spring 2014
31 / 102
2 3 1 5 2
0 3 2 1 2
0 0 2 8 4
Variables: x, y , z, w
Solution The associated linear system is
2x + 3y z + 5w = 2
3y + 2z w = 2
2z 8w = 4
Nguyen Minh Quan (HCMIU-VNU)
Spring 2014
32 / 102
Spring 2014
33 / 102
Spring 2014
34 / 102
0 3 6 4
9
1 2 1 3
1
A=
2 3 0
3 1
1
4
5 9 7
Hint
1 4
5
0 2
4
0 5 10
0 3 6
1
0
Echelon Form
0
0
Nguyen Minh Quan (HCMIU-VNU)
9 7
6 6
15 15
4
9
4
2
0
0
5 9 7
4 6 6
0 5 0
0 0
0
Spring 2014
35 / 102
Gaussian elimination
Example
Solve the following system
2x y z = 3
6x + 6y + 5z = 3
4x + 4y + 7z = 3.
Spring 2014
36 / 102
Gaussian elimination
Example
Solve the following system
2x y z = 3
6x + 6y + 5z = 3
4x + 4y + 7z = 3.
First, find the augmented matrix
2 1 1 3
2 1 1 3
3R1 +R2 R2
6 6
5 3
2 6
0 3
2R1 +R3 R3
4
4
7
3
0 6
9 3
Spring 2014
36 / 102
Gaussian elimination
2 1 1 3
2 1 1 3
2R +R3 R3
0 3
2 6
2 6 2
0 3
3
0 0
5 15
0 6
9
The matrix is now in row echelon form, so we find the associated system
2x y z = 3
3y + 2z = 6
5z = 15.
Thus, z = 3, then y = 4 and x = 2.
The solution is (x, y , z) = (2, 4, 3).
Spring 2014
37 / 102
Gaussian elimination
Example
Solve the following system with three equations and three unknowns:
2x + y + 5z = 1
x 3y + 6z = 2
3x + 5y + 4z = 0.
Spring 2014
38 / 102
Gaussian elimination
Example
Solve the following system with three equations and three unknowns:
2x + y + 5z = 1
x 3y + 6z = 2
3x + 5y + 4z = 0.
First, write down the augmented matrix
2 1 5 1
2
1
5
1/2R1 +R2 R2
1 3 6 2
0 7/2 7/2
3/2R1 +R3 R3
3 5 4 0
0 7/2 7/2
1
3/2
3/2
Spring 2014
38 / 102
Gaussian elimination
2
1
5 1
R +R3 R3
2
0 7/2 7/2 3/2
0
0
0 0
Spring 2014
39 / 102
Gaussian elimination
Example
Solve the following system with three equations and four unknowns:
x 2y z w = 4
3x + y + z 2w = 11
x + 12y + 7z + w = 31.
Spring 2014
40 / 102
Gaussian elimination
Example
Solve the following system with three equations and four unknowns:
x 2y z w = 4
3x + y + z 2w = 11
x + 12y + 7z + w = 31.
1 2 1 1 4
1
3R +R2 R2
3 1
1 2 11 1
0
R1 +R3 R3
1 12 7
1 31
0
1 2 1 1
2R +R3 R3
4
1
2
0 7
0 0
0
0
2 1 1 4
7
4
1 23
14 8
2 35
4
23
11
The last equation can not be solved. So the system has no solutions.
Nguyen Minh Quan (HCMIU-VNU)
Spring 2014
40 / 102
Theorem
If n is at all large, a good estimate for the number of operations is 1/3n3 .
Spring 2014
41 / 102
Theorem
If n is at all large, a good estimate for the number of operations is 1/3n3 .
Proof:
(1) Suppose we call each division, and each multiplication-subtraction, one
operation.
In column 1, takes n operations for every zero we achieve-one to find the
multiple, and the other to find the new entries along the row.
(2) There are n 1 rows underneath the first one, so the first stage of
elimination needs n(n 1) = n2 n operations.
Nguyen Minh Quan (HCMIU-VNU)
Spring 2014
41 / 102
n (n + 1) (2n + 1) n (n + 1)
k2 k =
6
2
=
n3 n
3
Spring 2014
42 / 102
Exercises
Solve the following system
2x + 5y z = 15
x y + 3z = 4
3x + 3y 5z = 2.
Answer: (x, y , z) = (1, 3, 2).
Spring 2014
43 / 102
Gauss-Jordan elimination
Gauss-Jordan method uses row operations to transform the augmented
matrix of a linear system of equations into one of the form from which the
solution can be immediately read.
For example, if we employ row operations of the augmented matrix A and
obtain the following
1 0 0 c1
Row operations
Row operations 0 1 0 c2
A ... . . .
.
.
.. .. . . .. ..
0 0 1 cn
Then, the solution is
x1 = c1 , x2 = c2 , ..., xn = cn
Recall: In Gauss-Jordan elimination, the reduced augmented matrix is in
reduced echelon form.
Nguyen Minh Quan (HCMIU-VNU)
Spring 2014
44 / 102
Gauss-Jordan elimination
Example
Use Gauss-Jordan method to solve the system
2x1 3x2 + x3 = 2
x1 2x2 + 3x3 = 1
3x1 2x2 + 4x3 = 2
Solution:
The augmented matrix is given by
2 3 1 2
A = 1 2 3 1
3 2 4 2
Spring 2014
45 / 102
Gauss-Jordan elimination
Solution (Cont.)
Employ row operations, we obtain
1 2 3 1
2 3 1 2
I12
2 3 1 2
A = 1 2 3 1
2
3 2 4 2
3 2 4
1 2 3 1
2R +R2 R2
1 5 4
1
0
3 2 4 2
1 2 3 1
3R +R3 R3
1
0 1 5 4
0 8 13 5
Spring 2014
46 / 102
Gauss-Jordan elimination
Solution (Cont.)
1 0 7 7
2R +R1 R1
2
0 1 5 4
8R2 +R3 R3
0 0 27 27
7
1
0
7
1
R R3
27 3
0 1 5 4
0 0 1 1
1 0 0 0
5R +R2 R2
3
0 1 0 1
7R3 +R1 R1
0 0 1 1
Spring 2014
47 / 102
Gauss-Jordan elimination
Example
Use Gauss-Jordan method to solve the system
3x1 + 2x2 x3 = 3
x1 x2 + 2x3 = 4
2x1 + 3x2 x3 = 3
Hint:
3 2 1
1 1 2
2 3 1
3
1 0 0
Row Operations
4 0 1 0
3
0 0 1
1
1
2
The solution is
x1 = 1, x2 = 1, x3 = 2
Nguyen Minh Quan (HCMIU-VNU)
Spring 2014
48 / 102
Exercises
Solve the following system
x 2y + z = 0
2y 8z = 8
4x + 5y + 9z = 9
Answer: (x, y , z) = (29, 16, 3).
Spring 2014
49 / 102
Exercises
Solve the following system
2x + 8y z + w = 0
4x + 16y 3z w = 10
2x + 4y z + 3w = 6
6x + 2y + 5z + w = 3
Answer: (x, y , z, w ) = (3, 1/2, 4, 2).
Spring 2014
50 / 102
Spring 2014
51 / 102
Exercises
It is known that three brands of fertilizer (Fertifun, Big Grow and Soakem)
are available that provide Nitrogen, Phosphoric Acid and Soluble Potash to
the soil. One bag of each brand provides the following units of each
nutrient:
Nitrogen
Phosphoric Acid
Potash
1 2 3
3 1 2
2 0 1
Spring 2014
52 / 102
i.e., it is the dot product of the row vector A and the column vector B.
Spring 2014
53 / 102
i.e., it is the dot product of the row vector A and the column vector B.
Example
If
u = (3, 6, 2) , v = (4, 2, 4) ,
then
u v = 3 4 + 6 2 + 2 4 = 32
u u = 3 3 + 6 6 + 2 2 = 49 = kuk2
Spring 2014
53 / 102
a+e
c +g
b+f
d +h
=
c d
g h
c g
bf
d h
f
h
=
AB =
..
..
.
.
..
.
a1n b1n
a2n b2n
..
.
Spring 2014
54 / 102
2 3
10 15
5 4 1 = 20 5
1/5 6
1
30
A = A =
a11
a21
..
.
a12
a22
..
.
..
.
a1n
a2n
..
.
Spring 2014
55 / 102
Matrix Multiplication
The product AB of two matrices A and B is defined if and only if the
number of columns of A is equal to the number of rows of B.
(A)mn (B)np = (AB)mp
Furthermore, the entry in the i-th row and j-th column of AB is given by
the dot product of the i-th row of A and the j-th column of B. That is,
If A = (aij )mn , B = (bij )np , then AB = C = (cij )mp where
cij = ai1 b1j + ai2 b2j + + ain bnj , i.e.,
!
n
X
AB =
aik bkj
k=1
mp
Spring 2014
56 / 102
Scalar Multiplication
Example
Let
18.95
p = 14.75
8.60
Spring 2014
57 / 102
Scalar Multiplication
Solution
(a) Since each item is reduced by 20%, the 3-vector
(0.20) (18.95)
3.79
(0.20) p = (0.20) (14.75) = 2.95
(0.20) (8.60)
1.72
gives the price changes for the three items.
(b) The new prices of the items are given by the expression
18.95
3.79
15.16
p 0.20p = 14.75 2.95 = 11.80
8.60
1.72
6.88
Spring 2014
58 / 102
Example
5 2 3
2
1 = 10 2 12 = 4.
4
Example
2 3 1
1 2 4
5 3
4 0 = 25 7
15 1
3 1
Spring 2014
59 / 102
3 4 1
2 0 1
then
AB =
1 1 2
3
, B = 1 2
2
3 1
1 8 17
0 5 5
Example
Let
A=
1 x 3
2 1 1
2
and B = 4
y
12
If AB =
, find x and y .
6
Answer: x = 2, y = 6.
Nguyen Minh Quan (HCMIU-VNU)
Spring 2014
60 / 102
3 3 1
3 2 5
2
5 = 22
21
1
Spring 2014
61 / 102
Exercise
Multiply
2 1 3
4 7 8
4
6 ,B = 9 3
5
A= 0
6 10 5
1 1 2
Spring 2014
62 / 102
Exercises
A store brand X and brand Y dishwashers. The following matrices give the
sales figures and costs of these items for three months. Use matrix
multiplication to determine the total dollar sales and total costs of these
items for the three months.
Brand X
Brand Y
Retail Price
Dealer Cost
X Y
350 260
240 190
Spring 2014
63 / 102
Spring 2014
64 / 102
Spring 2014
64 / 102
Spring 2014
65 / 102
Spring 2014
66 / 102
Example: (AB)T = B T AT
0 1
1 3 2
A=
,B = 2 2
2 1 3
3 1
12 5
12 7
T
AB =
, (AB) =
7 3
5 3
1 2
0 2 3
T
T
A = 3 1 , B =
1 2 1
2 3
T
B A =
12 7
5 3
= (AB)T
Spring 2014
67 / 102
Remark
Spring 2014
68 / 102
Remark
A=
1 2
2 4
,B =
2 1
3 2
, and C =
AB = AC =
8 5
16 10
2 7
5 1
but B 6= C .
Spring 2014
68 / 102
Remark
Spring 2014
69 / 102
Remark
A=
1 2
2 4
, and B =
but
AB =
0 0
0 0
4 6
2 3
Spring 2014
69 / 102
a11 0
.
0 a22 0 ..
..
..
.
.
0
0
0
0
ann
Spring 2014
70 / 102
a11 0
.
0 a22 0 ..
..
..
.
.
0
0
0
0
ann
1 0 0
I3 = 0 1 0
0 0 1
It is easy to show that In A = AIn for any square n n matrix A.
Spring 2014
70 / 102
a11 0
.
0 a22 0 ..
..
..
.
.
0
0
0
0
ann
1 0 0
I3 = 0 1 0
0 0 1
It is easy to show that In A = AIn for any square n n matrix A.
A scalar matrix is a diagonal matrix whose diagonal elements are
equal.
Nguyen Minh Quan (HCMIU-VNU)
Spring 2014
70 / 102
(p factors)
Spring 2014
71 / 102
(p factors)
1
A= 0
0
7 5
2 1
0 2
Spring 2014
71 / 102
(p factors)
1
A= 0
0
7 5
2 1
0 2
1 0
B = 1 2
2 4
Nguyen Minh Quan (HCMIU-VNU)
0
0
2
Spring 2014
71 / 102
Transpose, Symmetric
The transpose of an m n matrix A = [aij ], denoted by AT is
obtained by interchanging the rows and columns of A, i.e.
[aij ]T = [aji ]
Example: Let
A=
1 2 3
4 8 7
1 4
AT = 2 8
3 7
A matrix A is symmetric if AT = A.
1
A = 1
4
Nguyen Minh Quan (HCMIU-VNU)
Example:
1 4
0 2
2 6
Spring 2014
72 / 102
Properties of Transpose
Theorem
If r and s are real numbers and A, B, and C are matrices of the
appropriate sizes then
(a) (AT )T = A
(b) (A + B)T = AT + B T
(c) (AB)T = B T AT
(d) (rA)T = r (AT ).
Proof:
Spring 2014
73 / 102
Skew Symmetric
A matrix A with real entries is called
Example:
0
A = 2
3
skew symmetric if AT = A.
2 3
0 0
4 0
Remark:
Spring 2014
74 / 102
Skew Symmetric
A matrix A with real entries is called
Example:
0
A = 2
3
skew symmetric if AT = A.
2 3
0 0
4 0
Remark:
If A is symmetric or skew symmetric, then A is a square matrix
(Why?).
If A is a symmetric matrix, then the entries of A are symmetric with
respect to the main diagonal of A.
A is symmetric if and only if aij = aji , and A is skew symmetric if and
only if aij = aji .
If A is an n n matrix, then we can show that A = S + K , where S is
symmetric and K is skew symmetric (Exercise).
Nguyen Minh Quan (HCMIU-VNU)
Spring 2014
74 / 102
Diagonal
Spring 2014
75 / 102
T
T
A= .
.. , X = (x1 , x2 , ..., xn ) and b = (b1 , b2 , ..., bn )
..
.
.
.
.
.
.
.
am1 am2 amn
Q: Can we find X as X = A1 b? And what is A1 ?
Nguyen Minh Quan (HCMIU-VNU)
Spring 2014
76 / 102
Inverse of a Matrix
Definition
Let A be an n n matrix. A matrix B is said to be the inverse of A if
AB = BA = In ,
where In is the n n identity matrix. In this case, we denote B by A1 .
And A is said to be invertible or nonsinglar.
Example
1 2
3 4
Thus,
1 2
3 4
2
1
3/2 1/2
1
=
=
2
1
3/2 1/2
2
1
3/2 1/2
1 2
3 4
=
1 0
0 1
1
2
1
1 2
,
=
3/2 1/2
3 4
Spring 2014
77 / 102
Inverse of a Matrix
If AB = In , then BA = In (why?).
Thus, to verify that B is an inverse of A, we need verify only that
AB = In .
Theorem
The inverse of a matrix, if it exists, is unique.
Spring 2014
78 / 102
Inverse of a Matrix
If AB = In , then BA = In (why?).
Thus, to verify that B is an inverse of A, we need verify only that
AB = In .
Theorem
The inverse of a matrix, if it exists, is unique.
Proof: Let B and C be inverses of A. Then AB = BA = In and
AC = CA = In . We then have
B = BIn = B(AC ) = (BA)C = In C = C ,
which proves that the inverse of a matrix, if it exists, is unique.
Nguyen Minh Quan (HCMIU-VNU)
Spring 2014
78 / 102
Inverse of a Matrix
Theorem
If A and B are both nonsingular n n matrices, then AB is nonsingular and
(AB)1 = B 1 A1
Proof:...
Hint: Show that (AB)(B 1 A1 ) = In and (B 1 A1 )(AB) = In .
Corollary
If A1 , A2 ,..., and Ak are nonsingular n n matrices, then A1 A2 ...Ak is
nonsingular and
1
1
(A1 A2 ...Ak )1 = A1
k Ak1 ...A1
Spring 2014
79 / 102
Inverse of a Matrix
Theorem
If A is a nonsingular matrix, then A1 is nonsingular and (A1 )1 = A.
Hint: Show that (A1 )A = A(A1 ) = In !
Theorem
If A is a nonsingular matrix, then AT is nonsingular and
(A1 )T = (AT )1
Proof: Taking transposes of the equation AA1 = In both sides, we get
A1
Similarly, AT A1
inverse of AT
T
AT = InT = In
T
Spring 2014
80 / 102
Inverse of a Matrix
Note: If A is nonsingular. Then AB = AC implies that B = C (Exercise).
Theorem
Let
A=
a b
c d
Example
3 4
5 6
3
2
5/2 3/2
A=
1
A
Nguyen Minh Quan (HCMIU-VNU)
Spring 2014
81 / 102
Theorem
An n n matrix A is invertible if and only if A is row equivalent to In , and
in this case, any sequence of elementary row operations that reduces A to
In also transforms In to A.
Spring 2014
82 / 102
Spring 2014
83 / 102
Finding A1
Example
Find the inverse of the matrix
1 3 3
A= 1 4 3
2 6 7
Solution: Step 1: We form the matrix
1 3
[A|I ] = 1 4
2 6
[A|I ]
3
3
7
as
1 0 0
0 1 0
0 0 1
Spring 2014
84 / 102
Solution (Cont.)
Step 2: Using Row Operations on [A|I ]
1 3 3
1 3 3 1 0 0
R2 R1 R2
0 1 0
1 4 3 0 1 0
[A|I ] =
R3 2R1 R3
0 0 1
2 6 7 0 0 1
1 0 0
1 1 0
2 0 1
Spring 2014
85 / 102
Solution (Cont.)
Step 2: Using Row Operations on [A|I ]
1 3 3
1 3 3 1 0 0
R2 R1 R2
0 1 0
1 4 3 0 1 0
[A|I ] =
R3 2R1 R3
0 0 1
2 6 7 0 0 1
1 0 0
1 1 0
2 0 1
1 0 3 4 3 0
R 3R2 R1
1
0 1 0 1 1 0
0 0 1 2 0 1
Spring 2014
85 / 102
Solution (Cont.)
Step 2: Using Row Operations on [A|I ]
1 3 3
1 3 3 1 0 0
R2 R1 R2
0 1 0
1 4 3 0 1 0
[A|I ] =
R3 2R1 R3
0 0 1
2 6 7 0 0 1
1 0 3 4
R 3R2 R1
1
0 1 0 1
0 0 1 2
1 0 0 10 3
R 3R3 R1
1
0 1 0 1 1
0 0 1 2 0
1 0 0
1 1 0
2 0 1
3 0
1 0
0 1
3
0 = [I |A1 ]
1
Spring 2014
85 / 102
Solution (Cont.)
Step 2: Using Row Operations on [A|I ]
1 3 3
1 3 3 1 0 0
R2 R1 R2
0 1 0
1 4 3 0 1 0
[A|I ] =
R3 2R1 R3
0 0 1
2 6 7 0 0 1
1 0 3 4
R 3R2 R1
1
0 1 0 1
0 0 1 2
1 0 0 10 3
R 3R3 R1
1
0 1 0 1 1
0 0 1 2 0
1 0 0
1 1 0
2 0 1
3 0
1 0
0 1
3
0 = [I |A1 ]
1
Step 3: Conclusion
A1
Nguyen Minh Quan (HCMIU-VNU)
10 3 3
0
= 1 1
2 0
1
Spring 2014
85 / 102
0 1 2
A = 1 0 3 ,
4 3 8
if it exists.
Spring 2014
86 / 102
9/2 7 3/2
4
1
A1 = 2
3/2 2 1/2
Check: AA1 = I3 (?).
Nguyen Minh Quan (HCMIU-VNU)
Spring 2014
87 / 102
1 2 1
6 ,
Find the inverse of the matrix A = 1 5
5 4 5
if it exists.
Spring 2014
88 / 102
Example
Solve the system
3x1 + 4x2 = 3
5x1 + 6x2 = 7
x =A
b=
3
2
5/2 3/2
3
7
3 4
, so
5 6
=
5
3
Spring 2014
89 / 102
The LU factorization
The LU factorization described below is motivated by the fairly common
industrial and business problem of solving a sequence of equations, all with
the same coefficient m n matrix A:
Ax = b1 , Ax = b2 , ..., Ax = bk
When A is invertible, one could find A1 then compute A1 b1 ,
A1 b2 ,...,A1 bk .
However it is more efficient when apply LU factorization, by re-write A in
the form A = LU, where L is an m m lower triangular matrix with 1s on
the diagonal, and U is an m n echelon form of A.
The matrix L is invertible and is called a unit lower triangular matrix.
Nguyen Minh Quan (HCMIU-VNU)
Spring 2014
90 / 102
The LU factorization
Example of an LU factorization
Ly = b
Ux = y
Spring 2014
91 / 102
The LU factorization
An LU Factorization Algorithm
1. Reduce A to an echelon form U by a sequence of row replacement
operations, if possible.
2. Place entries in L such that the same sequence of row operations
reduces L to I .
Spring 2014
92 / 102
The LU factorization
Example
Find an LU factorization of
2
4 1 5 2
4 5 3 8 1
A=
2 5 4 1
8
6 0
7 3 1
Solution:
The first column of L is the divided by the top pivot entry:
1 0 0 0
2 1 0 0
L=
1
1 0
3
1
Compare the first columns of A and L. The row operations that create
zeros in the first column of A will also create zeros in the first column of L.
Nguyen Minh Quan (HCMIU-VNU)
Spring 2014
93 / 102
The LU factorization
Solution (Cont.)
To make this same correspondence of row operations on A hold for the
rest of L, watch a row reduction of A to an echelon form U.
Spring 2014
94 / 102
The LU factorization
Solution (Cont.)
Spring 2014
95 / 102
The LU factorization
Example
Use the LU factorization to solve Ax = b, where
3 7 2 2
3 5
1
0
A=
6 4 0 5
9 5 5 12
and
9
5
b=
7
11
Spring 2014
96 / 102
The LU factorization
Hint
1
0 0
1 1 0
L=
2 5 1
3 8 3
0
3 7 2 2
0
0 2 1 2
,U =
0 0 1 1
0
1
0 0
0 1
Solve Ly = b for y :
Solve Ux = y for x:
Spring 2014
97 / 102
Suppose that for each sector we know its total output for one year
and we know exactly how this output is divided or exchanged among
the sectors of the economy.
Spring 2014
98 / 102
E.g., the 2nd column says that the total output of Electric is divided as
follows: 40% to Coal, 50% to Steel, and the remaining 10% to Electric.
Nguyen Minh Quan (HCMIU-VNU)
Spring 2014
99 / 102
0 0.4 0.6
x
x
0.6 0.1 0.2 y = y
0.4 0.5 0.2
z
z
Spring 2014
100 / 102
Spring 2014
101 / 102
Spring 2014
102 / 102