Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
Chapter 2 Review of Matrix Algebra
2-1 Matrix Algebra In this course, we need to solve system of linear equations in the form
nnnnnn
nn
nn
bxaxaxa
bxaxaxabxaxaxa
=+++
=+++
=+++
...............................................
......
2211
22222121
11212111
where x1, x2, …, xn are the unknowns.
(2-1)
Eqn. (2-1) can be written in a matrix form as
[ ]{ } { }bxA = (2-2)
where [A] is a (n x n) square matrix, {x} and {b} are (n x 1) vectors.
… (2-3)
Note:
Element located at ith row and jth column of matrix [A] is denoted by aij. For example, element at the 2nd row and 2nd column is a22.
[ ] { } { }
⎪⎪⎭
⎪⎪⎬
⎫
⎪⎪⎩
⎪⎪⎨
⎧
=
⎪⎪⎭
⎪⎪⎬
⎫
⎪⎪⎩
⎪⎪⎨
⎧
=
⎥⎥⎥⎥
⎦
⎤
⎢⎢⎢⎢
⎣
⎡
=
nnnnnn
n
n
b
bb
x
xx
aaa
aaaaaa
:b and ,
:x ,
...::::
...
...
A 2
1
2
1
21
22221
11211
The square matrix [A] and the {x} and {b} vectors are given by,
2-2 Matrix Multiplication The product of matrix [A] of size (m x n) and matrix [B] of size (n x p) will results in matrix [C], with size (m x p).
Note: The (ij)th component of [C], i.e. cij, is obtained by taking the DOT product,
(2-4)
])[ ofcolumn th ( ])[ of rowth ( BjAicij ⋅= (2-5)
Example:
[ ] [ ] [ ] ) x ( ) x ( ) x (
pmpnnm
CBA =
2) x (2 2) x (3 )3 x 2(
710-157
3025
41
120312
⎥⎦
⎤⎢⎣
⎡=
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
−⎥⎦
⎤⎢⎣
⎡
−
2-3 Matrix Transposition If matrix [A] = [aij], then transpose of [A], denoted by [A]T, is given by [A]T = [aji]. Thus, the rows of [A] becomes the columns of [A]T.
Note: In general, if [A] is of dimension (m x n), then [A]T has the dimension of (n x m).
Example:
⎥⎥⎥⎥
⎦
⎤
⎢⎢⎢⎢
⎣
⎡
−
−
=
24326051
][A
Then, ⎥⎦
⎤⎢⎣
⎡
−
−=
23654201
][ TA
2-4 Transpose of a Product The transpose of a product of matrices is given by the product of the transposes of each matrices, in reverse order, i.e.
TTTT ABCCBA ][][][])][][([ = (2-6)
2-5 Determinant of a Matrix Consider a 2 x 2 square matrix [x],
[ ] ⎥⎦
⎤⎢⎣
⎡=
2221
1211
xxxx
x
(2-7)
The determinant of this matrix is give by, [ ] 12212211 xxxxxdet −=
EXERCISE Given that:
⎪⎭
⎪⎬
⎫
⎪⎩
⎪⎨
⎧
=
⎥⎥⎥
⎦
⎤
⎢⎢⎢
⎣
⎡
=
⎥⎦
⎤⎢⎣
⎡=⎥
⎦
⎤⎢⎣
⎡=
321
}{ 432321654
][
1098765
][ 4321
][
ED
CA
1. Find the product for the following cases:
a) [A][C] b) [D]{E} c) [C]T[A][C]
2. Find the determinant of [A][A].
2-6 Solution of System of Linear Equations System of linear algebraic equations can be solved for the unknown using the following methods: a) Cramer’s Rule b) Inversion of Coefficient Matrix c) Gaussian Elimination** d) Gauss-Seidel Iteration
Example: Solve the following SLEs using Gaussian elimination.
(iii) 6 122(ii) 8324(i) 11312
321
321
321
−=−+−
=+−
=−+
xxxxxxxxx
Eliminate x1 from eq.(ii) and eq.(iii). Multiply eq.(ii) by 0.5 we get,
Subtract eq.(ii)* from eq.(i), we obtain
Add eq.(iii) with eq.(i), yields
(iii)6 122**(ii)75.420
(i)11312
321
321
321
−=−+−
=−+
=−+
xxxxxx
xxx
(iii)6 122*(ii)45.112
(i)11312
321
321
321
−=−+−
=+−
=−+
xxxxxxxxx
*iii)(5 430**(ii)75.420
(i)11312
321
321
321
=−+
=−+
=−+
xxxxxx
xxx
Eliminate x2 from eq.(iii)*. Multiply eq.(ii)** by 3 and eq.(iii)* by 2 we get
Subtract eq.(iii)** from eq.(ii)***, we obtain
***(iii)11 5.500**(ii)75.420
(i)11312
321
321
321
=−+
=−+
=−+
xxxxxx
xxx
From eq.(iii)*** we determine the value of x3, i.e.
25.5
113 −=
−=x
**(iii)10 860***(ii)215.1360
(i)11312
321
321
321
=−+
=−+
=−+
xxxxxx
xxx
Back substitute value of x3 into eq.(ii)** and solve for x2, we get
12
)2(5.472 −=
−+=x
Back substitute value of x2 and x3 into eq.(i) and solve for x1, we get
31 =x
EXERCISE Solve the following systems of linear equations by using the Gaussian elimination method.
6222832411312
3401242223
321
321
321
321
321
321
−=−+−
=+−
=−+
=++
=+−
=−+−
xxxxxxxxx
xxxxxxxxxa)
b)
Solve the following systems of linear equations by using the Gaussian elimination method.
92431354222212432
4321
4321
4321
4321
=+−+
−=−−+
−=−+−
=+−+
xxxxxxxxxxxxxxxx
ASSIGNMENT 1