[Math] QR Factorization: Size of Matrix R

linear algebra

So I'm reading about $QR$ factorization. Here's what my book says:

If $M$ is an $n \times m$ matrix with linearly independent columns, then there is an $n \times m$ matrix $Q$ whose columns are orthonormal and an upper triangular matrix $R$ with positive diagonal entries s.t.:

$M = QR$

But how do we know what size $R$ is?

Since $Q$ is $n \times m$, I know $R$ must have $m$ rows for the product to make sense. And I think "upper triangular only refers to square matrices, so $R$ must be $m \times m$?

Is that right?

Thanks for the help,
Mariogs

Best Answer

By the laws of matrix multiplication, multiplying a matrix of size $a \times b$ by a matrix of size $b \times c$ produces a matrix of size $a \times c$.

In this case, from the dimensions of $Q$ you know that $a = n$ and $b = m$, and from the dimensions of $M$ you know that $a = n$ (check) and $c = m$. Therefore the dimensions of $R$ must be $b \times c$ = $m \times m$.

By the way, the usual convention is to say that matrices are $m$ by $n$, not $n$ by $m$.

Related Question