Mech300 Numerical Methods, Hong Kong University of Science and Technology.
Part Three Linear Algebraic Equations
1
Mech300 Numerical Methods, Hong Kong University of Science and Technology.
Motivation
The system of linear equations occur very frequently in engineering applications. For small numbers of equations (n < 4) equations can be solved manually by some simple techniques. However, for four or more equations, solutions become arduous and computers must be utilized. Historically, the inability to solve all but the smallest sets of equations by hand has limited the scope of problems addressed in many engineering applications.
2
Mech300 Numerical Methods, Hong Kong University of Science and Technology.
An Example of Linear Equations in Engineering xi: mass in reactor i ai: properties and characteristics of the system Lumped variable system
bi: the forcing functions acting on the system, e.g., feed rate.
Distributed variable system
3
Mech300 Numerical Methods, Hong Kong University of Science and Technology.
Mathematical Background – Matrix Notation
Row vector: [B] = [b1 b2 . . . bm]
c1 c 2 . Column vector: [ C ] = . . c n
( B )
({C})
A is a square matrix if n = m 4
Mech300 Numerical Methods, Hong Kong University of Science and Technology.
Special Types of Square Matrices
5
Mech300 Numerical Methods, Hong Kong University of Science and Technology.
Mathematical Background – Matrix Operating Rules Matrix addition:
[C] = [A] ± [B]
(A and B must have the same number of rows n and the same number of columns m)
cij = aij ± bij [A] ± [B] = [B] ± [A]
Matrix multiplication: [C] = [A][B] n
cij = ∑ aik bkj k =1
([A][B])[C] = [A]([B][C]) ([A]([B] + [C]) = [A][B] + [A][C] or ([A] + [B])[C] = [A][C] + [B][C] [A][B] ≠ [B][A] 6
Mech300 Numerical Methods, Hong Kong University of Science and Technology.
Mathematical Background – Matrix Operating Rules Inverse Matrix:
[A][A]-1 = [A]-1[A] = [I] • a non-square matrix can’t have an inverse • not every square matrix has an inverse
Transpose of a matrix: [B] = [A]T bij = cji Trace of a matrix:
n
tr [A] = ∑ aii i =1
Augmentation of a matrix: addition of column(s) to the original matrix
a11 Example: a21 a31
a12 a22 a32
a13 a11 a23 → a21 a33 a31
a12 a22 a32
a13 a23 a33
1 0 0 0 1 0 0 0 1 7
Mech300 Numerical Methods, Hong Kong University of Science and Technology.
Linear Algebraic Equations in Matrix Form [A]{X} = {B} a11 a 21 . [ A] = . . an1 {B}T = b1 b2
... bn
a12 a 22 . . . an 2
... a1n ... a2 n . . . ... ann {X}T = x1
x2
... xn
[A]-1[A]{X} = [A]-1{B} {X} = [A]-1{B} 8
Mech300 Numerical Methods, Hong Kong University of Science and Technology.
Overall Structure
9