# Uniqueness of the reduced rank QR decomposition

Let $A$ be a $n\times n$ matrix that is a real, symmetric, positive semidefinite and has rank $r$.

I read about the rank reduced $QR$ decomposition (here for example) as the QR variant where $A=QR$ with $Q\in\mathbb R^{n\times r}$ a matrix with orthogonal columns and $R\in\mathbb R^{r\times n}$ an upper triangular matrix. In the case of full rank $r=n$, then the decomposition is unique if the diagonal of $R$ is positive.

My question is: are there any assumptions on $R$ that lead to the uniqueness of the decomposition when $r<n$? For example, what if the diagonal of $R$ has to be positive and sorted?

For an $n\times n$ matrix $A$ with rank $r$ the reduced QR decomposition $A= QR$ will be unique when $Q$ is an $n\times r$ matrix with orthonormal columns and $R$ is an $r\times n$ matrix in row echelon form with positive leading entries in every row.
The proof is identical to the full rank case. You also do not need to assume that $A$ is symmetric or positive definite.