Professional Documents
Culture Documents
APPLICATIONS
(MEC500)
0 Two variables
ax + by + cz + d = 0 Three variables
a1x1 + a2 x 2 + K + an x n + b = 0 n variables
Review on Matrix
Matrix notation and algebra provide a concise way to
represent and manipulate linear algebraic equations.
A matrix consists of a rectangular array of elements
represented by a single symbol (example: [A]).
An individual entry of a matrix is an element (example: a 23)
Column
[1 a2 L an ]
m x 1 matrices are column vectors.
1
a
2
M
a
n
Special Matrices
Matrices where m = n are called square matrices.
There are a number of special forms of square matrices:
Symmetric Diagonal Identity
5 2 9 a 11 1
2 1 5 [ A ] = a22
[ A ] = 1
9 5 1 a33 1
n
1
Matrix Multiplication
Matrix Inverse
The inverse of a square, nonsingular matrix [A] is that
matrix which, when multiplied by [A], yields the identity
matrix.
8 (1/8) = (1/8) 8 = 1 1 = A 1 A = 1
Matrix Transpose
The transpose of a matrix involves transforming its rows
into columns and its columns into rows.
T 1 4
1 2 3
=
4 5 6 2 5
3 6
Remark:
A square matrix A is symmetric if AT = A.
(AT )T = A twice get back to where you started
Apply
(A + B)T = AT + BT
For a scalar c, (cA)T = cAT
(AB)T = BTAT
Remark on Matrix
Properties of Matrix addition:
A + B = B + A
A + (B + C) = (A + B) + C
c(A + B) = cA + cB
(p + q)A = pA + qA
(A + B)C = AC + BC
C(A + B) = CA + CB
AB BA
System of linear equations in
matrix form
Matrices provide a concise notation for representing and
solving simultaneous linear equations:
(SLE):
System of linear equation
[ ][ A ]{x} = [ A ]{B}
1 1
Multiply with [A]-1on both side:
Since [A]-1[A] = [I] [ 1 ]{B}
Method for solving system of
linear equations
For small number of equations (n 3) linear equations can
be solved by simple techniques such as
Graphical method
Cramers rule
Elimination of unknown method
11x1 + a12 x 2 = b1
a21x1 + a22 x 2 = b2
3 1 1 2 3 1 2 1 3
0 1 1 1 0 1 1 1 0
1 0 1 1 2 0
0 2 1
Example 1
Cramers Method
a nt
in
erm
t
De
or
2 1 1 2(1(1)
2(1)) 1(1(1) 1(1)) + 1(1(2) 1(1))
1 1 1 2(1 + 2) 1(1 + 1) + 1(2 + 1)
1 2 1 2 2 + 3 = 3
Example 1
Cramers Method
Evaluating the other determinants
3 1 1 2 3 1 2 1 3
0 1 1 = 3 1 0 1 = 6 1 1 0 = 9
0 2 1 1 0 1 1 2 0
Elimination of unknowns
The elimination of unknowns can be extended to systems
with more than three equations & readily programmed for
computer implementation.The base for computer
technique such as Gauss
elimination
11 a12 a13 x 1 b 1
0 a a23 x 2 = b 2
22
0 0 a33 x 3 b 3
Nave Gauss Elimination
Forward Elimination
A set of n linear equations and n unknowns
11x1 + a12 x 2 + a13 x 3 + K + a1n xn = b1 K K [1]
a21x1 + a22 x 2 + a23 x 3 + K + a2n xn = b2 K K [2]
M
an1x1 + an 2 x 2 + an 3 x 3 + K + ann xn = bn K K [n]
Transform to an Upper Triangular Matrix
Step 1: Eliminate x1 in 2nd equation using equation 1 as the
pivot
equation
1
a (a21 )
11
Which yield:
a a a a
21x1 + 21 a12 x 2 + 21 a13 x 3 + K + 21 a1n x n = 21 b1 K K [1]
a11 a11 a11 a11
Nave Gauss Elimination
Forward Elimination
Zeroing out the coefficient of x1 in the 2nd equation by
subtracting this equation from 2nd equation
a21 a21 a21 a21
22 + a12x 2 + a 23 + a13 x 3 + K + a 2n + a1n xn = b2 b1
a11 a11 a11 a11
a21
= a22 +
'
22 a12
a11
a21
or x + a x +K + a x = b
' ' ' '
where a'23 = a23 + a13
22 2 23 3 2n n 2 a11
M
' a21
a = a23 +
2n a1n
a11
Nave Gauss Elimination
Forward Elimination
Repeat this procedure for the remaining equations to
reduce the set of equations as
Nave Gauss Elimination
Forward Elimination
Step 2: Eliminate x2 in the 3rd equation.
Equation
1
3 (a32 )
a22
This procedure is repeated for the remaining equations to
reduce the set of equations as
11x1 + a12 x 2 + a13 x 3 + K + a1n xn = b1
a'22 x 2 + a'23 x 3 + K + a'2n xn = b'2
a''33 x 3 + K + a''3n xn = b''3
M
an'' 3 x 3 + K + ann
''
xn = bn''
Nave Gauss Elimination
Forward Elimination
Continue this procedure by using the third equation as the
pivot equation and so on.
At the end of (n-1) Forward Elimination steps, the system of
equations will look like:
Nave Gauss Elimination
Back Substitution
The goal of Back Substitution is to solve each of the
equations using the upper triangular matrix.
Example of a system of 3 equations
11 a12 a13 x 1 b 1
0 a a23 x 2 = b 2
22
0 0 a33 x 3 b 3
Start with the last equation because it has only one
unknown
(n 1)
(n 1)
ann
(i 1)
a ii
bn(n 1)
xn = (n 1)
ann
remains.
Back substitution
Starting with the last row, solve for the
solution.
May also happens when two or more equations are nearly
2. Pivoting.
To avoid division by zero problem as well as reduce round-off error
pivot element.
Complete pivoting: Searching for the largest element in all rows and
3. Scaling
To circumvent/prevent problem with ill-condition
row is 1.
Partial pivoting
To avoid division by zero, swap the row having the zero
pivot with one of the rows below it.