How unique is thin/reduced QR decomposition without $R_{ii}>0$ condition

linear algebramatrix decompositionnumerical linear algebra

Let $A$ be an $m\times n$ real matrix ($m\ge n$) with independent columns, and let $Q_1 R_1 = Q_2 R_2$ be two thin/reduced QR decompositions of $A$, i.e. $Q$ ($m\times n$) has orthonormal columns and $R$ ($n\times n$) is upper-triangular. If we relax the condition that the diagonal elements of the $R$ matrices be positive, then the decomposition is not unique. But how exactly are $Q_1$ and $Q_2$ related? (same question for $R_1$ and $R_2$)

In the square case ($m=n$), I can prove that $R_1 = SR_2$ and $Q_1 = Q_2S$, where $S$ is a signature matrix (diagonal matrix with $\pm1$ on the diagonal). However, I'm stuck trying to prove this for thin matrices ($m>n$). The sticking point in my proof is the assumption that the $R$ matrices are invertible (or simply that they have nonzero diagonals).

I'd appreciate any pointers to a good reference on this or sketches of a proof. This should be a standard result from linear algebra, but I haven't found a book which fully addresses this (these notes come close, but they don't explain how $A$ having independent columns implies $R$ is invertible).


Why do I relax the positive diagonal condition? Several numerical algorithms for QR decomposition, including those from NumPy and SciPy, do not have this restriction. I need to be certain that these decompositions can be fixed/made unique via a signature matrix $S$.

Best Answer

The sticking point in my proof is the assumption that the 𝑅 matrices are invertible (or simply that they have nonzero diagonals).

Notice for any choice of $k$
$0\lt \det\big(A^T A\big) = \det\big(R_k^TQ_k^TQ_k R_k\big) =\det\big(R_k^T R_k\big) = \det\big(R_k\big)^2 = \prod_{j=1}^n \big(r_{j,j}^{(k)}\big)^2$
so the diagonals must be non-zero

I assume you are working over $\mathbb R$ as your mention of a signature matrix suggests you that you are working over $\mathbb R$ not $\mathbb C$