View
36
Download
0
Category
Tags:
Preview:
DESCRIPTION
A ij i = row j = column. Definition of a Matrix. A [ A ]. a 11 a 12 a 13 … … a 1n a 21 a 22 a 23 … … a 2n … … … a ij … … a m1 a m2 a m3 … … a mn. Definition of a Matrix. a 11 a 12 a 13 … … a 1n - PowerPoint PPT Presentation
Citation preview
Aij
i = rowj = column
A
[ A ]
Definition of a Matrix
a11 a12 a13 … … a1n
a21 a22 a23 … … a2n
… … … aij … …
am1 am2 am3 … … amn
Definition of a Matrix
Size of a Matrix
a11 a12 a13 … … a1n
a21 a22 a23 … … a2n
… … … aij … …
am1 am2 am3 … … amn
size m x n
5 21 3 -740 -6 19 23-8 12 50 22
size 3 x 4
Size of a Matrix
Row Matrix
[ B ]m = 1
[ 50 -3 -27 35 ]
Column Matrix
-1033-615
{-10 33 -6 15}
{D}
n = 1
Square Matrix
a11 a12 a13 … … a1n
a21 a22 a23 … … a2n
… … … aij … …
an1 an2 an3 … … ann
size m x n5 21 3 40 -6 19 -8 12 50 size 3 x 3
m = n
Main Diagonal
a11 a12 a13 … … a1n
a21 a22 a23 … … a2n
… … … aij … …
an1 an2 an3 … … ann
5 21 3 40 -6 19 -8 12 50
5, -6, and 50 are diagonal elements
i = j
a11 a22 aij, …, …, ann
Symmetric Matrix
a11 a12 a13 … … a1n
a21 a22 a23 … … a2n
… … … aij … …
an1 an2 an3 … … ann
aij = aji
a12 = a21, a13 = a31, … a1n = an1
5 21 -3 21 6 19 -8 19 50
21, -3, and 19 are off-diagonal elements
Symmetric Matrix
Diagonal Matrixaij = 0, for a j
a11 0 0 … … 0
0 a22 0 … … 0
… … … aij … …
0 0 0 … … 0
a12 = a21 = 0, a13 = a31 = 0, … a1n = an1= 0
Diagonal Matrix
5 0 0 00 6 0 0 0 0 19 00 0 0 21
Unit or Identity Matrix
1 0 0 … … 00 1 0 … … 0 … … … aij … …
0 0 0 … … 1
aij = 1, for i = j aij = 0, for i j
a12 = a21 = 0, a13 = a31 = 0, … a1n = an1= 0
Unit or Identity Matrix
1 0 0 0 0 1 0 0 0 0 1 00 0 0 1
null matrix
aij =0
Matrix Operations
Equality
5 21 -3 A = 21 6 19
-8 19 50
5 21 -3 B = 21 6 19
-8 19 50
A = BAij = Bij
Addition and Subtraction
5 2 A = 2 6
-8 1
5 21 B = 21 6
-8 19
[A] + [B] = [C]
Aij + Bij = Cij
Addition and Subtraction
10 23 A+B = C = 23 12
-16 20
0 -19 A-B = C = -19 0
0 -18
Multiplication by ScalarScalar c, x [A]
5 2 A = 2 6
-8 1
15 6B = 6 18 -24 3
c = 3
c A = B
Multiplication of Matrices
-1 5 2 3 6A = B =
7 -3 4 –8 9
18 -43 51C =
2 45 -69
Conformable
[A] (m x n) x [B] (n x s) = [C] (m x s)
Aik x Bkj = C ij
Cij = Ai1B1j +ai2B2j+ … + AinBnj
Cij = AikBkj for k = 1 to n
Manual Multiplication
2 3 6 B =
4 –8 9
-1 5 18 -43 51A = C =
7 -3 2 45 -69
Application to Simultaneous Equations
a11x1 + a12x2 + a13x3 = P1
a12x2 + a22x2 + a23x3 = P2
a12x3 + a23x2 + a33x3 = P3
2x1 – 5x2 + 4x3 = 44
3x1 + 1x2 + -8x3 = -35
4x1 – 7x2 – 1x3 = 28
a11 a12 a13 x1 P1
a12 a22 a23 x2 = P2
a12 a23 a33 x3 P3
Application to Simultaneous Equations
Application to Simultaneous Equations
2 -5 4 x1 44
3 1 -8 x2 = -35
4 -7 -1 x3 -28
[A] {x} = {P}NOTES:[A] [B] [B] [A]A B C = (AB) C = A (BC)A (B + C) = AB + AC[A] [0] = [0], [0] [A] = [0]
Inverse of a Square Matrix
-2 1A-1 =
-1.5 0.5
Inverse of [A] = [A-1]
[A-1] [A] = [I][A] [A-1] = [I]
1 -2A = 3 4
Inverse of Square Matrix
1 0A A-1 =
0 1
Transpose of a Matrix
aijT = aji
a11 a21 a31 … … an1
a12 a22 a32 … … an2
… … … aji … …
a1n a2n a3n … … ann
Transpose of a Matrix
5 12 -3 18 21 6 19 16 -3 15 50 17 5 21 -3 12 6 15 -3 19 50 18 16 17
A (3 x 4) , AT (4 x 3)
Partitioning of Matrices
3 5 -1 ¦ 2 -2 4 7 ¦ 9 6 1 3 ¦ 4
1 8-5 2-3 6
7 -1
[A]
[B]
Partitioning of Matrices
A11 ¦ A12
A = -----¦------- A21 ¦ A22
B = B11 ------
B21
A11 | A12 A11B11+A12B21
A= ---------------- AB= A21 | A22 A21B11+A22B21
Partitioning of Matrices
B11
B = ------ B21
Partitioning of Matrices 19 28
A11B11 =
-43 34
14 -2A12B21 =
63 -9
A21B11 = [ -8 68 ]
A22B21 = [ 28 -4 ]
19 28 + 14 -2 -6 26
AB = -43 34 + 63 -9 = 20 25
[-8 68 ] + [28 -4] 20
64
Partitioning of Matrices
A11B11+A12B21
AB = A21B11+A22B21
Solution of Simultaneous Equations by Gauss-Jordan Method
2x1 – 5x2 + 4x3 = 443x1 + x2 - 9x3 = -354x1 – 7x2 - x3 = 28
x1 – 2.5x2 + 2x3 = 223x1 + x2 - 8x3 = -354x1 - 7x2 - x3 = 28
Solution of Simultaneous Equations by Gauss-Jordan Method
x1 – 2.5x2 + 2x3 = 22 8.5x2 - 14x3 = -101
3x2 - 9x3 = -60
x1 – 2.5x2 + 2x3 = 22 x2 - 1.647x3 = -11.882
3x2 - 9x3 = -60
Solution of Simultaneous Equations by Gauss-Jordan Method
x1 – - 2.118x3 = -7.705 x2 - 1.647x3 = -11.882 - 4.059x3 = -24.354
x1 + 2.118x3 = - 7.705 x2 - 1.647x3 = -11.882
x3 = 6
x1 = 5 x2 = -2 x3 = 6
Solution of Simultaneous Equations by Gauss-Jordan Method
Check:
2(5) - 5(-2) + 4(6) = 443(5) +1(-2) - 8(6) = -354(5) - 7(-2) - 1(6) = 28
Matrix Inversion
[A] {x} = {C}
[A] [A] {x} = [A]-1 {C}
[A] [A] = [I]
{x} = [A] {C}
[A ¦ I ] { x ¦ -C }= 0
-1
-1
-1
[I ¦ B ] { x ¦ -C }= 0
{x} - [B] [C] = 0
{x} = [B] [C]
[B] = [A]
Matrix Inversion
-1
Method of Successive Transformations
2 4 3 ¦ 1 0 0 1 -2 0 ¦ 0 1 0-1 -4 5 ¦ 0 0 1
1 2 1.5 ¦ 0.5 0 0 1 -2 0 ¦ 0 1 0-1 -4 5 ¦ 0 0 1
Method of Successive Transformations
1 2 1.5 ¦ 0.5 0 0 0 -4 -1.5 ¦ -0.5 1 0-1 -4 5 ¦ 0 0 1
1 2 1.5 ¦ 0.5 0 0 0 -4 -1.5 ¦ -0.5 1 0 0 -2 6.5 ¦ 0.5 0 1
1 2 1.5 ¦ 0.5 0 0 0 1 0.375 ¦ 0.125 -0.25 0 0 0 7.25 ¦ 0.75 -0.5 1
1 2 1.5 ¦ 0.5 0 00 1 0.375 ¦ 0.125 -0.25 0
0 -2 6.5 ¦ 0.5 0 1
Method of Successive Transformations
1 2 1.5 ¦ 0.5 0 0 0 1 0.375 ¦ 0.125 -0.25 0
0 0 1 ¦ 0.1034 -0.06897 0.1379
Method of Successive Transformations
1 2 1.5 ¦ 0.5 0 00 1 0 ¦ 0.0862 -0.2241 -0.05170 0 1 ¦ 0.1034 -0.06897 0.1379
1 2 0 ¦ 0.3449 0.1034 -0.20690 1 0 ¦ 0.0862 -0.2241 -0.05170 0 1 ¦ 0.1034 -0.06897 0.1379
Method of Successive Transformations
1 0 0 ¦ 0.1725 0.5516 -0.10350 1 0 ¦ 0.0862 -0.2241 -0.05170 0 1 ¦ 0.1034 -0.06897 0.1379
0.1725 0.5516 - 0.1035 A-1 = 0.0862 - 0.2241 - 0.0517 0.1034 - 0.06897 0.1379
Method of Successive Transformations
l11 0 0 . . . . 0l21 l22 0 . . . . 0l31 l32 l33 0 . . . 0. . . . . . . .. . . . . . . .ln1 . . . . . . lnn
Cholesky Decomposition
Lower Triangular matrix [L]
Cholesky Decomposition
[A] = [L] [L]T
[B] = [L]
[A] = ( [L] [L] )
[A] = [B] [B]
-1
-1-1
-1
T
T
Cholesky Decomposition
Elements of [L]:
l = 0 for i<jl = (A - ∑l )l = (A - ∑l l )/l for i>j
Summation ∑ from r=1 to j-1
ij
ii
ij
ij
ij jr ir
ir 2 1/2
Cholesky Decomposition
Elements of [B]:
b = 0 for i<jb = 1/lb = -(∑l l )/l or i>j
Summation ∑ from r=1 to i-1
ij
ii
ij
ii
ir ii rj
Cholesky Decomposition
Example:
2 1 11 1.5 21 2 6.75
Cholesky Decomposition
l = l = l = 0l = √2 = 1.414l = (1-0)/1.414 = 0.707l = (1-0)/1.414 = 0.707l = (1.5-0.707 ) = 1l = (2-0.7072)/1 = 1.5l = (6.75–(707 +1.5 )) ½ = 2.0
12
11
21
31
22
32
33
13 23
2 1/2
2 2
Cholesky Decomposition
1.414 0.0 0.00.707 1.0 0.00.707 1.5 0.0
Cholesky Decompositionb = b = b = 0b = 1/1.414 = 0.707b = -(0.707 x 0.707)/1 = -0.5b = -(0.707x0.707+1.5(-0.5)/2 = 0.125b =1b = -(1.5 x 1)/2b = 0.5
[B]
12
11
21
31
22
32
33
13 23
Cholesky Decomposition
0.707 0.0 0.0-0.5 1.0 0.00.125 -0.75 0.0
[A] = [B] [B]
[A] =
-1
-1
T
Cholesky Decomposition
0.77 -0.594 0.063-0.5 1.563 -0.3750.063 -0.375 0.25
R = K rr = K R
R = {R R R R ….Rn}r = {r r r r ….rn}
-1
1 2 3 4
1 2 3 4
Recommended