Вы находитесь на странице: 1из 47

MTH 102

Linear Algebra
Lecture 3
Recap
Elimination : Perform row operations to reduce the
system to an upper triangular system.
Back Substitution : Solve the upper triangular system
in the backward order.

1 2 1 2
3 8 1 12
0 4 1 2

1 2 1 2
0 2 -2 6
0 4 1 2

1 2 1 2
0 2 -2 6
0 0 5 -10

R
2
! R
2
3 R
1
R
3
! R
3
2 R
2
x
1
+ 2x
2
+x
3
= 2
2x
2
2x
3
= 6
5x
3
= 10
x
3
= 2
x
2
= 1
x
1
= 2
Gauss Elimination Method

1 2 1 2
0 2 -2 6
0 0 5 -10

x
1
+ 2x
2
+x
3
= 2
2x
2
2x
3
= 6
5x
3
= 10
Back Substitution
Gauss Elimination Method
x
3
= 2
x
2
= 1
x
1
= 2
Success and Failure :
Need all pivots to be non-
zero for this strategy to
be successful !
Gauss Elimination Method
x
1
+ 2x
2
+x
3
= 2
3x
1
+ 8x
2
+x
3
= 12
4x
2
+x
3
= 2

1 2 1 2
3 8 1 12
0 4 1 2

Elimination

0 4 1 2
1 2 1 2
3 8 1 12

4x
2
+x
3
= 2
x
1
+ 2x
2
+x
3
= 2
3x
2
+ 8x
2
+x
3
= 12
Gauss Elimination Method
Elimination

0 4 1 2
1 2 1 2
3 8 1 12

4x
2
+x
3
= 2
x
1
+ 2x
2
+x
3
= 2
3x
2
+ 8x
2
+x
3
= 12
Gauss Elimination Method
Elimination
Temporary Failure !
x
1
+ 2x
2
+x
3
= 2
4x
2
+x
3
= 2
3x
2
+ 8x
2
+x
3
= 12

1 2 1 2
0 4 1 2
3 8 1 12

Gauss Elimination Method


Elimination
Temporary Failure
Can proceed normally
after row exchanges.

1 2 1
3 8 1
0 4 1

1 2 1
0 2 2
0 4 1

in terms of matrices
First row operation (R
2
! R
2
3 R
1
)
Gauss Elimination Method
Agenda
Method of Solution
Gauss Elimination
Matrix-Matrix Multiplication
Elementary Matrices
Inverse of a Matrix
in terms of matrices
Matrix-Matrix Product :
Gauss Elimination Method

A B
C
in terms of matrices
Matrix-Matrix Product : Element-wise
Gauss Elimination Method

c
ij
A
i

.
.
.
B
j
.
.
.
A B
C
in terms of matrices
Matrix-Matrix Product : Element-wise
Gauss Elimination Method

c
ij
A
i

.
.
.
B
j
.
.
.
c
ij
=
n

k=1
a
ik
b
kj
A B
C
mn m
in terms of matrices
Matrix-Matrix Product : Element-wise
Gauss Elimination Method

c
ij
A
i

.
.
.
B
j
.
.
.
c
ij
=
n

k=1
a
ik
b
kj
A B
C
mn m n
in terms of matrices
Matrix-Matrix Product : Element-wise
Gauss Elimination Method

c
ij
A
i

.
.
.
B
j
.
.
.
c
ij
=
n

k=1
a
ik
b
kj
A B
C
mn mp n p
in terms of matrices
Matrix-Matrix Product : Column-wise
Gauss Elimination Method

A B
C
in terms of matrices
Matrix-Vector Product : Linear combination of columns
Gauss Elimination Method

.
.
.
.
.
.
.
.
.
C
1
C
2
C
n
.
.
.
.
.
.
.
.
.

b
1
b
2
.
.
.
b
n

=
b
1

.
.
.
C
1
.
.
.

+b
2

.
.
.
C
2
.
.
.

+ +b
n

.
.
.
C
n
.
.
.

in terms of matrices
Matrix-Matrix Product : Column-wise
Gauss Elimination Method

A B
C
.
.
.
B
j
.
.
.
.
.
.
AB
j
.
.
.
in terms of matrices
Matrix-Matrix Product : Column-wise
Gauss Elimination Method

A B
C
.
.
.
B
j
.
.
.
.
.
.
AB
j
.
.
.
C
j
= AB
j
in terms of matrices
Matrix-Matrix Product : Column-wise
Gauss Elimination Method

A B
C
.
.
.
AB
j
.
.
.
.
.
.
A
1
.
.
.
.
.
.
A
2
.
.
.
.
.
.
A
n
.
.
.

b
1j
b
2j
.
.
.
b
nj
C
j
= AB
j
C
j
= AB
j
=
n

k=1
b
kj
A
k
in terms of matrices
Matrix-Matrix Product : Column-wise
Gauss Elimination Method

A B
C
.
.
.
AB
j
.
.
.
.
.
.
A
1
.
.
.
.
.
.
A
2
.
.
.
.
.
.
A
n
.
.
.

b
1j
b
2j
.
.
.
b
nj
in terms of matrices
Matrix-Matrix Product : Row-wise
Gauss Elimination Method

A B
C
in terms of matrices
Matrix-Vector Product : Linear combination of rows
Gauss Elimination Method

b
1
b
2
b
m

R
1

R
2

.
.
.
.
.
.
.
.
.
R
m

=
b
1

R
1

+b
2

R
2

+ +b
m

R
m

in terms of matrices
Matrix-Matrix Product : Row-wise
Gauss Elimination Method

A B
C
A
i
A
i
B
in terms of matrices
Matrix-Matrix Product : Row-wise
Gauss Elimination Method

A B
C
A
i
A
i
B
C
i
= A
i
B
in terms of matrices
Matrix-Matrix Product : Row-wise
Gauss Elimination Method

A B
C
B
1

B
2

B
n

.
.
.
A
i
B
C
i
= A
i
B
a
i1
a
i2
a
in
C
i
= A
i
B =
n

k=1
a
ik
B
k
in terms of matrices
Matrix-Matrix Product : Row-wise
Gauss Elimination Method

A B
C
B
1

B
2

B
n

.
.
.
A
i
B
a
i1
a
i2
a
in
in terms of matrices
Matrix-Matrix Product : Block-wise
Gauss Elimination Method

A B
C
in terms of matrices
Matrix-Matrix Product : Block-wise
Gauss Elimination Method

A B
C
A
11
A
12
A
22
A
21
B
21
B
22
B
12
B
11
C
11
C
21
C
22
C
12
in terms of matrices
Matrix-Matrix Product : Block-wise
Gauss Elimination Method

A B
C
A
11
A
12
A
22
A
21
B
21
B
22
B
12
B
11
C
11
C
21
C
22
C
12
C
11
= A
11
B
11
+A
12
B
21
Block sizes
have to be
correct !
C
12
= A
11
B
12
+A
12
B
22
in terms of matrices
Matrix-Matrix Product : Block-wise
Gauss Elimination Method

A B
C
A
11
A
12
A
22
A
21
B
21
B
22
B
12
B
11
C
11
C
21
C
22
C
12
C
ij
= A
i1
B
1j
+A
i2
B
2j
in terms of matrices
Matrix-Matrix Product : Block-wise
Gauss Elimination Method

A B
C
A
11
A
12
A
22
A
21
B
21
B
22
B
12
B
11
C
11
C
21
C
22
C
12
Agenda
Gauss Elimination
Matrix-Matrix Multiplication
Elementary Matrices
Inverse of a Matrix
More Matrix Operations

1 2 1
3 8 1
0 4 1

1 2 1
0 2 2
0 4 1

in terms of matrices
Back to the example : First row operation (R
2
! R
2
3 R
1
)
Gauss Elimination Method
in terms of matrices
Back to the example : First row operation (R
2
! R
2
3 R
1
)

1 0 0

0 0 1

1 2 1
3 8 1
0 4 1

1 2 1
0 2 2
0 4 1

Gauss Elimination Method


in terms of matrices
Back to the example : First row operation (R
2
! R
2
3 R
1
)

1 0 0
3 1 0
0 0 1

1 2 1
3 8 1
0 4 1

1 2 1
0 2 2
0 4 1

Gauss Elimination Method


in terms of matrices
Back to the example : First row operation (R
2
! R
2
3 R
1
)

1 0 0
3 1 0
0 0 1

1 2 1
3 8 1
0 4 1

1 2 1
0 2 2
0 4 1

E
21
(3)
Gauss Elimination Method
in terms of matrices
Back to the example : First row operation (R
2
! R
2
3 R
1
)

1 0 0
3 1 0
0 0 1

1 2 1
3 8 1
0 4 1

1 2 1
0 2 2
0 4 1

E
21
(3)
Definition:
The elementary matrix
is obtained by adding c times the j
th
-row
of identity matrix to its i
th
-row.
E
ij
(c), c R \ {0}
Gauss Elimination Method
in terms of matrices
Back to the example : First row operation (R
2
! R
2
3 R
1
)

1 0 0
3 1 0
0 0 1

1 2 1
3 8 1
0 4 1

1 2 1
0 2 2
0 4 1

E
21
(3)
Definition:
The elementary matrix is obtained
by interchanging the i
th
-row and j
th
-row of
the identity matrix.
E
ij
Gauss Elimination Method
in terms of matrices
Back to the example : First row operation (R
2
! R
2
3 R
1
)

1 0 0
3 1 0
0 0 1

1 2 1
3 8 1
0 4 1

1 2 1
0 2 2
0 4 1

E
21
(3)
Definition:
The elementary matrix
is obtained by multiplying the i
th
-row of
identity matrix by c.
E
i
(c), c R \ {0}
Gauss Elimination Method
in terms of matrices
Back to the example: Second row operation (R
3
! R
3
2 R
2
)

1 2 1
0 2 2
0 4 1

1 2 1
0 2 2
0 0 5

Gauss Elimination Method


in terms of matrices
Back to the example: Second row operation (R
3
! R
3
2 R
2
)

1 0 0
0 1 0

1 2 1
0 2 2
0 4 1

1 2 1
0 2 2
0 0 5

Gauss Elimination Method


in terms of matrices
Back to the example: Second row operation (R
3
! R
3
2 R
2
)

1 0 0
0 1 0
0 2 1

1 2 1
0 2 2
0 4 1

1 2 1
0 2 2
0 0 5

E
32
(2)
Gauss Elimination Method
in terms of matrices
Back to the example:

1 2 1 2
3 8 1 12
0 4 1 2

1 2 1 2
0 2 -2 6
0 4 1 2

1 2 1 2
0 2 -2 6
0 0 5 -10

R
2
! R
2
3 R
1
R
3
! R
3
2 R
2
U
c
b A
Gauss Elimination Method
E
32
(2)E
21
(3)Ax = E
32
(2)E
21
(3)b E
32
(2)E
21
(3)Ax = E
32
(2)E
21
(3)b
in terms of matrices
Back to the example:

1 2 1 2
3 8 1 12
0 4 1 2

1 2 1 2
0 2 -2 6
0 4 1 2

1 2 1 2
0 2 -2 6
0 0 5 -10

R
2
! R
2
3 R
1
R
3
! R
3
2 R
2
U
c
b A
Ax = b
E
32
(2)E
21
(3)Ax = E
32
(2)E
21
(3)b
U = E
32
(2)E
21
(3)A
Gauss Elimination Method
Agenda
Matrix-Matrix Multiplication
Elementary Matrices
Inverse of a Matrix
More Matrix Operations
Some Special Matrices

Definition
We say that an matrix is invertible if there
exists a matrix of the same order such that
and in this case, , the inverse of , is denoted
as .
Inverse of a (square) Matrix
A
B
n n
B A
AB = I
n
= BA
A
1
I
n
=

1 0 0
0 1 0
.
.
.
.
.
.
.
.
.
.
.
.
0 0 1

nn
Definition
We say that an matrix is invertible if there
exists a matrix of the same order such that
and in this case, , the inverse of , is denoted
as .
Inverse of a (square) Matrix
A
B
n n
B A
AB = I
n
= BA
A
1
Exercise : Show that .
(AB)
1
= B
1
A
1
Exercise : Show that inverse of a matrix is unique.

Оценить