The QR Algorithm Computes Eigenvalues and Singular Values

QR算法是世界上最成功的算法之一。我们可以使用动画gif来说明该算法的三种变体,一种用于计算非对称矩阵的特征值,一个用于对称矩阵,另一种用于矩形矩阵的奇异值。在所有三种情况下,QR迭代本身均在降低到紧凑的形式之前。所有转换都是使用givens和Househoulder转换的正交相似性。这些在数值上是稳定的,保留特征值并保留任何对称性。

Contents

的起始矩阵三个变体是基础d on flipping therosser矩阵
A = fliplr(rosser)
A = 29 -49 -52 -8 407 -192 196 611 -44 -8 -43 -71 -192 113 899 196 52 8 49 61 196 899 113 -192 -23 59 44 8 611 196 -192 407 208 208 -599 411 8 61 -71 -8 208 208 411 -599 44 49 -43 -52 -911 99 208 208 59 8 -8 -49 99 -911 208 208 -23 52 -44 29

非对称特征值

Here is a static picture of the starting matrix. Notice that it is not symmetric.最初的减少用途N-2类似者类似的人一次将零以下方的圆柱引入圆柱。结果称为赫森伯格矩阵(不要让拼写检查员将其更改为Heisenberg matrix。)Now the QR algorithm gradually reduces most subdiagonal elements to roundoff level, so they can be set to zero. The corresponding diagonal element is an eigenvalue. The iteration count is shown in the title. The element below the diagonal in the last row is the initial target; it requires four iterations. The next two rows require three iterations each. The remaining subdiagonals require just one or two iterations each.All this is done with real arithmetic, although a real, nonsymmetric matrix may have complex eigenvalues. So the final matrix may have 2-by-2 bumps on the diagonal. This example has one bump in rows 3 and 4. The eigenvalues of a bump are a complex conjugate pair of eigenvalues of the input matrix. All the other diagonal elements are real eigenvalues of the input matrix.计算的特征值是:
-1010.9 1017.3 -14.529 + 903.74i -14.529-903.74i 206.9 -30.004 1.7094 5.614e -13

Symmetric eigenvalues

对称矩阵是
s =(a + a')/2;fprintf([repmat(' %7.1f',1,8)'\n'],S)
29.0 -46.5 0.0 -15.5 307.5 8.0 -357.5 355.0 -46.5 -8.0 -17.5 -6.0 8.0 160.5 499.0 -357.5 0.0 -17.5 49.0 52.5 -201.5 655.0 160.5 8.0 -15.5 -6.0 52.5 8.0 511.0 -201.5 8.0 307.5 307.5 8.0 -201.5 511.08.0 52.5 -6.0 -15.5 8.0 160.5 655.0 -201.5 52.5 49.0 -17.5 0.0 -357.5 499.0 160.5 8.0 -6.0 -17.5 -8.0 -46.5 355.0 -357.5 8.0 307.5 -15.5 0.0 -46.5 29.0
Here is the static picture. (The computation is done on half of the matrix, but we show the entire array.)通过对称,将列为零的六个家庭也为零。现在,QR迭代仅在两个向量上起作用,即对角线和偏对角。极限是包含特征值的对角线。
-1010.9 1017.4 -558.86 -481.89 -86.32 109.7 662.7 504.27

SVD

通过插入几行身份矩阵来制作我们的测试矩阵矩形。
i =眼(8,8);a = [a(1:4,:);我(1,:);A(5:8,:);我(2,:)]
a = 29 -49 -52 -8 407 -192 196 611 -44 -8 -43 -71 -192 113 899 196 52 8 49 61 196 899 899 113 -192 -192 -23 59 44 8 611 196 196 -192 407 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00士0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 00士点0 0 0 0 208 208 -599 411 8 61 -71 -8 208 208 208 411 -599 44 49 -43 -52 -911 99 208 208 208 59 8 -8 -49 99 -911 208 208 208 208 -23 52 -44 29 0 1 1 1 1 1 1 1 1 1 1 1 1 10 0 0 0 0 0
Use a Householder operating from the left to zero a column and then another Householder operating from the right to zero most of a row.现在,双面QR迭代将对角线降低到可忽略的尺寸。所得的对角线包含奇异值。
0.44272 0.13184 1000 1000 1019.9 1020 1020 1020

Software

eigsvdguiinNumerical Computing with MATLABorCleve's Laboratory

Published with MATLAB® R2018b

|

Comments

要发表评论,请单击here登录您的数学帐户或创建一个新帐户。