https://en.wikipedia.org/w/index.php?action=history&feed=atom&title=QR_algorithm QR algorithm - Revision history 2025-05-25T17:16:35Z Revision history for this page on the wiki MediaWiki 1.45.0-wmf.2 https://en.wikipedia.org/w/index.php?title=QR_algorithm&diff=1287127118&oldid=prev BattyBot: Fixed CS1 errors: extra text: edition and general fixes 2025-04-24T04:59:45Z <p>Fixed <a href="/wiki/Category:CS1_errors:_extra_text:_edition" title="Category:CS1 errors: extra text: edition">CS1 errors: extra text: edition</a> and <a href="/wiki/Wikipedia:AWB/GF" class="mw-redirect" title="Wikipedia:AWB/GF">general fixes</a></p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 04:59, 24 April 2025</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 10:</td> <td colspan="2" class="diff-lineno">Line 10:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Under certain conditions,&lt;ref name="golubvanloan"&gt;{{cite book |last1=Golub |first1=G. H. |last2=Van Loan |first2=C. F. |title=Matrix Computations |edition=3rd |publisher=Johns Hopkins University Press |location=Baltimore |year=1996 |isbn=0-8018-5414-8 }}&lt;/ref&gt; the matrices ''A''&lt;sub&gt;''k''&lt;/sub&gt; converge to a triangular matrix, the [[Schur form]] of ''A''. The eigenvalues of a triangular matrix are listed on the diagonal, and the eigenvalue problem is solved. In testing for convergence it is impractical to require exact zeros,{{citation needed|date=July 2020}} but the [[Gershgorin circle theorem]] provides a bound on the error.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Under certain conditions,&lt;ref name="golubvanloan"&gt;{{cite book |last1=Golub |first1=G. H. |last2=Van Loan |first2=C. F. |title=Matrix Computations |edition=3rd |publisher=Johns Hopkins University Press |location=Baltimore |year=1996 |isbn=0-8018-5414-8 }}&lt;/ref&gt; the matrices ''A''&lt;sub&gt;''k''&lt;/sub&gt; converge to a triangular matrix, the [[Schur form]] of ''A''. The eigenvalues of a triangular matrix are listed on the diagonal, and the eigenvalue problem is solved. In testing for convergence it is impractical to require exact zeros,{{citation needed|date=July 2020}} but the [[Gershgorin circle theorem]] provides a bound on the error.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>If the matrices converge, then the eigenvalues along the diagonal will appear according to their geometric multiplicity. To guarantee convergence, A must be a symmetric matrix, and for all non zero eigenvalues &lt;math&gt;\lambda&lt;/math&gt; there must not be a corresponding eigenvalue &lt;math&gt;-\lambda&lt;/math&gt;<del style="font-weight: bold; text-decoration: none;"> </del>&lt;ref&gt;{{Cite book |last=Holmes |first=Mark H. |title=Introduction to scientific computing and data analysis |date=2023 |publisher=Springer |isbn=978-3-031-22429-4 |edition=Second<del style="font-weight: bold; text-decoration: none;"> Edition</del> |series=Texts in computational science and engineering |location=Cham}}&lt;/ref&gt;<del style="font-weight: bold; text-decoration: none;">.</del> Due to the fact that a single QR iteration has a cost of &lt;math&gt;\mathcal{O}(n^3)&lt;/math&gt; and the convergence is linear, the standard QR algorithm is extremely expensive to compute, especially considering it is not guaranteed to converge<del style="font-weight: bold; text-decoration: none;"> </del>&lt;ref&gt;{{Cite book |last=Golub |first=Gene H. |title=Matrix computations |last2=Van Loan |first2=Charles F. |date=2013 |publisher=The Johns Hopkins University Press |isbn=978-1-4214-0794-4 |edition=Fourth<del style="font-weight: bold; text-decoration: none;"> edition</del> |series=Johns Hopkins studies in the mathematical sciences |location=Baltimore}}&lt;/ref&gt;<del style="font-weight: bold; text-decoration: none;">.</del></div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>If the matrices converge, then the eigenvalues along the diagonal will appear according to their geometric multiplicity. To guarantee convergence, A must be a symmetric matrix, and for all non zero eigenvalues &lt;math&gt;\lambda&lt;/math&gt; there must not be a corresponding eigenvalue &lt;math&gt;-\lambda&lt;/math&gt;<ins style="font-weight: bold; text-decoration: none;">.</ins>&lt;ref&gt;{{Cite book |last=Holmes |first=Mark H. |title=Introduction to scientific computing and data analysis |date=2023 |publisher=Springer |isbn=978-3-031-22429-4 |edition=Second |series=Texts in computational science and engineering |location=Cham}}&lt;/ref&gt; Due to the fact that a single QR iteration has a cost of &lt;math&gt;\mathcal{O}(n^3)&lt;/math&gt; and the convergence is linear, the standard QR algorithm is extremely expensive to compute, especially considering it is not guaranteed to converge<ins style="font-weight: bold; text-decoration: none;">.</ins>&lt;ref&gt;{{Cite book |last=Golub |first=Gene H. |title=Matrix computations |last2=Van Loan |first2=Charles F. |date=2013 |publisher=The Johns Hopkins University Press |isbn=978-1-4214-0794-4 |edition=Fourth |series=Johns Hopkins studies in the mathematical sciences |location=Baltimore}}&lt;/ref&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>===Using Hessenberg form===</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>===Using Hessenberg form===</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Line 26:</td> <td colspan="2" class="diff-lineno">Line 26:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Pick a shift &lt;math&gt;\mu&lt;/math&gt; and subtract it from all diagonal elements, producing the matrix &lt;math&gt; A - \mu I &lt;/math&gt;. A basic strategy is to use &lt;math&gt; \mu = a_{n,n} &lt;/math&gt;, but there are more refined strategies that would further accelerate convergence. The idea is that &lt;math&gt; \mu &lt;/math&gt; should be close to an eigenvalue, since making this shift will accelerate convergence to that eigenvalue.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Pick a shift &lt;math&gt;\mu&lt;/math&gt; and subtract it from all diagonal elements, producing the matrix &lt;math&gt; A - \mu I &lt;/math&gt;. A basic strategy is to use &lt;math&gt; \mu = a_{n,n} &lt;/math&gt;, but there are more refined strategies that would further accelerate convergence. The idea is that &lt;math&gt; \mu &lt;/math&gt; should be close to an eigenvalue, since making this shift will accelerate convergence to that eigenvalue.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Perform a sequence of [[Givens rotation]]s &lt;math&gt; G_1, G_2, \dots, G_{n-1} &lt;/math&gt; on &lt;math&gt; A - \mu I &lt;/math&gt;, where &lt;math&gt; G_i &lt;/math&gt; acts on rows &lt;math&gt;i&lt;/math&gt; and &lt;math&gt;i+1&lt;/math&gt;, and &lt;math&gt; G_i &lt;/math&gt; is chosen to zero out position &lt;math&gt;(i+1,i)&lt;/math&gt; of &lt;math&gt; G_{i-1} \dotsb G_1 (A - \mu I) &lt;/math&gt;. This produces the upper triangular matrix &lt;math&gt; R = G_{n-1} \dotsb G_1 (A - \mu I) &lt;/math&gt;. The orthogonal factor &lt;math&gt; Q &lt;/math&gt; would be &lt;math&gt; G_1^\mathrm{T} G_2^\mathrm{T} \dotsb G_{n-1}^\mathrm{T} &lt;/math&gt;, but it is neither necessary nor efficient to produce that explicitly.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Perform a sequence of [[Givens rotation]]s &lt;math&gt; G_1, G_2, \dots, G_{n-1} &lt;/math&gt; on &lt;math&gt; A - \mu I &lt;/math&gt;, where &lt;math&gt; G_i &lt;/math&gt; acts on rows &lt;math&gt;i&lt;/math&gt; and &lt;math&gt;i+1&lt;/math&gt;, and &lt;math&gt; G_i &lt;/math&gt; is chosen to zero out position &lt;math&gt;(i+1,i)&lt;/math&gt; of &lt;math&gt; G_{i-1} \dotsb G_1 (A - \mu I) &lt;/math&gt;. This produces the upper triangular matrix &lt;math&gt; R = G_{n-1} \dotsb G_1 (A - \mu I) &lt;/math&gt;. The orthogonal factor &lt;math&gt; Q &lt;/math&gt; would be &lt;math&gt; G_1^\mathrm{T} G_2^\mathrm{T} \dotsb G_{n-1}^\mathrm{T} &lt;/math&gt;, but it is neither necessary nor efficient to produce that explicitly.</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div># Now multiply &lt;math&gt; R &lt;/math&gt; by the Givens matrices &lt;math&gt; G_1^\mathrm{T} &lt;/math&gt;, &lt;math&gt; G_2^\mathrm{T} &lt;/math&gt;, <del style="font-weight: bold; text-decoration: none;">…</del>, &lt;math&gt; G_{n-1}^\mathrm{T} &lt;/math&gt; on the right, where &lt;math&gt; G_i^\mathrm{T} &lt;/math&gt; instead acts on columns &lt;math&gt;i&lt;/math&gt; and &lt;math&gt; i+1 &lt;/math&gt;. This produces the matrix &lt;math&gt; RQ = R G_1^\mathrm{T} G_2^\mathrm{T} \dotsb G_{n-1}^\mathrm{T} &lt;/math&gt;, which is again on Hessenberg form.</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div># Now multiply &lt;math&gt; R &lt;/math&gt; by the Givens matrices &lt;math&gt; G_1^\mathrm{T} &lt;/math&gt;, &lt;math&gt; G_2^\mathrm{T} &lt;/math&gt;, <ins style="font-weight: bold; text-decoration: none;">...</ins>, &lt;math&gt; G_{n-1}^\mathrm{T} &lt;/math&gt; on the right, where &lt;math&gt; G_i^\mathrm{T} &lt;/math&gt; instead acts on columns &lt;math&gt;i&lt;/math&gt; and &lt;math&gt; i+1 &lt;/math&gt;. This produces the matrix &lt;math&gt; RQ = R G_1^\mathrm{T} G_2^\mathrm{T} \dotsb G_{n-1}^\mathrm{T} &lt;/math&gt;, which is again on Hessenberg form.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Finally undo the shift by adding &lt;math&gt; \mu &lt;/math&gt; to all diagonal entries. The result is &lt;math&gt; A' = RQ + \mu I &lt;/math&gt;. Since &lt;math&gt;Q&lt;/math&gt; commutes with &lt;math&gt;I&lt;/math&gt;, we have that &lt;math&gt; A' = Q^\mathrm{T} (A-\mu I) Q + \mu I = Q^\mathrm{T} A Q &lt;/math&gt;.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Finally undo the shift by adding &lt;math&gt; \mu &lt;/math&gt; to all diagonal entries. The result is &lt;math&gt; A' = RQ + \mu I &lt;/math&gt;. Since &lt;math&gt;Q&lt;/math&gt; commutes with &lt;math&gt;I&lt;/math&gt;, we have that &lt;math&gt; A' = Q^\mathrm{T} (A-\mu I) Q + \mu I = Q^\mathrm{T} A Q &lt;/math&gt;.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The purpose of the shift is to change which Givens rotations are chosen.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The purpose of the shift is to change which Givens rotations are chosen.</div></td> </tr> </table> BattyBot https://en.wikipedia.org/w/index.php?title=QR_algorithm&diff=1287002267&oldid=prev Daurum: Added a paragraph explaining some properties of the convergence of the standard form of the QR algorithm 2025-04-23T11:07:53Z <p>Added a paragraph explaining some properties of the convergence of the standard form of the QR algorithm</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 11:07, 23 April 2025</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 9:</td> <td colspan="2" class="diff-lineno">Line 9:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Under certain conditions,&lt;ref name="golubvanloan"&gt;{{cite book |last1=Golub |first1=G. H. |last2=Van Loan |first2=C. F. |title=Matrix Computations |edition=3rd |publisher=Johns Hopkins University Press |location=Baltimore |year=1996 |isbn=0-8018-5414-8 }}&lt;/ref&gt; the matrices ''A''&lt;sub&gt;''k''&lt;/sub&gt; converge to a triangular matrix, the [[Schur form]] of ''A''. The eigenvalues of a triangular matrix are listed on the diagonal, and the eigenvalue problem is solved. In testing for convergence it is impractical to require exact zeros,{{citation needed|date=July 2020}} but the [[Gershgorin circle theorem]] provides a bound on the error.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Under certain conditions,&lt;ref name="golubvanloan"&gt;{{cite book |last1=Golub |first1=G. H. |last2=Van Loan |first2=C. F. |title=Matrix Computations |edition=3rd |publisher=Johns Hopkins University Press |location=Baltimore |year=1996 |isbn=0-8018-5414-8 }}&lt;/ref&gt; the matrices ''A''&lt;sub&gt;''k''&lt;/sub&gt; converge to a triangular matrix, the [[Schur form]] of ''A''. The eigenvalues of a triangular matrix are listed on the diagonal, and the eigenvalue problem is solved. In testing for convergence it is impractical to require exact zeros,{{citation needed|date=July 2020}} but the [[Gershgorin circle theorem]] provides a bound on the error.</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>If the matrices converge, then the eigenvalues along the diagonal will appear according to their geometric multiplicity. To guarantee convergence, A must be a symmetric matrix, and for all non zero eigenvalues &lt;math&gt;\lambda&lt;/math&gt; there must not be a corresponding eigenvalue &lt;math&gt;-\lambda&lt;/math&gt; &lt;ref&gt;{{Cite book |last=Holmes |first=Mark H. |title=Introduction to scientific computing and data analysis |date=2023 |publisher=Springer |isbn=978-3-031-22429-4 |edition=Second Edition |series=Texts in computational science and engineering |location=Cham}}&lt;/ref&gt;. Due to the fact that a single QR iteration has a cost of &lt;math&gt;\mathcal{O}(n^3)&lt;/math&gt; and the convergence is linear, the standard QR algorithm is extremely expensive to compute, especially considering it is not guaranteed to converge &lt;ref&gt;{{Cite book |last=Golub |first=Gene H. |title=Matrix computations |last2=Van Loan |first2=Charles F. |date=2013 |publisher=The Johns Hopkins University Press |isbn=978-1-4214-0794-4 |edition=Fourth edition |series=Johns Hopkins studies in the mathematical sciences |location=Baltimore}}&lt;/ref&gt;.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>===Using Hessenberg form===</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>===Using Hessenberg form===</div></td> </tr> </table> Daurum https://en.wikipedia.org/w/index.php?title=QR_algorithm&diff=1286344540&oldid=prev Ophyrius: Reverted 1 edit by 210.212.2.165 (talk) to last revision by Ererer333 2025-04-19T08:42:10Z <p>Reverted 1 edit by <a href="/wiki/Special:Contributions/210.212.2.165" title="Special:Contributions/210.212.2.165">210.212.2.165</a> (<a href="/wiki/User_talk:210.212.2.165" title="User talk:210.212.2.165">talk</a>) to last revision by Ererer333</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 08:42, 19 April 2025</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 129:</td> <td colspan="2" class="diff-lineno">Line 129:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>===Renaming proposal===</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>===Renaming proposal===</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Since in the modern implicit version of the procedure no [[QR decomposition]]s are explicitly performed, some authors, for instance Watkins,&lt;ref&gt;{{cite book |last=Watkins |first=David S. |title=The Matrix Eigenvalue Problem: GR and Krylov Subspace Methods |publisher=SIAM |location=Philadelphia, PA |year=2007 |isbn=978-0-89871-641-2 }}&lt;/ref&gt; suggested changing its name to ''Francis <del style="font-weight: bold; text-decoration: none;">algorithmhe</del> term ''Francis QR step''.</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Since in the modern implicit version of the procedure no [[QR decomposition]]s are explicitly performed, some authors, for instance Watkins,&lt;ref&gt;{{cite book |last=Watkins |first=David S. |title=The Matrix Eigenvalue Problem: GR and Krylov Subspace Methods |publisher=SIAM |location=Philadelphia, PA |year=2007 |isbn=978-0-89871-641-2 }}&lt;/ref&gt; suggested changing its name to ''Francis <ins style="font-weight: bold; text-decoration: none;">algorithm''. [[Gene H. Golub|Golub]] and [[Charles F. Van Loan|Van Loan]] use the</ins> term ''Francis QR step''.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Interpretation and convergence ==</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Interpretation and convergence ==</div></td> </tr> </table> Ophyrius https://en.wikipedia.org/w/index.php?title=QR_algorithm&diff=1286342905&oldid=prev 210.212.2.165: /* The implicit QR algorithm */ 2025-04-19T08:25:46Z <p><span class="autocomment">The implicit QR algorithm</span></p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 08:25, 19 April 2025</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 129:</td> <td colspan="2" class="diff-lineno">Line 129:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>===Renaming proposal===</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>===Renaming proposal===</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Since in the modern implicit version of the procedure no [[QR decomposition]]s are explicitly performed, some authors, for instance Watkins,&lt;ref&gt;{{cite book |last=Watkins |first=David S. |title=The Matrix Eigenvalue Problem: GR and Krylov Subspace Methods |publisher=SIAM |location=Philadelphia, PA |year=2007 |isbn=978-0-89871-641-2 }}&lt;/ref&gt; suggested changing its name to ''Francis <del style="font-weight: bold; text-decoration: none;">algorithm''. [[Gene H. Golub|Golub]] and [[Charles F. Van Loan|Van Loan]] use the</del> term ''Francis QR step''.</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Since in the modern implicit version of the procedure no [[QR decomposition]]s are explicitly performed, some authors, for instance Watkins,&lt;ref&gt;{{cite book |last=Watkins |first=David S. |title=The Matrix Eigenvalue Problem: GR and Krylov Subspace Methods |publisher=SIAM |location=Philadelphia, PA |year=2007 |isbn=978-0-89871-641-2 }}&lt;/ref&gt; suggested changing its name to ''Francis <ins style="font-weight: bold; text-decoration: none;">algorithmhe</ins> term ''Francis QR step''.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Interpretation and convergence ==</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Interpretation and convergence ==</div></td> </tr> </table> 210.212.2.165 https://en.wikipedia.org/w/index.php?title=QR_algorithm&diff=1274608839&oldid=prev Ererer333: /* growthexperiments-addlink-summary-summary:3|0|0 */ 2025-02-08T09:43:39Z <p>Link suggestions feature: 3 links added.</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 09:43, 8 February 2025</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 18:</td> <td colspan="2" class="diff-lineno">Line 18:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>If a Hessenberg matrix &lt;math&gt;A&lt;/math&gt; has element &lt;math&gt; a_{k,k-1} = 0 &lt;/math&gt; for some &lt;math&gt;k&lt;/math&gt;, i.e., if one of the elements just below the diagonal is in fact zero, then it decomposes into blocks whose eigenproblems may be solved separately; an eigenvalue is either an eigenvalue of the submatrix of the first &lt;math&gt;k-1&lt;/math&gt; rows and columns, or an eigenvalue of the submatrix of remaining rows and columns. The purpose of the QR iteration step is to shrink one of these &lt;math&gt;a_{k,k-1}&lt;/math&gt; elements so that effectively a small block along the diagonal is split off from the bulk of the matrix. In the case of a real eigenvalue that is usually the &lt;math&gt; 1 \times 1 &lt;/math&gt; block in the lower right corner (in which case element &lt;math&gt; a_{nn} &lt;/math&gt; holds that eigenvalue), whereas in the case of a pair of conjugate complex eigenvalues it is the &lt;math&gt; 2 \times 2 &lt;/math&gt; block in the lower right corner.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>If a Hessenberg matrix &lt;math&gt;A&lt;/math&gt; has element &lt;math&gt; a_{k,k-1} = 0 &lt;/math&gt; for some &lt;math&gt;k&lt;/math&gt;, i.e., if one of the elements just below the diagonal is in fact zero, then it decomposes into blocks whose eigenproblems may be solved separately; an eigenvalue is either an eigenvalue of the submatrix of the first &lt;math&gt;k-1&lt;/math&gt; rows and columns, or an eigenvalue of the submatrix of remaining rows and columns. The purpose of the QR iteration step is to shrink one of these &lt;math&gt;a_{k,k-1}&lt;/math&gt; elements so that effectively a small block along the diagonal is split off from the bulk of the matrix. In the case of a real eigenvalue that is usually the &lt;math&gt; 1 \times 1 &lt;/math&gt; block in the lower right corner (in which case element &lt;math&gt; a_{nn} &lt;/math&gt; holds that eigenvalue), whereas in the case of a pair of conjugate complex eigenvalues it is the &lt;math&gt; 2 \times 2 &lt;/math&gt; block in the lower right corner.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>The rate of convergence depends on the separation between eigenvalues, so a practical algorithm will use shifts, either explicit or implicit, to increase separation and accelerate convergence. A typical symmetric QR algorithm isolates each eigenvalue (then reduces the size of the matrix) with only one or two iterations, making it efficient as well as robust.{{clarify|date=June 2012}}</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The <ins style="font-weight: bold; text-decoration: none;">[[</ins>rate of convergence<ins style="font-weight: bold; text-decoration: none;">]]</ins> depends on the separation between eigenvalues, so a practical algorithm will use shifts, either explicit or implicit, to increase separation and accelerate convergence. A typical symmetric QR algorithm isolates each eigenvalue (then reduces the size of the matrix) with only one or two iterations, making it efficient as well as robust.{{clarify|date=June 2012}}</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>====A single iteration with explicit shift====</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>====A single iteration with explicit shift====</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Line 132:</td> <td colspan="2" class="diff-lineno">Line 132:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Interpretation and convergence ==</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Interpretation and convergence ==</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>The QR algorithm can be seen as a more sophisticated variation of the basic [[Power iteration|"power" eigenvalue algorithm]]. Recall that the power algorithm repeatedly multiplies ''A'' times a single vector, normalizing after each iteration. The vector converges to an eigenvector of the largest eigenvalue. Instead, the QR algorithm works with a complete basis of vectors, using QR decomposition to renormalize (and orthogonalize). For a symmetric matrix ''A'', upon convergence, ''AQ'' = ''Q&amp;Lambda;'', where ''&amp;Lambda;'' is the diagonal matrix of eigenvalues to which ''A'' converged, and where ''Q'' is a composite of all the orthogonal similarity transforms required to get there. Thus the columns of ''Q'' are the eigenvectors.</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The QR algorithm can be seen as a more sophisticated variation of the basic [[Power iteration|"power" eigenvalue algorithm]]. Recall that the power algorithm repeatedly multiplies ''A'' times a single vector, normalizing after each iteration. The vector converges to an eigenvector of the largest eigenvalue. Instead, the QR algorithm works with a complete basis of vectors, using QR decomposition to renormalize (and orthogonalize). For a symmetric matrix ''A'', upon convergence, ''AQ'' = ''Q&amp;Lambda;'', where ''&amp;Lambda;'' is the <ins style="font-weight: bold; text-decoration: none;">[[</ins>diagonal matrix<ins style="font-weight: bold; text-decoration: none;">]]</ins> of eigenvalues to which ''A'' converged, and where ''Q'' is a composite of all the orthogonal similarity transforms required to get there. Thus the columns of ''Q'' are the eigenvectors.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== History ==</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== History ==</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Line 140:</td> <td colspan="2" class="diff-lineno">Line 140:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Other variants ==</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Other variants ==</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>One variant of the ''QR algorithm'', ''the Golub-Kahan-Reinsch'' algorithm starts with reducing a general matrix into a bidiagonal one.&lt;ref&gt;Bochkanov Sergey Anatolyevich. ALGLIB User Guide - General Matrix operations - Singular value decomposition . ALGLIB Project. 2010-12-11. URL:[http://www.alglib.net/matrixops/general/svd.php] Accessed: 2010-12-11. (Archived by WebCite at https://www.webcitation.org/5utO4iSnR?url=http://www.alglib.net/matrixops/general/svd.php&lt;/ref&gt; This variant of the ''QR algorithm'' for the computation of [[singular values]] was first described by {{harvtxt|Golub|Kahan|1965}}. The [[LAPACK]] subroutine [http://www.netlib.org/lapack/double/dbdsqr.f DBDSQR] implements this iterative method, with some modifications to cover the case where the singular values are very small {{harv|Demmel|Kahan|1990}}. Together with a first step using Householder reflections and, if appropriate, [[QR decomposition]], this forms the [http://www.netlib.org/lapack/double/dgesvd.f DGESVD] routine for the computation of the [[singular value decomposition]]. The QR algorithm can also be implemented in infinite dimensions with corresponding convergence results.&lt;ref&gt;{{cite journal |first1=Percy |last1=Deift |first2=Luenchau C. |last2=Li |first3=Carlos |last3=Tomei|title=Toda flows with infinitely many variables |journal=Journal of Functional Analysis |volume=64 | number=3| pages=358–402 |year=1985 |doi=10.1016/0022-1236(85)90065-5|doi-access=free }}&lt;/ref&gt;&lt;ref&gt;{{cite journal |first1=Matthew J. |last1=Colbrook |first2=Anders C.|last2=Hansen|title=On the infinite-dimensional QR algorithm |journal=Numerische Mathematik |volume=143 | number=1| pages=17–83 |year=2019 |doi=10.1007/s00211-019-01047-5|arxiv=2011.08172|doi-access=free }}&lt;/ref&gt;</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>One variant of the ''QR algorithm'', ''the Golub-Kahan-Reinsch'' algorithm starts with reducing a general matrix into a bidiagonal one.&lt;ref&gt;Bochkanov Sergey Anatolyevich. ALGLIB User Guide - General Matrix operations - Singular value decomposition . ALGLIB Project. 2010-12-11. URL:[http://www.alglib.net/matrixops/general/svd.php] Accessed: 2010-12-11. (Archived by WebCite at https://www.webcitation.org/5utO4iSnR?url=http://www.alglib.net/matrixops/general/svd.php&lt;/ref&gt; This variant of the ''QR algorithm'' for the computation of [[singular values]] was first described by {{harvtxt|Golub|Kahan|1965}}. The [[LAPACK]] subroutine [http://www.netlib.org/lapack/double/dbdsqr.f DBDSQR] implements this <ins style="font-weight: bold; text-decoration: none;">[[</ins>iterative method<ins style="font-weight: bold; text-decoration: none;">]]</ins>, with some modifications to cover the case where the singular values are very small {{harv|Demmel|Kahan|1990}}. Together with a first step using Householder reflections and, if appropriate, [[QR decomposition]], this forms the [http://www.netlib.org/lapack/double/dgesvd.f DGESVD] routine for the computation of the [[singular value decomposition]]. The QR algorithm can also be implemented in infinite dimensions with corresponding convergence results.&lt;ref&gt;{{cite journal |first1=Percy |last1=Deift |first2=Luenchau C. |last2=Li |first3=Carlos |last3=Tomei|title=Toda flows with infinitely many variables |journal=Journal of Functional Analysis |volume=64 | number=3| pages=358–402 |year=1985 |doi=10.1016/0022-1236(85)90065-5|doi-access=free }}&lt;/ref&gt;&lt;ref&gt;{{cite journal |first1=Matthew J. |last1=Colbrook |first2=Anders C.|last2=Hansen|title=On the infinite-dimensional QR algorithm |journal=Numerische Mathematik |volume=143 | number=1| pages=17–83 |year=2019 |doi=10.1007/s00211-019-01047-5|arxiv=2011.08172|doi-access=free }}&lt;/ref&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== References ==</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== References ==</div></td> </tr> </table> Ererer333 https://en.wikipedia.org/w/index.php?title=QR_algorithm&diff=1260758881&oldid=prev Arjayay: Duplicate word reworded 2024-12-02T13:55:46Z <p>Duplicate word reworded</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 13:55, 2 December 2024</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 37:</td> <td colspan="2" class="diff-lineno">Line 37:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> \end{bmatrix}</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> \end{bmatrix}</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>&lt;/math&gt;</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>&lt;/math&gt;</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>where the &lt;math&gt;I&lt;/math&gt; in the upper left corner is an &lt;math&gt; (n-1) \times (n-1) &lt;/math&gt; identity matrix, and the two scalars &lt;math&gt; c = \cos\theta &lt;/math&gt; and &lt;math&gt; s = \sin\theta &lt;/math&gt; are determined by what rotation angle &lt;math&gt; \theta &lt;/math&gt; is appropriate for zeroing out position &lt;math&gt;(i+1,i)&lt;/math&gt;. It is not necessary to exhibit &lt;math&gt; \theta &lt;/math&gt;; the factors &lt;math&gt; c &lt;/math&gt; and &lt;math&gt; s &lt;/math&gt; can be determined directly from elements in the matrix &lt;math&gt; G_i &lt;/math&gt; should act on. Nor is it necessary to produce the whole matrix; multiplication (from the left) by &lt;math&gt; G_i &lt;/math&gt; only affects rows &lt;math&gt; i &lt;/math&gt; and &lt;math&gt; i+1 &lt;/math&gt;, so it <del style="font-weight: bold; text-decoration: none;">it</del> easier to just update those two rows in place. Likewise, for the Step 3 multiplication by &lt;math&gt; G_i^\mathrm{T} &lt;/math&gt; from the right, it is sufficient to remember &lt;math&gt;i&lt;/math&gt;, &lt;math&gt;c&lt;/math&gt;, and &lt;math&gt;s&lt;/math&gt;.</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>where the &lt;math&gt;I&lt;/math&gt; in the upper left corner is an &lt;math&gt; (n-1) \times (n-1) &lt;/math&gt; identity matrix, and the two scalars &lt;math&gt; c = \cos\theta &lt;/math&gt; and &lt;math&gt; s = \sin\theta &lt;/math&gt; are determined by what rotation angle &lt;math&gt; \theta &lt;/math&gt; is appropriate for zeroing out position &lt;math&gt;(i+1,i)&lt;/math&gt;. It is not necessary to exhibit &lt;math&gt; \theta &lt;/math&gt;; the factors &lt;math&gt; c &lt;/math&gt; and &lt;math&gt; s &lt;/math&gt; can be determined directly from elements in the matrix &lt;math&gt; G_i &lt;/math&gt; should act on. Nor is it necessary to produce the whole matrix; multiplication (from the left) by &lt;math&gt; G_i &lt;/math&gt; only affects rows &lt;math&gt; i &lt;/math&gt; and &lt;math&gt; i+1 &lt;/math&gt;, so it <ins style="font-weight: bold; text-decoration: none;">is</ins> easier to just update those two rows in place. Likewise, for the Step 3 multiplication by &lt;math&gt; G_i^\mathrm{T} &lt;/math&gt; from the right, it is sufficient to remember &lt;math&gt;i&lt;/math&gt;, &lt;math&gt;c&lt;/math&gt;, and &lt;math&gt;s&lt;/math&gt;.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>If using the simple &lt;math&gt; \mu = a_{n,n} &lt;/math&gt; strategy, then at the beginning of Step 2 we have a matrix</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>If using the simple &lt;math&gt; \mu = a_{n,n} &lt;/math&gt; strategy, then at the beginning of Step 2 we have a matrix</div></td> </tr> </table> Arjayay https://en.wikipedia.org/w/index.php?title=QR_algorithm&diff=1260742432&oldid=prev 37.198.120.181: /* A single iteration with explicit shift */ Typo. 2024-12-02T10:55:01Z <p><span class="autocomment">A single iteration with explicit shift: </span> Typo.</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 10:55, 2 December 2024</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 99:</td> <td colspan="2" class="diff-lineno">Line 99:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> \times &amp; \times &amp; \times &amp; \times &amp; \times \\</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> \times &amp; \times &amp; \times &amp; \times &amp; \times \\</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; \times &amp; \times &amp; \times &amp; \times \\</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; \times &amp; \times &amp; \times &amp; \times \\</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; 0 &amp; \times &amp; \times &amp; <del style="font-weight: bold; text-decoration: none;">c h_{n-1,n}</del> \\</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; 0 &amp; \times &amp; \times &amp; <ins style="font-weight: bold; text-decoration: none;">\times</ins> \\</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; 0 &amp; 0 &amp; -s^2 h_{n-1,n} &amp; cs h_{n-1,n}</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; 0 &amp; 0 &amp; -s^2 h_{n-1,n} &amp; cs h_{n-1,n}</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> \end{pmatrix}</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> \end{pmatrix}</div></td> </tr> </table> 37.198.120.181 https://en.wikipedia.org/w/index.php?title=QR_algorithm&diff=1260742165&oldid=prev 37.198.120.181: /* A single iteration with explicit shift */ Showing how steps affect the matrix form. 2024-12-02T10:52:38Z <p><span class="autocomment">A single iteration with explicit shift: </span> Showing how steps affect the matrix form.</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 10:52, 2 December 2024</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 21:</td> <td colspan="2" class="diff-lineno">Line 21:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>====A single iteration with explicit shift====</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>====A single iteration with explicit shift====</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>The steps of a QR iteration on a real Hessenberg matrix &lt;math&gt;A&lt;/math&gt;<del style="font-weight: bold; text-decoration: none;"> with explicit shift</del> are:</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The steps of a QR iteration<ins style="font-weight: bold; text-decoration: none;"> with explicit shift</ins> on a real Hessenberg matrix &lt;math&gt;A&lt;/math&gt; are:</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Pick a shift &lt;math&gt;\mu&lt;/math&gt; and subtract it from all diagonal elements, producing the matrix &lt;math&gt; A - \mu I &lt;/math&gt;. A basic strategy is to use &lt;math&gt; \mu = a_{n,n} &lt;/math&gt;, but there are more refined strategies that would further accelerate convergence. The idea is that &lt;math&gt; \mu &lt;/math&gt; should be close to an eigenvalue, since making this shift will accelerate convergence to that eigenvalue.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Pick a shift &lt;math&gt;\mu&lt;/math&gt; and subtract it from all diagonal elements, producing the matrix &lt;math&gt; A - \mu I &lt;/math&gt;. A basic strategy is to use &lt;math&gt; \mu = a_{n,n} &lt;/math&gt;, but there are more refined strategies that would further accelerate convergence. The idea is that &lt;math&gt; \mu &lt;/math&gt; should be close to an eigenvalue, since making this shift will accelerate convergence to that eigenvalue.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Perform a sequence of [[Givens rotation]]s &lt;math&gt; G_1, G_2, \dots, G_{n-1} &lt;/math&gt; on &lt;math&gt; A - \mu I &lt;/math&gt;, where &lt;math&gt; G_i &lt;/math&gt; acts on rows &lt;math&gt;i&lt;/math&gt; and &lt;math&gt;i+1&lt;/math&gt;, and &lt;math&gt; G_i &lt;/math&gt; is chosen to zero out position &lt;math&gt;(i+1,i)&lt;/math&gt; of &lt;math&gt; G_{i-1} \dotsb G_1 (A - \mu I) &lt;/math&gt;. This produces the upper triangular matrix &lt;math&gt; R = G_{n-1} \dotsb G_1 (A - \mu I) &lt;/math&gt;. The orthogonal factor &lt;math&gt; Q &lt;/math&gt; would be &lt;math&gt; G_1^\mathrm{T} G_2^\mathrm{T} \dotsb G_{n-1}^\mathrm{T} &lt;/math&gt;, but it is neither necessary nor efficient to produce that explicitly.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Perform a sequence of [[Givens rotation]]s &lt;math&gt; G_1, G_2, \dots, G_{n-1} &lt;/math&gt; on &lt;math&gt; A - \mu I &lt;/math&gt;, where &lt;math&gt; G_i &lt;/math&gt; acts on rows &lt;math&gt;i&lt;/math&gt; and &lt;math&gt;i+1&lt;/math&gt;, and &lt;math&gt; G_i &lt;/math&gt; is chosen to zero out position &lt;math&gt;(i+1,i)&lt;/math&gt; of &lt;math&gt; G_{i-1} \dotsb G_1 (A - \mu I) &lt;/math&gt;. This produces the upper triangular matrix &lt;math&gt; R = G_{n-1} \dotsb G_1 (A - \mu I) &lt;/math&gt;. The orthogonal factor &lt;math&gt; Q &lt;/math&gt; would be &lt;math&gt; G_1^\mathrm{T} G_2^\mathrm{T} \dotsb G_{n-1}^\mathrm{T} &lt;/math&gt;, but it is neither necessary nor efficient to produce that explicitly.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Now multiply &lt;math&gt; R &lt;/math&gt; by the Givens matrices &lt;math&gt; G_1^\mathrm{T} &lt;/math&gt;, &lt;math&gt; G_2^\mathrm{T} &lt;/math&gt;, …, &lt;math&gt; G_{n-1}^\mathrm{T} &lt;/math&gt; on the right, where &lt;math&gt; G_i^\mathrm{T} &lt;/math&gt; instead acts on columns &lt;math&gt;i&lt;/math&gt; and &lt;math&gt; i+1 &lt;/math&gt;. This produces the matrix &lt;math&gt; RQ = R G_1^\mathrm{T} G_2^\mathrm{T} \dotsb G_{n-1}^\mathrm{T} &lt;/math&gt;, which is again on Hessenberg form.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Now multiply &lt;math&gt; R &lt;/math&gt; by the Givens matrices &lt;math&gt; G_1^\mathrm{T} &lt;/math&gt;, &lt;math&gt; G_2^\mathrm{T} &lt;/math&gt;, …, &lt;math&gt; G_{n-1}^\mathrm{T} &lt;/math&gt; on the right, where &lt;math&gt; G_i^\mathrm{T} &lt;/math&gt; instead acts on columns &lt;math&gt;i&lt;/math&gt; and &lt;math&gt; i+1 &lt;/math&gt;. This produces the matrix &lt;math&gt; RQ = R G_1^\mathrm{T} G_2^\mathrm{T} \dotsb G_{n-1}^\mathrm{T} &lt;/math&gt;, which is again on Hessenberg form.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Finally undo the shift by adding &lt;math&gt; \mu &lt;/math&gt; to all diagonal entries. The result is &lt;math&gt; A' = RQ + \mu I &lt;/math&gt;. Since &lt;math&gt;Q&lt;/math&gt; commutes with &lt;math&gt;I&lt;/math&gt;, we have that &lt;math&gt; A' = Q^\mathrm{T} (A-\mu I) Q + \mu I = Q^\mathrm{T} A Q &lt;/math&gt;.</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div># Finally undo the shift by adding &lt;math&gt; \mu &lt;/math&gt; to all diagonal entries. The result is &lt;math&gt; A' = RQ + \mu I &lt;/math&gt;. Since &lt;math&gt;Q&lt;/math&gt; commutes with &lt;math&gt;I&lt;/math&gt;, we have that &lt;math&gt; A' = Q^\mathrm{T} (A-\mu I) Q + \mu I = Q^\mathrm{T} A Q &lt;/math&gt;.</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The purpose of the shift is to change which Givens rotations are chosen.</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>In more detail, the structure of one of these &lt;math&gt; G_i &lt;/math&gt; matrices are</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>&lt;math display="block"&gt;</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> G_i = \begin{bmatrix}</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> I &amp; 0 &amp; 0 &amp; 0 \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; c &amp; -s &amp; 0 \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; s &amp; c &amp; 0 \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; 0 &amp; 0 &amp; I</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> \end{bmatrix}</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>&lt;/math&gt;</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>where the &lt;math&gt;I&lt;/math&gt; in the upper left corner is an &lt;math&gt; (n-1) \times (n-1) &lt;/math&gt; identity matrix, and the two scalars &lt;math&gt; c = \cos\theta &lt;/math&gt; and &lt;math&gt; s = \sin\theta &lt;/math&gt; are determined by what rotation angle &lt;math&gt; \theta &lt;/math&gt; is appropriate for zeroing out position &lt;math&gt;(i+1,i)&lt;/math&gt;. It is not necessary to exhibit &lt;math&gt; \theta &lt;/math&gt;; the factors &lt;math&gt; c &lt;/math&gt; and &lt;math&gt; s &lt;/math&gt; can be determined directly from elements in the matrix &lt;math&gt; G_i &lt;/math&gt; should act on. Nor is it necessary to produce the whole matrix; multiplication (from the left) by &lt;math&gt; G_i &lt;/math&gt; only affects rows &lt;math&gt; i &lt;/math&gt; and &lt;math&gt; i+1 &lt;/math&gt;, so it it easier to just update those two rows in place. Likewise, for the Step 3 multiplication by &lt;math&gt; G_i^\mathrm{T} &lt;/math&gt; from the right, it is sufficient to remember &lt;math&gt;i&lt;/math&gt;, &lt;math&gt;c&lt;/math&gt;, and &lt;math&gt;s&lt;/math&gt;.</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>If using the simple &lt;math&gt; \mu = a_{n,n} &lt;/math&gt; strategy, then at the beginning of Step 2 we have a matrix</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>&lt;math display="block"&gt;</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> A - a_{n,n} I = \begin{pmatrix}</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> \times &amp; \times &amp; \times &amp; \times &amp; \times \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> \times &amp; \times &amp; \times &amp; \times &amp; \times \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; \times &amp; \times &amp; \times &amp; \times \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; 0 &amp; \times &amp; \times &amp; \times \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; 0 &amp; 0 &amp; \times &amp; 0</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> \end{pmatrix}</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>&lt;/math&gt;</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>where the &lt;math&gt;\times&lt;/math&gt; denotes “could be whatever”. The first Givens rotation &lt;math&gt; G_1 &lt;/math&gt; zeroes out the &lt;math&gt; (i+1,i) &lt;/math&gt; position of this, producing</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>&lt;math display="block"&gt;</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> G_1 (A - a_{n,n} I) = \begin{pmatrix}</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> \times &amp; \times &amp; \times &amp; \times &amp; \times \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; \times &amp; \times &amp; \times &amp; \times \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; \times &amp; \times &amp; \times &amp; \times \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; 0 &amp; \times &amp; \times &amp; \times \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; 0 &amp; 0 &amp; \times &amp; 0</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> \end{pmatrix}</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> \text{.}</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>&lt;/math&gt;</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Each new rotation zeroes out another subdiagonal element, thus increasing the number of known zeroes until we are at</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>&lt;math display="block"&gt;</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> H = G_{n-2} \dotsb G_1 (A - a_{n,n} I) = \begin{pmatrix}</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> \times &amp; \times &amp; \times &amp; \times &amp; \times \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; \times &amp; \times &amp; \times &amp; \times \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; 0 &amp; \times &amp; \times &amp; \times \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; 0 &amp; 0 &amp; h_{n-1,n-1} &amp; h_{n-1,n} \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; 0 &amp; 0 &amp; h_{n,n-1} &amp; 0</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> \end{pmatrix}</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> \text{.}</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>&lt;/math&gt;</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The final rotation &lt;math&gt;G_{n-1}&lt;/math&gt; has &lt;math&gt;(c,s)&lt;/math&gt; chosen so that &lt;math&gt; s h_{n-1,n-1} + c h_{n,n-1} = 0 &lt;/math&gt;. If &lt;math&gt; |h_{n-1,n-1}| \gg |h_{n,n-1}| &lt;/math&gt;, as is typically the case when we approach convergence, then &lt;math&gt; c \approx 1 &lt;/math&gt; and &lt;math&gt; |s| \ll 1 &lt;/math&gt;. Making this rotation produces</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>&lt;math display="block"&gt;</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> R = G_{n-1} G_{n-2} \dotsb G_1 (A - a_{n,n} I) = \begin{pmatrix}</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> \times &amp; \times &amp; \times &amp; \times &amp; \times \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; \times &amp; \times &amp; \times &amp; \times \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; 0 &amp; \times &amp; \times &amp; \times \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; 0 &amp; 0 &amp; \times &amp; c h_{n-1,n} \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; 0 &amp; 0 &amp; 0 &amp; s h_{n-1,n}</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> \end{pmatrix}</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> \text{,}</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>&lt;/math&gt;</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>which is our upper triangular matrix. But now we reach Step 3, and need to start rotating data between columns. The first rotation acts on columns &lt;math&gt;1&lt;/math&gt; and &lt;math&gt;2&lt;/math&gt;, producing</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>&lt;math display="block"&gt;</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> R G_1^\mathrm{T} = \begin{pmatrix}</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> \times &amp; \times &amp; \times &amp; \times &amp; \times \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> \times &amp; \times &amp; \times &amp; \times &amp; \times \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; 0 &amp; \times &amp; \times &amp; \times \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; 0 &amp; 0 &amp; \times &amp; c h_{n-1,n} \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; 0 &amp; 0 &amp; 0 &amp; s h_{n-1,n}</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> \end{pmatrix}</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> \text{.}</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>&lt;/math&gt;</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The expected pattern is that each rotation moves some nonzero value from the diagonal out to the subdiagonal, returning the matrix to Hessenberg form. This ends at</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>&lt;math display="block"&gt;</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> R G_1^\mathrm{T} \dotsb G_{n-1}^\mathrm{T} = \begin{pmatrix}</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> \times &amp; \times &amp; \times &amp; \times &amp; \times \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> \times &amp; \times &amp; \times &amp; \times &amp; \times \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; \times &amp; \times &amp; \times &amp; \times \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; 0 &amp; \times &amp; \times &amp; c h_{n-1,n} \\</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 0 &amp; 0 &amp; 0 &amp; -s^2 h_{n-1,n} &amp; cs h_{n-1,n}</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> \end{pmatrix}</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> \text{.}</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>&lt;/math&gt;</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Algebraically the form is unchanged, but numerically the element in position &lt;math&gt; (n,n-1) &lt;/math&gt; has gotten a lot closer to zero: there used to be a factor &lt;math&gt; s &lt;/math&gt; gap between it and the diagonal element above, but now the gap is more like a factor &lt;math&gt; s^2 &lt;/math&gt;, and another iteration would make it factor &lt;math&gt; s^4 &lt;/math&gt;; we have quadratic convergence. Practically that means &lt;math&gt;O(1)&lt;/math&gt; iterations per eigenvalue suffice for convergence, and thus overall we can complete in &lt;math&gt; O(n) &lt;/math&gt; QR steps, each of which does a mere &lt;math&gt; O(n^2) &lt;/math&gt; arithmetic operations (or as little as &lt;math&gt; O(n) &lt;/math&gt; operations, in the case that &lt;math&gt; A &lt;/math&gt; is symmetric).</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Visualization ==</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Visualization ==</div></td> </tr> </table> 37.198.120.181 https://en.wikipedia.org/w/index.php?title=QR_algorithm&diff=1260729830&oldid=prev 37.198.120.181: /* Iteration phase */ New subsection "A single iteration with explicit shift" 2024-12-02T08:33:28Z <p><span class="autocomment">Iteration phase: </span> New subsection &quot;A single iteration with explicit shift&quot;</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 08:33, 2 December 2024</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 19:</td> <td colspan="2" class="diff-lineno">Line 19:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The rate of convergence depends on the separation between eigenvalues, so a practical algorithm will use shifts, either explicit or implicit, to increase separation and accelerate convergence. A typical symmetric QR algorithm isolates each eigenvalue (then reduces the size of the matrix) with only one or two iterations, making it efficient as well as robust.{{clarify|date=June 2012}}</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The rate of convergence depends on the separation between eigenvalues, so a practical algorithm will use shifts, either explicit or implicit, to increase separation and accelerate convergence. A typical symmetric QR algorithm isolates each eigenvalue (then reduces the size of the matrix) with only one or two iterations, making it efficient as well as robust.{{clarify|date=June 2012}}</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>====A single iteration with explicit shift====</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The steps of a QR iteration on a real Hessenberg matrix &lt;math&gt;A&lt;/math&gt; with explicit shift are:</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div># Pick a shift &lt;math&gt;\mu&lt;/math&gt; and subtract it from all diagonal elements, producing the matrix &lt;math&gt; A - \mu I &lt;/math&gt;. A basic strategy is to use &lt;math&gt; \mu = a_{n,n} &lt;/math&gt;, but there are more refined strategies that would further accelerate convergence. The idea is that &lt;math&gt; \mu &lt;/math&gt; should be close to an eigenvalue, since making this shift will accelerate convergence to that eigenvalue.</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div># Perform a sequence of [[Givens rotation]]s &lt;math&gt; G_1, G_2, \dots, G_{n-1} &lt;/math&gt; on &lt;math&gt; A - \mu I &lt;/math&gt;, where &lt;math&gt; G_i &lt;/math&gt; acts on rows &lt;math&gt;i&lt;/math&gt; and &lt;math&gt;i+1&lt;/math&gt;, and &lt;math&gt; G_i &lt;/math&gt; is chosen to zero out position &lt;math&gt;(i+1,i)&lt;/math&gt; of &lt;math&gt; G_{i-1} \dotsb G_1 (A - \mu I) &lt;/math&gt;. This produces the upper triangular matrix &lt;math&gt; R = G_{n-1} \dotsb G_1 (A - \mu I) &lt;/math&gt;. The orthogonal factor &lt;math&gt; Q &lt;/math&gt; would be &lt;math&gt; G_1^\mathrm{T} G_2^\mathrm{T} \dotsb G_{n-1}^\mathrm{T} &lt;/math&gt;, but it is neither necessary nor efficient to produce that explicitly.</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div># Now multiply &lt;math&gt; R &lt;/math&gt; by the Givens matrices &lt;math&gt; G_1^\mathrm{T} &lt;/math&gt;, &lt;math&gt; G_2^\mathrm{T} &lt;/math&gt;, …, &lt;math&gt; G_{n-1}^\mathrm{T} &lt;/math&gt; on the right, where &lt;math&gt; G_i^\mathrm{T} &lt;/math&gt; instead acts on columns &lt;math&gt;i&lt;/math&gt; and &lt;math&gt; i+1 &lt;/math&gt;. This produces the matrix &lt;math&gt; RQ = R G_1^\mathrm{T} G_2^\mathrm{T} \dotsb G_{n-1}^\mathrm{T} &lt;/math&gt;, which is again on Hessenberg form.</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div># Finally undo the shift by adding &lt;math&gt; \mu &lt;/math&gt; to all diagonal entries. The result is &lt;math&gt; A' = RQ + \mu I &lt;/math&gt;. Since &lt;math&gt;Q&lt;/math&gt; commutes with &lt;math&gt;I&lt;/math&gt;, we have that &lt;math&gt; A' = Q^\mathrm{T} (A-\mu I) Q + \mu I = Q^\mathrm{T} A Q &lt;/math&gt;.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Visualization ==</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Visualization ==</div></td> </tr> </table> 37.198.120.181 https://en.wikipedia.org/w/index.php?title=QR_algorithm&diff=1254105269&oldid=prev 130.243.94.123: /* Iteration phase */ Wrote lead-in to the iteration phase. 2024-10-29T12:49:32Z <p><span class="autocomment">Iteration phase: </span> Wrote lead-in to the iteration phase.</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 12:49, 29 October 2024</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 16:</td> <td colspan="2" class="diff-lineno">Line 16:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>===Iteration phase===</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>===Iteration phase===</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>If a Hessenberg matrix &lt;math&gt;A&lt;/math&gt; has element &lt;math&gt; a_{k,k-1} = 0 &lt;/math&gt; for some &lt;math&gt;k&lt;/math&gt;, i.e., if one of the elements just below the diagonal is in fact zero, then it decomposes into blocks whose eigenproblems may be solved separately; an eigenvalue is either an eigenvalue of the submatrix of the first &lt;math&gt;k-1&lt;/math&gt; rows and columns, or an eigenvalue of the submatrix of remaining rows and columns. The purpose of the QR iteration step is to shrink one of these &lt;math&gt;a_{k,k-1}&lt;/math&gt; elements so that effectively a small block along the diagonal is split off from the bulk of the matrix. In the case of a real eigenvalue that is usually the &lt;math&gt; 1 \times 1 &lt;/math&gt; block in the lower right corner (in which case element &lt;math&gt; a_{nn} &lt;/math&gt; holds that eigenvalue), whereas in the case of a pair of conjugate complex eigenvalues it is the &lt;math&gt; 2 \times 2 &lt;/math&gt; block in the lower right corner.</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The rate of convergence depends on the separation between eigenvalues, so a practical algorithm will use shifts, either explicit or implicit, to increase separation and accelerate convergence. A typical symmetric QR algorithm isolates each eigenvalue (then reduces the size of the matrix) with only one or two iterations, making it efficient as well as robust.{{clarify|date=June 2012}}</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The rate of convergence depends on the separation between eigenvalues, so a practical algorithm will use shifts, either explicit or implicit, to increase separation and accelerate convergence. A typical symmetric QR algorithm isolates each eigenvalue (then reduces the size of the matrix) with only one or two iterations, making it efficient as well as robust.{{clarify|date=June 2012}}</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> </table> 130.243.94.123