Lecture 11 Flashcards
Undo a linear operation
Ax = y, then x = A^-1.y
Solve lower triangular systems
Forward substitution:
Lx = b
xi = (bi - sum(j=1>{i-1}) Lij xj) / Lii (derivate…)
If any Lii=0, singular and cannot be solved, otherwise unique solution
Solve upper triangular systems
Backward substitution:
Ux = b
xi = (bi - sum(j=i+1 > n) Uij Xj) / Uii
If any Uii=0, singular and cannot be solved, otherwise unique solution
Derivation: x1 [U11 0 … 0] + … + xi [U1i U2i … Uii 0 … 0] + … + xn [U1n … Unn] = [b1 .. bn]
so xn = bn/Unn and
xn-1 = (b{n-1} - xn U{n-1,n}) / U{n-1,n-1}
xi Uii = bi - sum… xj Uij
Complexity Forward/backward substitution?
n^2
Solve Ax=b when A non triangular?
A=LU factorization, with L diagonal = 1 (because unicity –we could have chosen U diagonal = 1 instead). If the LU decomposition exists then it is unique (factorization does not always exist). Ax = b > LUx = b 2 problems: - solve Ly = b (forward) - solve Ux = y (backward)
2x2 example
A11 A12
A21 A22
find L, U
L =
1 0
A21/A11 1
U =
A11 A12
0 A22-(A21/A11)A12
A in invertible, U?
U is invertible