You are on page 1of 16

Computational Techniques Computational Techniques

Module 3: Module 3: Linear Equations Linear Equations Module 3: Module 3: Linear Equations Linear Equations
Dr. Niket Kaisare
Department of Chemical Engineering Department of Chemical Engineering
Indian Institute of Technology - Madras
Prerequisite Prerequisite Prerequisite Prerequisite
We will assume some familiarity with the
concept of linear algebra, vectors and matrices
Please review your +2 and
First Year Undergraduate syllabi for familiarity
A Quick Recap A Quick Recap A Quick Recap A Quick Recap
Scalar Scalar: A single real number
23 . 1 = a
Vector Vector: An ordered set of scalars
# of scalars is dimension
(
(

=
2
x
Has length and direction
(

=
3
x
G i I i G i I i A d l Geometric Interpretation Geometric Interpretation: A point in n-dimensional space
2
9 e x
2
3
9 e x
Size Norm
A Quick Recap A Quick Recap A Quick Recap A Quick Recap
Matrix: A rectangular array of numbers
(
(
(

= 3 2
5 . 0 1
A
Di i Di i 3 2
(
(

=
2 0
3 2 A
Dimension: Dimension: 3x2
Linear operations:
Addition, subtraction, scalar multiplication
Matrix multiplication rules
Ei l d Ei Eigenvalues and Eigenvectors
A Linear Equation A Linear Equation A Linear Equation A Linear Equation
Coefficients Coefficients
17 2 7 4 3 = + + + w z y x
Variables
A Simple Example A Simple Example A Simple Example A Simple Example
Consider the following example
4
1 2
=
= +
y x
y x
4 = y x
+ 2 1 x + 2y = 1
(3 1)
Solution is the
x - y = 4
(3, -1)
Solution is the
point of intersection
of the two lines
Matrix Form of Linear Equations Matrix Form of Linear Equations Matrix Form of Linear Equations Matrix Form of Linear Equations
1 2 = + y x
4 = y x
(

=
(

4
1
1 1
2 1
y
x
b x = A
The Determinant Method The Determinant Method The Determinant Method The Determinant Method
Cramers Rule
D = determinant of matrix A
D
i
= determinant of A
i
, where
A
i
is obtained by replacing the i
th
column of A with b
3
2 1
D 9
2 1
D 3
1 1
D
A unique solution exists if D 0
3
1 1
=

= D 9
1 4
1
=

= D 3
4 1
2
= = D
A unique solution exists if D 0
1 ; 3
2
2
1
1
= = = =
D
D
x
D
D
x
D D
Parallel Lines: No Solution Parallel Lines: No Solution Parallel Lines: No Solution Parallel Lines: No Solution
1 2 = + y x
4 4 2 = + y x
2x + 4y = 4
x + 2y = 1
Co Co--Incident Lines: Infinite Solutions Incident Lines: Infinite Solutions Co Co Incident Lines: Infinite Solutions Incident Lines: Infinite Solutions
1 2 = + y x
2 4 2 = + y x
2x + 4y = 2
x + 2y = 1
Condition Number Condition Number Condition Number Condition Number
1 2 = + y x
1 ; 3 = = y x
001 . 2 999 . 3 2 = + y x
1 ; 3 = = y x
2 999 . 3 2
1 2
= +
= +
y x
y x
0 ; 1 = = y x
(

=
999 . 3 2
2 1
A
Eigenvalues ; 99 . 4 ; 10 2
2
4
1
= =


Examples of Linear Examples of Linear ChE ChE Systems Systems Examples of Linear Examples of Linear ChE ChE Systems Systems
Reactor Network
Heat Exchange Network Heat Exchange Network
S i P Separation Processes
Plug Flow Reactor
Extension to Larger Dimensions Extension to Larger Dimensions Extension to Larger Dimensions Extension to Larger Dimensions
Questions to think about Questions to think about
How to represent n equations in n unknowns? p q
Does the system have unique solution?
Does the system have no solution?
General General nnnn System System General General nn nn System System
b x a x a x a x a = + + + +
1 1 3 13 2 12 1 11
n n
n n
b x a x a x a x a
b x a x a x a x a
= + + + +
= + + + +

2 2 3 23 2 22 1 21
1 1 3 13 2 12 1 11
b

n n nn n n n
b x a x a x a x a = + + + +
3 3 2 2 1 1
b x = A
Outline of Linear Algebra Methods Outline of Linear Algebra Methods Outline of Linear Algebra Methods Outline of Linear Algebra Methods
Cramers Rule (and why it is not used) ( y )
Direct Methods
G Eli i ti Gauss Elimination
Analysis
Computational Effort Computational Effort
Pivoting
Gauss Jordan Gauss Jordan
Matrix Inversion
LU Decomposition LU Decomposition
Outline of Linear Algebra Methods Outline of Linear Algebra Methods Outline of Linear Algebra Methods Outline of Linear Algebra Methods
Sparse Matrices: Thomas Algorithm p g
Iterative Methods
G Si d l Gauss-Siedel
Jacobi Iteration
R l i M h d Relaxation Methods
Eigenvalues and Eigenvectors g g

You might also like