# QR - Factorization: If A has full rank then R has non-zeros in the diagonal

$$Q$$ is an orthogonal matrix. $$R$$ is an upper triangular matrix. $$A \in \mathbb{R}^{m\times n}$$ with $$m > n$$ and its QR-Factorizations is $$A = QR$$. Show that if $$A$$ has full rank, then the diagonal elements of $$R$$ are non-zero. Show also that the first $$n$$ columns of $$Q$$ are an orthonormal basis of the column space of $$A$$.

I tried to prove that, but with no success. Can someone help me?

Hint: if $$R$$ is upper triangular and $$R_{kk} = 0$$, then its first $$k$$ columns must be linearly dependent, which makes $$R$$ have rank $$< n$$.

By "the spanning of $$A$$" you mean "the column space of $$A$$", i.e. the span of the columns of $$A$$.

• Yes, I meant column space. I edited that, thanks. I don't quite understand why when the diagonal of $R$ has zeros then the first $k$ columns must be linearly dependent? Also even if this is true and $R$ has rank $< n$, how does this prove the rank of $A$? – ladyeli555 May 23 at 0:09
• 1) If $R_{kk} = 0$, the first $k$ columns of $R$ can have nonzero entries only in the first $k-1$ positions, and so are in the span of the vectors $e_1, \ldots e_{k-1}$ (where $e_j$ is the unit vector with $1$ in position $j$ and $0$ everywhere else). Thus their span has dimension $\le k-1$. 2) If $Rv = 0$ then $QRv = 0$. – Robert Israel May 23 at 2:00

The column space of the matrix $$A$$ is the span of the columns. I.e

$$\textrm{Span}(A) = \bigg\{ \sum_{i=1}^{n} c_{i}a_{i} | c_{i} \in \mathbf{K} , a_{i} \in A \bigg\}$$

or any linear combination of the columns $$a_{i}$$. Now the columns $$q_{i}$$ are formed by iteratively subtracting of the previous projections.

$$q_{n} = \frac{a_{n} - \sum_{i=1}^{n-1} r_{in}q_{i}}{r_{nn}}$$

so $$q_{n}$$ is a linear combination of the columns of $$A$$. Note that

$$v_{n} = a_{n} - \sum_{i=1}^{n-1} r_{in}q_{i}$$

is orthogonal and the coefficient $$r_{nn}$$ is actually $$\| v_{n}\|$$ which makes $$q_{n}$$ orthonormal.

Note: I think $$\textrm{Span}(A)$$ is a slight abuse of notation.