In the documentary we read about QRDecomposition (Link)

QRDecomposition[m] yields the QR decomposition for a numerical matrix m. The result is a list {q,r}, where q is a unitary matrix and r is an upper‐triangular matrix.

By QR-decomposition we can decompose the matrix m=q.r. Therefore I was surprised to find following point in the same description:

The original matrix m is equal to ConjugateTranspose[q].r.

What is the reason that MMA returns the conjugate transpose of q but not q? Because of this reason we can decompose matrix m only by the conjugate transpose of q.

MMA 13.2


1 Answer 1


$q$ is a unitary matrix, so the conjugate transpose is actually the inverse: $q^+=q^{-1}$. In this sense, the equation that is satisfied,

$$ m=q^+\cdot r=q^{-1}\cdot r $$

can be written as

$$ q\cdot m= r $$

which is the form of the equation that is, in practice, often very useful. It answers the question: "What do I need to do to $m$ to turn it into a triangular matrix?"

So I guess they picked this latter form when deciding how to deliver the results, for reasons we can ultimately only guess at.

The same remains true for pivoting: QRDecomposition[m, Pivoting->True] returns $\{q,r,p\}$ that satisfy

$$ q\cdot m\cdot p=r $$ and in this sense the matrices $q$ and $p$ serve to turn $m$ into the triangular matrix $r$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.