# QR decomposition - does Q always have full column rank?

Given $A \in R^{m\times n}$, $Q \in R^{m\times n}$ and $R \in \mathbb{R}^{n\times n}$ with $m \ge n$, does $Q$ always have $n$ independent columns?

I played around in matlab by generating a random $m\times n$ matrix $B$ and setting $A = BB^{T}$. When I do the QR-decomposition, I always get a $Q$ with full rank but $R$ singular. Not sure how to construct a more mathematical argument though.

-

Note that the matrix $Q$ always has columns to be orthonormal and therefore the matrix $Q$ will always have full-rank. In general, you could have three different $QR$ factorizations; If $A$ is a $m \times n$ matrix with rank $r$ and $m \geq n$, we could then have

1. Full $QR$: $Q \in \mathbb{R}^{m \times m}$ and $R \in \mathbb{R}^{m \times n}$.
2. Reduced $QR$: $Q \in \mathbb{R}^{m \times n}$ and $R \in \mathbb{R}^{n \times n}$.
3. Reduced rank $QR$: $Q \in \mathbb{R}^{m \times r}$ and $R \in \mathbb{R}^{r \times n}$.

In all these cases, the columns of $Q$ are orthonormal, while the matrix $R$ is upper triangular.

-

By design, $Q$ is orthogonal and $R$ is upper triangular. Orthogonal matrices cannot be singular.

-

It depends on what you mean by $Q$ and $R$. If you mean the reduced QR-decomposition, that is you remove the null vectors you get from Gram-Schmidt orthogonalization, then of course $Q$ will be full rank.

On the contrary, if you are talking of the matrix $Q$ with the same number of rows and columns as $A$, then it can have zero columns.

Usually we will have, for an $m\times n$ matrix $A$ with rank $r$, that $Q$ is $m\times r$ and $R$ is $r\times n$. By definition $Q$ will have rank $r$, because its columns are non zero pairwise orthogonal vectors.

If you take a random $m\times n$ matrix $B$ with $m\le n$, then chances are high that $BB^T$ will have rank $m$. But of course this is not true in general. To make an easy example, take $$B=\begin{bmatrix}1 & 1 \\ 1 & 1\end{bmatrix}$$ Then $$BB^T=\begin{bmatrix} 2 & 2 \\ 2 & 2 \end{bmatrix}$$ and the reduced QR decomposition of $BB^T$ is $$BB^T=\begin{bmatrix}1/\sqrt{2} \\ 1/\sqrt{2} \end{bmatrix} \begin{bmatrix} 2\sqrt{2} & 2\sqrt{2} \end{bmatrix}$$ Notice that $Q$ must be $2\times1$ and not $2\times2$.

-