Interactive Educational Modules in
Scientific Computing

Givens QR Factorization

This module illustrates computing the QR factorization of a matrix using Givens' method. The initial matrix is reduced to upper triangular form by applying a sequence of plane rotations to annihilate the subdiagonal entries in successive columns.

The user first selects a matrix size, then selects a matrix by choosing a preset example, a random matrix, or typing in desired entries. The successive steps of Givens QR factorization are then carried out sequentially by repeatedly clicking on NEXT or on the currently highlighted step. The next matrix entry to be annihilated is selected by clicking on it; a default choice is highlighted in color. A Givens rotation is then determined that annihilates the chosen entry. The Givens rotation matrix is displayed on the right, and the cosine, sine, and angle of rotation (in radians) are shown in text boxes. The Givens rotation is applied to the relevant portion of the matrix, and then the process is repeated with another matrix entry. The factorization process is complete when the original matrix has been reduced to upper triangular form. Formats provided for displaying numeric entries include exponential (e), fixed (f), and generic (g), with g the default.

Reference: Michael T. Heath, Scientific Computing, An Introductory Survey, 2nd edition, McGraw-Hill, New York, 2002. See Section 3.5.2, especially Example 3.10.

Developers: Jessica Schoen and Michael Heath