Open rachka opened 8 years ago
Yes. A lower (resp. upper) triangular matrix contains non-zero element at and below (resp. above) the main diagonal.
Thanks for the clarification. I figured that's how it generally is but wanted to be extra sure.
Just want to make sure I have this correct: in L (and U) from HW#1 the main diagonal contains all zeros but in L (and U) from HW#2 (I'm looking at solve_lower_triangular and solve_upper_triangular) the main diagonal is non-zero?
Yeah the back and forward substitution algorithms rely on the diagonals being non zero. That is the default definition of lower and upper triangular. HW 1 had it differently because Jacobi and Gauss Seidel use special cases of U and L to solve Ax = b iteratively.
@rachka is correct.
The matrix names L
and U
are overloaded in numerical analysis and scientific computing. Here is a partial list of their uses:
A = L + U + D
where D
is diagonal and L
and U
are triangular with zero diagonalsLx = b
where L
is a lower triangular matrix. (The definition of triangular allows for non-zero diagonal entries.)A = LU
where L
and U
are triangular. Note that these L
and U
are very different from those used in the iterative methods additive decomposition. (This is a multiplicative decomposition.)
With these solvers, is it safe to assume that the arguments L and U both contain the main diagonal with the test suites used for grading?