Sign up ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Tried >[Q,R] = qr(a)

R is upper triangular part of >qr(a) as qr(a)'s lower triangular part has value but how to calculate the >qr(a).

Would like to do this in F# but Sho library's Q, R are different from matlab, hope there is a way to fix it.

Just type qr(a) but not [Q,R] = qr(a), then you will see qr(a)'s direct result

share|cite|improve this question
I don't understand your question. The $QR$ factorization $A = QR$ has $Q$ to be an orthonormal matrix and $R$ is an upper triangular matrix. Where does the lower triangular matrix enter the picture? – user17762 Mar 18 '12 at 3:17
don't use [Q,R] = qr(a), just type qr(a) in matlab then you will see it display result directly. upper triangular part of this result is R, how about the lower triangular part – M-Askman Mar 19 '12 at 14:07
I can't check since the computer I am using doesn't have MATLAB, but the usual Householder algorithm for computing the QR decomposition stores the Householder vectors used for constructing the orthogonal factor in the lower triangular portion. I don't know if MATLAB maintains that format, but I don't quite understand why you need the Householder vectors when @Sivaram already showed you how to obtain the explicit orthogonal factor. – J. M. Mar 19 '12 at 15:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.