Upload
raylandee
View
219
Download
0
Embed Size (px)
Citation preview
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 1/33
Numerical Methods
Matrices And Determinants
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 2/33
Matrices
Given by the expression
11 12 1
21 22 2
n
n
a a a
a a a A a
= =
L
L
where 1 ≤ i ≤ m (rows) and 1 ≤ j ≤ n (columns)Dimensions read as “m by n” (m × n)
1 2m m mna a a L
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 3/33
Types Of Matrices
1. Column or row vector
{ }
1
2
1 2
n
c
c R r r r C
= =
L
M
2. Null matrix nc 0 0 0
0 0 0
0 0 0
N
=
L
L
M M O M
L
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 4/33
3. Square matrix
Types Of Matrices11 12 1
21 22 2
1 2
n
n
n n nn
s s s
s s s
S
s s s
=
L
L
M M O M
L
4. Triangular matrix11 12 1
22 20
0 0
n
n
nn
u u u
u u
U
u
=
L
L
M M O M
L
11
21 22
1 2
0 0
0
n n nn
l
l l
L
l l l
=
L
L
M M O M
L
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 5/33
5. Diagonal matrix
Types Of Matrices
11
22
0 0
0 0
d
d D
=
L
L
M M O M
6. Identity matrix nnL
1 0 0
0 1 0
0 0 1
I
=
L
L
M M O M
L
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 6/33
7. Scalar matrix
Types Of Matrices1 0 0 0 0
0 1 0 0 0
k
k kI k
= =
L L
L L
M M O M M M O M
8. Transpose matrix
L L
11 21 1
12 22 2
1 2
m
mT
n n mn
a a a
a a a
A
a a a
=
L
L
M M O M
L
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 7/33
9. Symmetric matrix → if A = AT
10. Inverse matrix → A· A–1 = A–1· A = I
Types Of Matrices
11. Singular matrix → matrix that has no inverse
12. Orthogonal matrix → if AT = A–1, then A is an
orthogonal matrix.
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 8/33
13. Submatrix
Types Of Matrices
1 2 A A
A A A
=
{ }
{ } { }
11 12
1 2 13
21 22
3 31 32 4 33
,
,
a a A A a
a a
A a a A a
= =
= =
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 9/33
Operations1. Addition/Subtraction
→ dimensions should be congruent m = m B
ij ij ij
C A Bc a b
= ±
= ±
and n A = n B
Properties:
a. Commutative Property
b. Associative Property
2. Scalar multiplication ijkA ka=
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 10/33
Example
Given:
Evaluate:
Solution:
2 1 5 3,
3 4 0 2
3 4
2 1 5 3 6 3 20 123 4
A B
A B
− − = =
− −
−
− − − − − = −
Final Answer:
( )
( )
6 20 3 123 4
9 0 12 8
26 153 49 20
A B
A B
− − − −
− − − − − =
− − − −
− − = −
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 11/33
3. Matrix multiplication
Conditions1.Inner dimensions must conform, n A = m B
OperationsC A B= ⋅
Properties
1.Non-commutative AB ≠ BA
2.Associative A( BC ) = ( AB)C Algorithm ij ik kj
k
c a b= ∑
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 12/33
ExampleGiven:
Evaluate:
5 23 1 6
, 3 72 4 0
4 1
A B
AB
−
= = − − −
Final Answer:
( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )( ) ( ) ( ) ( ) ( )( ) ( ) ( ) ( ) ( ) ( ) ( )3 5 1 3 6 4 3 2 1 7 6 1
2 5 4 3 0 4 2 2 4 7 0 1
6 5
22 24
AB
AB
+ − − + − + − + = − + − + − − + +
− =
−
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 13/33
4. Elementary Row Operations → the following
are the only valid elementary row operations
a. Interchanging two rows, R1 ↔ R2
Operations
. ca ar mu t p cat on, 1 → 1
c. Row addition, R1 + R2 → R1’ or R2’
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 14/33
Determinants
Determinant → a scalar value obtained after
simplifying a square matrix
det or A A
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 15/33
Properties of Determinants1. The determinant of a matrix is the same to
that of its transpose.2. The determinant of a zero matrix is equal to
zero.
3. If a column/row is directly proportional toanother column/row, the determinant is equalto zero.
4. Switching two rows will switch the sign of itsdeterminant.
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 16/33
5. A scalar value k multiplied to a row will result to
the same value of determinant times k .6. Using valid elementary row addition/subtractionwill not change the value of the determinant.
Properties of Determinants
7. The determinant of the inverse of a matrix isequal to the reciprocal of its determinant:
8. The determinant of a triangular matrix is equal tothe product of its diagonal elements.
( ) ( )
1 1
detdet
A A
−=
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 17/33
Methods of DeterminantsA. Basket Method
Only valid for matrices with dimension n = 2
or n = 3.
( )
( ) ( ) ( )
11 12
11 22 21 12
21 22
11 12 13
21 22 23
31 32 33
11 22 33 12 23 31 13 21 32 31 22 13 32 23 11 33 21 12
, then detIf
If ,
then det
a a
A A a a a aa a
b b b
B b b b
b b b
B b b b b b b b b b b b b b b b b b b
= = −
=
= + + − + +
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 18/33
ExampleGiven
2 1 3
5 3 6
4 2 3
2 3 3 1 6 4 3 5 2
A
A
−
= −
− −
= − + − − + −
( ) ( )( ) ( ) ( )( ) ( ) ( ) ( ) 4 3 3 2 6 2 3 5 1
99 A
+ − − + − −
= −
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 19/33
B. Cofactor Expansion
An n – 1 reduction formula
involves following any row or column of a
Methods of Determinants
eterm nant an mu t p y ng eac e ement othe row or column by its cofactor. The sum of
these products equals the value of the
determinant.Cofactor of an element aij is ( ) ( )1 det
i j
ij ij A M
+
= −
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 20/33
ExampleGiven
choosing the 2nd row
2 1 3
5 3 6
4 2 3
A
−
= − − −
( ) ( ) ( )2 1 2 2 2 31 3 2 3 2 15 1 3 1 6 1
2 3 4 3 4 2
45 54 0
99
A
A
A
+ + +− − = − + − − − − − − −
= − − +
= −
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 21/33
C. Chio’s Condensation Method
An n – 1 reduction method using the first
element a11 as its reference
Methods of Determinants
( )
11 13 11 111 12
21 23 21 221 22
11 12 11 13 11 1
2
11 31 32 31 33 31 3
11 12 11 12 11 1
1 2 1 3 1
n
n
nn
n
n
n n n n n nn
a a a aa a
a a a a a a
A a a a a a a a
a a a a a a
a a a a a a
−
=
L
L
M M O M
L
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 22/33
ExampleGiven
2 1 3
5 3 6
4 2 3
2 1 2 3
A
−
= −
− −
−
( )2 3 5 3 5 622 1 2 3
4 2 4 3
11 27199
0 182
A
A
− −
= −
− −
−= = −
−
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 23/33
D. Pivotal Method
An n – 1 reduction method selecting anyelement as its pivot element
Methods of Determinants
or a × matr x, se ect ng a23 as t e p votelement:
( ) ( ) ( ) ( )
21 22
23 2321 22
23 23 21 22
23 23
11 12 13
2 3 2 3 11 13 12 13
23 23
31 13 32 13
31 32 33
1 1 1
a a
a aa aa a a a
a a
a a aa a a a
A a aa a a a
a a a
+ +
− −
= − = − − −
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 24/33
ExampleGiven
choosing element a32 as pivot element
2 1 3
5 3 6
4 2 3
A
−
= − − −
( )( )
( )( ) ( )( ) ( )( )
( ) ( ) ( )( )
( )( )
3 2
3
2
33 2 2
3
2
93 2 2
212
2 1 3
2 1 5 3 6
2 1
2 1 2 3 12 1
5 3 2 6 3
02 1 99
11
A
A
A
+
+
+
−
= − − − −
− − − − −= − −
− − − −
= − − = − −
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 25/33
E. Triangular Matrix Method
Converting a given matrix into an upper/lowertriangular matrix by means of valid elementary
Methods of Determinants
.
The determinant of a triangular matrix is equal
to the product of its diagonal elements.
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 26/33
ExampleGiven 2 1 3
5 3 6
4 2 3
A
−
= − − −
( )( ) ( )( )
( )( )( )
1 12 1 2 3 1 32 2
2711 11
2 2 2
5 ' 4 '
2 1 3
0 , 2 9 99
0 0 9
R R R R R R
A A
+ − → + − →
−
= − = − = −
−
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 27/33
Inverse MatrixA. Generating the inverse matrix by using
Elementary Row Operations Augment the given matrix with an identity
, ,
augmented matrix to [ I : A–1].
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 28/33
ExampleGiven:
Solution:
2 1 3
5 3 6
4 2 3
A
−
= − − −
2 1 3 : 1 0 0−
( )( ) ( )( )1 12 1 2 3 1 32 2
27 511
2 2 2
:
4 2 3 : 0 0 1
5 ' 4 '
2 1 3 : 1 0 0
0 : 1 0
0 0 9 : 2 0 1
R R R R R R
−
− −
+ − → + − →
− − − − −
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 29/33
ExampleContinuing
( )( )21 2 111
6 6 211 11 11
27 5112 2 2
1 '
2 0 : 0
0 : 1 0
R R R+ →
− −
( )( ) ( )( )6 271 11 3 1 2 3 211 9 2 9
14 2 233 11 33
311 12 2 2
0 0 9 : 2 0 1
' '
2 0 0 :
0 0 : 1
0 0 9 : 2 0 1
R R R R R R
− −
+ − − → + − →
− − −
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 30/33
ExampleFinally, 1 2 1
1 1 2 2 3 32 11 9
7 1 133 11 33
31 211 11 11
2 1
' ' '
1 0 0 :
0 1 0 :
0 0 1 : 0
R R R R R R→ → − →
−
−
Therefore
7 1 133 11 33
1 31 211 11 11
2 1
9 90
A−
= − −
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 31/33
Inverse MatrixB. Generating the inverse matrix by using the
Adjoint Matrix and the determinant
( )1 Adj A
−=
where
( ) ( )cof
T
ij Adj A a =
A
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 32/33
ExampleGiven:
Solution:
2 1 3
5 3 6
4 2 3
A
−
= − − −
T − −
( )
2 3 4 3 4 2
1 3 2 3 2 199,
2 3 4 3 4 2
1 3 2 3 2 1
3 6 5 6 5 3
A Adj A
−
− − − − − − = − = − −
− − − −
− − −
− −
8/15/2019 1 LN Numerical Methods - Matrices and Determinants
http://slidepdf.com/reader/full/1-ln-numerical-methods-matrices-and-determinants 33/33
ExampleSimplifying further:
1
7 1 1
21 9 3
9 18 27
22 0 11
99 A
−
− − −
− − −
=−
Therefore,33 11 33
1 31 2
11 11 11
2 19 9
0
A−
= − −