Numerical methods
Reminders on matrices
A ∈ Rn×n: A is symmetric if A = AT. A matrix A is positive definite if xTAx > 0 ∀ x ∈ Rn with x ≠ ∅. A is non-singular if ATA is symmetric and positive definite.
Natural norm
|||A||| = supy≠∅ ||Ay|| / ||y||. Verify → ||Ay|| ≤ ||A|| ||y||, ||A + B|| ≤ ||A|| + ||B||.
Solving linear systems
The problem: given b ∈ Cn, A ∈ Cn×n, R ∈ R, we look for X ∈ Cn solution of AX = b. Solution is X = A-1b. There is a unique solution if and only if A is non-singular (or invertible). A necessary and sufficient condition is that det(A) ≠ 0.
Simplest systems are diagonal systems
Dχ = b with D =
d11 0
0 d22
xi = bi / djj, i=1,2,...,n
n operations
Lower triangular matrices
L =
l11 0
l21 l22
ln1 ln2 lnn
System can be solved "forward":
x1 = b1 / l11
x2 = (b2 - l21x1) / l22
xn = (bn - ∑ lnjxj) / lnn
n2 operations
A special lower triangular matrix
(L has only 1 on the diagonal) → L =
1 0
l21 1
ln1 ln2 1
Two equivalent algorithms:
for i = 2, ..., n
for j = i - 1, ..., 1
bi = bi - Ii,jbj;
end
end
for k = 1, ..., n - 1
for i = k + 1, ..., n
bi = bi - Ii,kbk;
end
end
Upper triangular matrices
U =
u11 u12 u1n
0 u22 u2n
0 0 u33
xn = bn / unn
xn-1 = (bn-1 - un-1,n xn) / un-1,n-1
x1 = (b1 - ∑ u1,jxj) / u11, j=2
n2 operations
Execution time
t = # operations / # flops
Numerical methods
Reminders on matrices
A ∈ Rn×n: A is symmetric if A = AT. Eigenvalues of a symmetric matrix are real. A matrix A is positive definite if xTAx > 0 ∀ x ∈ Rn with x ≠ xTAx = 0 if x = A is non-singular = ATA is symmetric and positive definite.
Natural norm
‖A‖ = sup ‖A‖ / ‖‖ ≠ Verify → ‖A‖ ≤ ‖A‖ ‖‖‖A + B‖ ≤ ‖A‖ + ‖B‖
Solving linear systems
The problem → given b ∈ Rn, A: Rn x Rn we look for X ∈ Rn solution of AX = b. Solution: x = A-1b.
Simplest systems are diagonal systems
Dx = b with D =
d11 0
0 d22
n operations
xi = bi / dii i = 1,2,...,n
Lower triangular matrices
L =
I11 0
I21 I22
In1 In2 Inn
System can be solved "forward":
x1 = b1 / I11
x2 = b2 - I21x1
xn = bn - Σj=1n-1 Injxj / Inn
n2 operations
A special lower triangular matrix
(L has only 1 on the diagonal) → L =
1 0
In1 1
In1 In2 1
x1 = b1
x2 = b2 - I21x1
xn = bn - Σj=1n-1 Injxj
Two equivalent algorithms:
for i = 2,...,n
for j = 1,..,i-1
bi = bi - Ii,jbj
end
end
for k = 1,...,n - 1
for i = k+1,...,n
bi = bi - Ii,kbk
end
end
Upper triangular matrices
U =
U11 U12 U1n
0 U22 U2n
0 0 U33
xn = bn / Unn
xn-1 = (bn-1 - Un-1,n xn) / Un-1,n-1
x1 = (b1 - Σj=2n U1,jxj) / U11
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
-
Temi d'esame risolti Numerical Methods (Advanced ), prof.Sangalli
-
Riassunti digitali (apple pencil) di tutte le domande di teoria dell'esame Numerical Methods for Engineering
-
Temi d'esame svolti - Numerical methods for civil engineering
-
Numerical Methods - Esame base - Pseudocodici ed esercizi