## Unit4.5.2Family values

For most dense linear algebra operations, like LU factorization, there are multiple unblocked and corresponding blocked algorithms. Usually, each of the blocked algorithms casts most computation in terms of an operation that is a matrix-matrix multiplication, or a variant thereof. For example, there are five blocked algorithms (variants) for computing the LU factorization, captured in Figure 4.5.3.

It turns out that different variants are best used under different circumstances.

• Variant 5, also known as Classical Gaussian Elimination and the algorithm in Figure 4.5.1, fits well with the matrix-matrix multiplication that we developed in this course, because it casts most computation in terms of a matrix-multiplication with large matrix sizes $m$ and $n \text{,}$ and small matrix size $k$ (which equals $b$): $A_{22} := A_{22} - A_{21} A_{12} \text{.}$

• Variant 3, also known as the left-looking variant, can be easily check-pointed (a technique that allows the computation to be restarted if, for example, a computer crashes partially into a long calculation).

• Variants 3, 4, and 5 can all be modified to incorporate "partial pivoting" which improves numerical stability (a topic covered in courses on numerical linear algebra).

Further details go beyond the scope of this course. But we will soon have a MOOC for that: Advanced Linear Algebra: Foundations to Frontiers! [19].

What we are trying to give you a flavor of is the fact that it pays to have a family of algorithms at one's disposal so that the best algorithm for a situation can be chosen. The question then becomes "How do we find all algorithms in the family?" We have a MOOC for that too: LAFF-On Programming for Correctness [20].