Talk:QR decomposition

message: I only had a look at the section "Using for solution to linear inverse problems" because I was going to point students to something for further reading on economy/deluxe decomposition, but that section seems to be full of mistake. I'm about to catch a flight but maybe I'll come back to this article later, but since that part looks so weird, I am suspicious of everything. Maybe someone else can look at it if I get distracted and don't come back. Loisel (talk) 18:06, 21 February 2020 (UTC)
thread_title:  No time to fix this but there seem to be errors 

message: I'm trying to translate this article in french. I'm wondering about the example of Householder reflections method and especially, the calcul for the length of the vector a_1. I see that \| a_1 \|  = 12+6+(-4) = 14 , I would prefer \| a_1 \|  = 12+6+|-4| = 22 or \| a_1 \|  = \sqrt{12^2+6^2+(-4)^2} . PierreLM April 13th 2005
: You know you can just use that in your French version. Dysprosia 13:30, 14 Apr 2005 (UTC)
thread_title:  translation question

message: The section on the Householder method says that \alpha should take its sign from the first element in \mathbf{x}. In the example which follows, however, the second matrix generated appears not to use the sign operation.  Am I missing something, or should this be fixed?--rlhatton 16:11, 25 January 2006 (UTC)
replies: text: Using the other sign does not matter if you use exact computations, as in the example. I tried to clarify this. However, perhaps it is better to change the example to match the sign convention, or at least make a remark at that point. -- Jitse Niesen (talk) 13:44, 27 January 2006 (UTC)

text: He's right though.  When you do it correctly, the signs change in the second Q matrix.  The correct answer has signs flipped.  — Preceding unsigned comment added by 50.40.70.99 (talk) 16:37, 30 November 2016 (UTC)
thread_title:  Sign of <math>\alpha</math> in Householder 

message: Hello there,
I'm just wondering why (in the householder-example) the resulting Q- and R-matrices don't multiply to A. Futhermore, the given Q and Q^t are not equal to I. Is the example correct?
:When I calculate the products, I get QR = A and QQT = I. Could you please be more specific? What value do you take for Q, and what do you get for QQT? -- Jitse Niesen (talk) 12:59, 8 June 2006 (UTC)
replies: text: No worries, happens to me all the time ;) -- Jitse Niesen (talk) 13:54, 9 June 2006 (UTC)
replies: text: Why isn't there a more simple example (easier numbers, these n/175 scares me ;-) )? 84.72.103.163 (talk) 22:35, 11 August 2009 (UTC)
thread_title:  Householder-Example: QR=A ? 

message: "We can similarly form Givens matrices G2 and G3, which will zero the sub-diagonal elements a21 and a32, forming a rectangular matrix"
should this actually say triangular instead of rectangular? -- User:Richard Giuly
:Yes, indeed. Now fixed. -- Jitse Niesen (talk) 12:43, 22 October 2006 (UTC)
thread_title:  typo ? 

message: Hello everyone.  Is anyone interested in adding some information for FULL QR decomposition?  Since currently, everything seem to be in reduced form. —The preceding unsigned comment was added by Yongke (talk • contribs) 22:11, 6 March 2007 (UTC)
thread_title:  FULL QR decomposition 

message: There is a page on the same topic on QR algorithm, which I think should be merged in this page, and then the QR algorithm should link to this page.
--Fbianco 22:12, 15 April 2007 (UTC)
replies: text: I don't think they should be merged. This page explains the QR decomposition and algorithms for computing it. The QR algorithm describes an algorithm for computing the eigenvalues of a matrix, which uses the QR decomposition. Those are different topics. -- Jitse Niesen (talk) 03:35, 16 April 2007 (UTC)
thread_title:  QR alorithm 

message: In the Householder section, since R = Qm...Q2Q1A, shouldn't it follow that the QR decomp is given by Q = Q1TQ2T... QmT instead of just Q = Q1Q2...Qm? -- anonymous
:Yep, you're right. Thanks for bringing this to our attention. -- Jitse Niesen (talk) 16:58, 27 October 2007 (UTC)
thread_title: Householder Problem

message: Why in the
: Q = Q_1^T Q_2^T \cdots Q_t^T, 
there is:  Q_i^T  instead of simply:  Q_i ? 
After all  Q_i^T = Q_i  because it's symmetric, isn't it?!  —Preceding unsigned comment added by Milimetr88 (talk • contribs) 16:27, 6 December 2009 (UTC)
thread_title:  Why writing transposed Qi instead of Qi? 

message: If using the trick (and not explicitly forming Q)
A_{k+1} = A_k - 2 \cdot v_k \cdot v_k^T
Then the algorithm is O(n^3)
However, the current explanation loops over an n-by-n matrixm multiplication n times, making the given algorithm O(n^4) (O(n^3) \cdot n = O(n^2), yes you can do matrix multiplication faster than O(n^3), but its still > O(n^2) making the algorithm still > O(n^3)).
Can you even form the Q matrix of qr factorization by householder reflections in O(n^3) time?  —Preceding unsigned comment added by 139.222.243.106 (talk) 22:51, 1 November 2010 (UTC)
thread_title:  Using Householder reflections O(n^3) incorect 

message: The example given is just wrong.  Using R, I get this:
    > x
       V1  V2  V3
    1 12 -51   4
    2  6 167 -68
    3 -4  24 -41
    > qr.R(qr(x))
          V1   V2  V3
    [1,] -14  -21  14
    [2,]   0 -175  70
    [3,]   0    0 -35
Testing the result given in the example gives this:
    > as.matrix(q) %*% as.matrix(r)
               V1        V2         V3
    [1,] 11.99996 -50.98650   4.002192
    [2,]  5.99998 166.97736  24.000335
    [3,]  3.99994 -67.98786 -40.998769
    > q
            V1      V2      V3
    1 -0.85714  0.3110 -0.4106
    2 -0.42857 -0.8728  0.2335
    3 -0.28571  0.3761  0.8814
    > r
       V1        V2       V3
    1 -14   -8.4286  -2.0000
    2   0 -187.1736 -35.1241
    3   0    0.0000 -32.1761
Clearly the example is screwed up just after the first step (the first column of Q is correct as is the first element of R).  — Preceding unsigned comment added by 67.160.196.149 (talk) 08:23, 19 January 2012 (UTC)
replies: text: The example is correct.  The QR decomposition is not unique.  Q is orthogonal, R is upper triangular, and Q*R = A. What part worries you?  You even used a calculator to prove the example was correct. JackSchmidt (talk) 19:24, 19 January 2012 (UTC)
thread_title:  Example is grossly incorrect 

message: The given dimensions of the matrices in the "Rectangular matrix" paragraph seem inconsistent to me. If, e.g., R is n by n as stated in the first sentence, then its bottom (m-n) rows are not zero. If "Q1 is m×n, Q2 is m×(m−n)", then Q should be m by m and not "an m×n unitary matrix Q". Am I wrong?  — Preceding unsigned comment added by 195.176.179.210 (talk) 12:54, 15 February 2012 (UTC)
replies: text: Well spotted. That was the result of this edit of 5 February, so not long ago. I've just undone it. Hope that section makes more sense now. Qwfp (talk) 15:28, 15 February 2012 (UTC)
thread_title:  Inconsistencies in matrix dimension for rectangular matrices 

message: It would be interesting from a historical point of view (of just for curiosity's sake) to know who first used the letters "QR", and why (if any special reason exists).  — Preceding unsigned comment added by Boriaj (talk • contribs) 07:57, 27 July 2012 (UTC)
replies: text: The QR algorithm article has some history in its lead and its history section. It appears that QR decomposition hadn't been invented prior to its use in the QR algorithm, though I could be wrong. The Francis (1961) paper referenced there says (bottom left of first page): "... the QR transformation, as I have (somewhat arbitrarily) named this modification of Rutishauer's algorithm...", so it appears that John G.F. Francis is responsible for naming the orthogonal/unitary matrix Q. The R is an obvious name for a right triangular matrix (more often referred to as an upper triangular matrix these days, it seems). Qwfp (talk) 12:22, 27 July 2012 (UTC)
thread_title:  Origin of the name? 

message: In the section "Using for solution to linear inverse problems", there is the sentence Compared to the direct matrix inverse, inverse solutions using QR decomposition are more numerically stable as evidenced by their reduced condition numbers [Parker, Geophysical Inverse Theory, Ch1.13].
That particular referenced book is not available to me, so I don't know what's written there. The argument by itself however is clearly wrong, as if $A = QR$, then $\cond(A) = \cond(R)$ (at least in the 2-norm). Hence, the condition number of the linear system one must solve (now involving R) has not changed. There might be still advantages due to more subtle issues (though I doubt that the advantage would be big).
Can anybody say more about the statement? I'd actually be in favor of removing it completely, rather than having it here in its current form
Wmmrmchl (talk) 14:10, 10 December 2012 (UTC)
replies: text: The referenced text discusses this in terms of the condition numbers of R_1 versus \Gamma = A^T A (in this article's notation; the original uses G instead of A). Specifically, \text{cond}(R_1) = \|R_1\|_2 \|R_1^{-1}\|_2 = \sqrt{\lambda_{max}(\Gamma) \lambda_{max}(\Gamma^{-1})} = c, where \lambda_{max}(M) indicates the largest eigenvalue of a matrix M. Contrast this with \text{cond}(\Gamma) = \sqrt{\lambda_{max}(\Gamma^2) \lambda_{max}(\Gamma^-2)} = c^2. Therefore, least-squares solutions computed using the QR transform, requiring solving R_1 X = B can potentially be more accurate than those relying on solving (A^T A) X = B' (for some B and B'). The sentence in question really should be reworded. Aldebrn (talk) 12:45, 18 June 2013 (UTC)
thread_title:  Stability of inverse using QR decomposition 

message: The part about householder says: u = x - alpha * e1.
In the example below, alpha is -14 and x is [12,6,-4]^T. 12 - (-14) is 26. So according to the above, u should be [26,6,-4]^T. However, it's [-2,6,-4]^T in the rest of the example, so alpha was added rather than subtracted. It still seems to work though, it seems to work with both.
Still, why is the example inconsistent with the article? Might be worth explaining.
Thanks!
85.2.5.221 (talk) 00:42, 6 January 2014 (UTC)
thread_title:  Sign of alpha in householder example 

message: QR decomposition is basis-dependent, yes? --VictorPorton (talk) 23:07, 25 April 2014 (UTC)
thread_title:  Is QR decomposition basis-dependent? 

message: The first paragraph states that QR decomposition has a lower condition number than direct matrix inverse. However, "condition number" is a property of the problem (solving a linear system) and not of the method. So AFAIK, this sentence has no sense. Somebody knows what is the actual reason why QR decomposition is more "numerically stable"?  — Preceding unsigned comment added by Alexshtf (talk • contribs) 12:02, 17 August 2014 (UTC)
thread_title:  Remark about "Using for solution to linear inverse problems" 

message: Hello fellow Wikipedians,
I have just modified  on QR decomposition. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
*Added archive http://web.archive.org/web/20081212221215/http://www.bluebit.gr:80/matrix-calculator/ to http://www.bluebit.gr/matrix-calculator/
*Added archive http://web.archive.org/web/20061122183956/http://documents.wolfram.com/mathematica/functions/QRDecomposition to http://documents.wolfram.com/mathematica/functions/QRDecomposition
When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at ).
Cheers.—InternetArchiveBot (Report bug) 10:21, 21 July 2016 (UTC)
thread_title:  External links modified 

message: In our linear algebra course we used the term QR decomposition of a m×n matrix to mean Q (of dimensions m×n) with orthonormal columns and upper triangular R (of dimensions n×n). This would be A=Q₁R₁ in the article's section Rectangular matrix. However, I don't know how to edit the section to mention that QR decomposition can sometimes mean Q₁R₁. If I should edit it at all. Michal Grňo (talk) 03:53, 17 June 2019 (UTC)
thread_title:  Alternative QR decomposition for rectangular matrix 

message: At the very beginning of the page, there is a mistake:
"In linear algebra, a QR decomposition, also known as a QR factorization or QU factorization, is a decomposition of a matrix A into a product A = QR of an orthogonal matrix Q and an upper triangular matrix R."
I think it's worth noting that Q is only orthogonal if it's square. Also it can be changed to "matrix with orthonormal columns Q"  — Preceding unsigned comment added by Astadnik (talk • contribs) 16:30, 18 October 2021 (UTC)
thread_title:  Q is not always orthogonal 

message: It would be useful to know how old QR factorization is.   
For example, when studying algorithms for the maximum flow problem, we could say that...      
# first came the Ford–Fulkerson algorithm (1956)  
# second came the Edmonds–Karp algorithm (1970)  
# third came the Preflow–push algorithm (1974)  
# fourth came the Chen, Kyng, Liu, Peng, Gutenberg and Sachdeva's algorithm (2022)    
The Maximum Flow problem is not related to QR factorization of matrices.   
However, I was hoping that the article on QR factorization could be edited to say when QR factorization was first published. If someone published it even earlier, that is good, the Wikipedia page is openly editable by anyone, and we can amend the official date of publication and name of the author.  
The year of publication is useful for determining what method was popular before  QR factorization and what method of solving linear systems computationally was popular after QR factorization. 
People are always publishing faster, more efficient approaches to solving these problems. 
At the time of my writing, the this article on QR factorization does not say anything about when the method was first published. In lieu of date of first publication, we could cite the older method or approach (the proceeding popular technique) and maybe also cite one of the newer techniques. That way, the position of QR factorization in time is available to the reader.  
Usually, the old approaches were easy to understand, but take a long time to computer.   
The old techniques for matrix decomposition are good for undergraduate students. 
The newer techniques run quickly on GPUs (graphics processing units), but are too complicated for most undergraduate students to understand.   
We must guide people through the progression of different techniques for solving linear systems through time, so that students see the easy-to-understand stuff first, and they see the complicated cutting-edge research sometime later. 174.215.16.174 (talk) 16:50, 6 June 2023 (UTC)
thread_title:  Is Someone Willing to Include a Year of Publication for a paper on QR Factorization? 

message: At the end of the subsection "square matrix" there is the following statement: “If A has n linearly independent columns,[...] More generally, the first k columns of Q form an orthonormal basis for the span of the first k columns of A for any 1 ≤ k ≤ n”. However, this is not generally true. It assumes that the first k columns of A are linearly independent. Shouldn't this be stated explicitly? Simonedl (talk) 02:54, 12 January 2024 (UTC)
thread_title:  Clarification needed on assumptions in ‘Cases and definitions’ Section