A real square matrix is an orthogonal matrix when , equivalently its columns form an orthonormal basis. Here is the transpose and the identity matrix. For every vector ,
Taking nonnegative square roots proves
Thus an orthogonal matrix preserves the Euclidean norm.
Since , the QR factorization gives
First compute by a matrix-vector product, costing scalar multiplications and additions for dense . Then solve the upper triangular matrix system by back substitution:
Every denominator is nonzero because is invertible. The back substitution costs multiplications and subtractions together, plus divisions, for arithmetic operations. Including , the total is arithmetic operations under this scalar counting convention, hence , with denoting Big O notation. The already supplied QR factorization is reused; no matrix inverse needs to be computed.
Choose the following consistent sign convention. The Givens rotation equals the identity matrix except for the block on coordinates :
Thus it changes only the th and th coordinates of a vector. Write , . Its two-coordinate block satisfies
All remaining coordinates are unchanged, so . Hence every such Givens rotation is an orthogonal matrix. With this convention the two-coordinate rotation matrix rotates through angle .
Let . If , choose so that
Such an angle exists because the two ratios have squared sum one. Then the changed coordinates are
All other coordinates satisfy . If , both input coordinates are zero; take , giving the identity matrix on this pair. In all cases,
This fixes a nonnegative retained coordinate and handles division by zero explicitly. For floating-point computation, the stable construction of a Givens rotation uses scaled Euclidean norm evaluation to avoid unnecessarily overflowing or underflowing the squares.
Apply the product from right to left, choosing every Givens rotation from the current first column. First replaces by . Next combines that retained entry with and sets the third entry to zero. Inductively, after eliminating coordinates , the first coordinate is
and coordinates are zero. Later Givens rotations involve only coordinate one and a new coordinate, so those zeros remain zero. Therefore
where is the first standard basis vector. The zero vector is included by choosing the identity matrix for every zero pair. The nonnegative sign follows from the convention fixed in part (c)(ii). This is the first-column stage of QR decomposition by Givens rotations.
Put and write its second column as . For , take
where each angle is computed from the current second column, in the right-to-left application order. These Givens rotations eliminate its entries in rows by accumulating their Euclidean norm in row two.
Each rotation acts only on rows with indices at least two. The first column of is , whose entries in all those rows are zero. Mixing two zeros leaves them zero, and row one is untouched. Thus the first column is unchanged. The resulting matrix has the form
This verifies both required properties, including the case of zero second-column tail. When there are no rows to eliminate: take , the empty product. No sign change of is required in that case. Each Givens row-pair update preserves previously eliminated columns, which is the central invariant of QR decomposition by Givens rotations.
The orthonormal columns satisfy and . By part (i), . A product of orthogonal matrices is an orthogonal matrix, since . Consequently
The last expression is the first coordinate of the transformed second column. Thus the first row is
The one in the first entry uses the nonnegative retained-coordinate convention. A different consistent sign convention could give instead; the second entry must still be zero by preservation of the inner product.

Articles by others on the same topic (0)

There are currently no matching articles.