Professional Documents
Culture Documents
Module1 A Whole
Module1 A Whole
Module1 A Whole
• Basics of matrix
• Computational Knowledge
• Solving Linear Equations (Class 10 mode)
Module -1 a (Tools you will learn /or revisit)
• Algebra of matrices
Singularity, condition of singularity, Symmetric, diagonal, Identity, upper triangular,
zero, Hermitian, Vector Norm, Matrix norm, Matrix condition number, Error bounds,
Operation: Addition, Multiplication, Trace,
• Naïve Gaussian elimination: Forward and backward elimination, pseudo code,
computational complexity
• Tridiagonal Systems, Diagonal Dominance, Tridiagonal Algorithm-importance,
Examples, Gauss-Jordan Algorithm, LU decomposition in any linear equations,
Cholesky decompositions , pseudo code
Linear Equations
is called as linear Equations
Linear Equations
is called as linear Equations
𝑥1 𝛽1
¿
𝐴1 1 ⋯ 𝐴1 𝑁
⋮ ⋱ ⋮ ⋮ ⋮
𝐴𝑁 1 ⋯ 𝐴 𝑁𝑁
𝑥𝑁 𝛽𝑁
Linear Equations
is called as linear Equations
𝑥1 𝛽1
¿
𝐴1 1 ⋯ 𝐴1 𝑁
⋮ ⋱ ⋮ ⋮ ⋮ Question: How can we solve the N
𝐴𝑁 1 ⋯ 𝐴 𝑁𝑁 dimensions equations? What will be the
𝑥𝑁 𝛽𝑁 caveats?
Linear Equations
is called as linear Equations
A triangular matrix is a type of square matrix that has all values in the upper-right or lower-left of the matrix with the
remaining elements filled with zero values.
Symmetric and Transpose
Rudiment of Matrix
If , then can be called as symmetric
Triangular Matrix
A triangular matrix is a type of square matrix that has all values in the upper-right or lower-left of the matrix with the
remaining elements filled with zero values.
Diagonal Matrix
A diagonal matrix is one where values outside of the main diagonal have a zero value, where the main diagonal is taken
from the top left of the matrix to the bottom right.
Identity Matrix
An identity matrix is a square matrix that does not change a vector when multiplied.
Symmetric* and Transpose
Rudiment of Matrix
If , then can be called as symmetric
Triangular Matrix
A triangular matrix is a type of square matrix that has all values in the upper-right or lower-left of the matrix with the
remaining elements filled with zero values.
Diagonal Matrix
A diagonal matrix is one where values outside of the main diagonal have a zero value, where the main diagonal is taken
from the top left of the matrix to the bottom right.
Identity Matrix
An identity matrix is a square matrix that does not change a vector when multiplied.
Skew Symmetric* 𝑨 𝑻 =− 𝑨
Hermitian
A matrix is said to be hermitian if and only it is equal to the transpose of its conjugate matrix .
Rudiment of Matrix
𝑨𝑨𝑻 = 𝑰 𝑨𝟐 = 𝑰
A square matrix A of
order n is nilpotent if
and only if Ak = O for
some k ≤ n.
Hey Neo , I am
Idempotent.
I know my “power”
) very well
I am making
you Nilpotent.
Behold !!!!
Rudiment of Matrix
Band Matrix
A sparse
matrix whose non-
zero entries are
confined to a
diagonal band,
Rudiment of Matrix
Band Matrix
A sparse
matrix whose non-
zero entries are
confined to a
diagonal band,
Rudiment of Matrix
Band Matrix
A sparse Matlab:
matrix whose non- Issymmetric,
zero entries are inv,
confined to a A’,
diagonal band, A*A; A*.A;
Addition
Rudiment of Matrix algebra
Addition
Rudiment of Matrix algebra
Multiplicative
Addition
Rudiment of Matrix algebra
Multiplicative
Properties
Addition
Rudiment of Matrix algebra
Multiplicative
Properties
Properties of Matrix Transpose
Rudiment of Matrix algebra
Properties of Matrix Transpose
Rudiment of Matrix algebra
Matrix Inverse
P
Matrix times Matrix – 4 Ways
Practical Patterns
¿ ¿ ¿
[ ] [ ] [ ]
𝑎11 𝑎12 ¿ ¿ − 𝒂∗
1 −
𝐴= 𝑎21 𝑎 22 = 𝒂𝟏 𝒂𝟐 = − 𝒂∗ −
2
𝑎31 𝑎 32 ¿ ¿ ∗
− 𝒂3 −
[ ] [ ][ ]
𝑥1 1 𝑥1
[1 2 3 ] 𝑥 2 = 2 ∙ 𝑥2 = 𝑥1 +2 𝑥2 +3 𝑥 3
𝑥3 3 𝑥3
Mv1 ¿ Mv2 ¿ +¿
The row vectors of A are multiplied by a vector The product is a linear combination of the column
and become the three dot-product elements of . vectors of A.
At first, you learn (Mv1). But when you get used to viewing it as (Mv2),
you can understand as a linear combination of the columns of A. Those
products fill the column space of A denoted as .
The solution space of is the nullspace of A denoted as
vM1 ¿
vM2 ¿ +¿ +¿
Every element becomes a dot product of row vector and are linear combinations of columns of A.
and column vector.
MM
3
MM
4 ¿ +¿
¿ ¿
Multiplication is broken down to a sum of rank 1 matrices.
¿ ¿
¿
+¿
¿
Can also talk about non-square systems where A is mn, b is m1, and
x is n1
• Overdetermined if m>n:
“more equations than unknowns”
• Underdetermined if n>m:
“more unknowns than equations”
Can look for best solution using least squares
Singularity and nonsingularity
Singularity and nonsingularity
or inconsistent:
Example
Singularity and nonsingularity
Singularity and nonsingularity
Geometric Interpretation
P-norm
P-norm
Example
Properties Vector Norm
Example
Matrix Norm
Example, Script
Properties of Matrix Norm
Condition Number
Example, Script
Properties of Condition Number
Error Bounds
Condition number yields error bound for a computed solution to a linear system.
Error Bounds
Condition number yields error bound for a computed solution to a linear system.
Prove it
Solving Linear Equations
Caveats
1. Conditioning
2. Relative error ( See the book of Teath for more discussion)
3. ~10^2 slides are devoted to learning the matrix algebra. Learning of condition
number and relative error is explored. BUT!!!
The objective is still not described
We do not know how to solve linear equations . Therefore,
Solving Linear Equations
Caveats
1. Conditioning
2. Relative error ( See the book of Teath for more discussion)
3. ~10^2 slides are devoted to learning the matrix algebra. Learning of condition
number and relative error are also settled. BUT!!!
The objective is still not described
We do not know how to solve linear equations . Therefore,
Solving Linear Equations
Q:What can be done?
Fundamental operations:
1. Replace one equation using linear combination of other equations
2. Interchange two equations
3. Re-label two variables
Solving Linear Equations
Q:What can be done?
Fundamental operations:
1. Replace one equation using linear combination of other equations
2. Interchange two equations
3. Re-label two variables
• Combine to reduce to trivial system
Simplest variant only uses #1 operations,
but get better stability by adding
#2 (partial pivoting) or #2 and #3 (full pivoting)
In parallel universe
Solving Linear Equations
Gauss-Jordan Elimination
• Solve:
• Given:
• Negate row2
Solving Linear Equations
Gauss-Jordan Elimination
• Before we see that, let’s look at a few special cases that are even
faster
Tridiagonal Systems
𝑀𝐴𝑥=𝑀𝑏
What type of transformation of the linear system leaves solution unchanged?
𝑀𝐴𝑥=𝑀𝑏
Example Permutation matrix
Example Permutation matrix
• If another equation in system involves only one additional solution component, then
by substituting one known component into it, we can solve for another component.
What type of linear system is easy to solve?
• If one equation in system involves only one component of solution (i.e., only one entry
in that row of matrix is nonzero), then that component can be computed by division.
• If another equation in system involves only one additional solution component, then
by substituting one known component into it, we can solve for another component.
• If this pattern continues, with only one new solution component per equation, then all
components of solution can be computed in succession.
What type of linear system is easy to solve?
• If one equation in system involves only one component of solution (i.e., only one entry
in that row of matrix is nonzero), then that component can be computed by division.
• If another equation in system involves only one additional solution component, then
by substituting one known component into it, we can solve for another component.
• If this pattern continues, with only one new solution component per equation, then all
components of solution can be computed in succession.
x=zeros(n,1);
for j=n:-1:1
if (U(j,j)==0) error('Matrix is singular!'); end;
x(j)=b(j)/U(j,j);
b(1:j-1)=b(1:j-1)-U(1:j-1,j)*x(j);
end
Transforming general linear system into triangular form
=
Transforming general linear system into triangular form
=
Transforming general linear system into triangular form