Professional Documents
Culture Documents
Linear Algebra
Linear Algebra
Simulation
Linear Algebra
Power Series
Generate a graph of cosθ (-3π
to 3π) 1
0.8
a polynomial? 0.4
0.2
cosTHETA
cosθ = C1+ C2θ + C3θ2+ C4θ3+….. 0
-0.2
-0.6
-1
-10 -8 -6 -4 -2 0 2 4 6 8 10
Theta
Homework problem
Develop sinθ series and program it!
Euler’s Formula
Jacob Bernoulli
𝑖𝑥 1 2 1 3 1 4 1 5
𝑒 ¿ 1+ 𝑥𝑖+ 𝑥 + 𝑥 𝑖+ 𝑥 + 𝑥 𝑖
2 6 24 120
1 2 1 3 1 4 1 5
cos 𝑥+ 𝑖sin 𝑥=1+ 𝑥𝑖+ 𝑥 + 𝑥 𝑖+ 𝑥 + 𝑥 𝑖
2 6 24 120
Solution is X = A\b
(A\ = inverse of matrix)
Complex Number
Z = a + ib
Ž = a – ib
Euler identity
Null vector
Vectors
Dot product of the vectors
Multiplication of matrices
Gaussian Elimination
Method
1 1 1 X1 4
2 1 3 X2 = 7
3 1 6 X3 2
Augmented matrix
Gaussian Elimination
Method
Perform Row operation: Add two rows after multiplying with a
constant to eliminate first member of the row “a(r,c) = 0
As Ax = B
LUx = B
PA = LU
PA = LU
LUx = PB
x = U-1(L-1(PB))
UL Matrices
UL Matrices
UL matrices are created to find the inverse of the
matrix
UL Matrices
This is equal to
x = A\B
Cholesky Decomposition
A = LLT
First column
Cholesky Decomposition
Second column
Algorithm
MATLAB Code
Problem
Solution
MATLAB Code
A = zeros(3,3); % set matrix of coefficients
A(1,:) = [ 1 1 1];
Boundary Conditions
Discretization
Central difference approximation
Matrix Formation
Matrix Formation
Sparse Matrix
Matrix having most of its elements equal to zero
Banded Matrix
If all the non zero members are located along at
diagonal
MATLAB Code
Spy plot for sparse
matrix
MATLAB Code
MATLAB
Code