Using QR algorithm to solve eigenvalues and eigenvectors of matrices

Source: Internet
Author: User

Using QR algorithm to solve eigenvalues and eigenvectors of matrices

To solve the eigenvalues of a general matrix (not the naïve to Shi 2 x 2 matrix).
By definition, it is possible to solve higher order equations ...
This is obviously a pit ... High-order equation are you swollen?

It's been a long time
1. I require eigenvalues and eigenvectors.
2. Find an algorithm QR decomposition matrix to solve eigenvalue
3.QR matrix decomposition requires Gram-schimidt orthogonal decomposition

There is a very obvious feeling, often in the present very difficult to have a very deep and systematic study of a certain subject knowledge. 
Often learn when "rely on, learn what is the use of this thing" "Learning for so long, do not know how to use, do not want to learn."
To solve the problem later, to solve the problem is likely to include other sub-problems, since the problem has self-problems, a layer of recursion, until the resolution of all sub-problems, can be recursive back to solve the problem we initially want to fix.

will be annoyed, not very systematic study of that knowledge.

Sao years, hold, you can recursive to die a problem how deep, if you can safely return to the original you want to solve the problem, there is no "explosion", then this depth represents your ability to learn. The deeper the depth, the stronger the learning ability. People can not always have a comfortable enough environment to the system of all things are done, it is impossible to all the basic knowledge of the project, to solve practical problems. In the actual problem to find the problem, solve the problem, is the real learning ability!!! Not the number of TM papers! Hold On to me!

Ah, shout the almighty Wiki
Http://en.wikipedia.org/wiki/Eigenvalues_and_eigenvectors

Let's look at the general matrix to find out how the eigenvalues are broken

你会发现,上帝啊,这家伙要求解方程...一般的二阶方程可能还能搞得定,但是矩阵的规模一大,高阶方程就坑爹了,你去求解高阶方程组?两个字,呵呵.当前我找到的可行解是矩阵的QR算法.

In fact, there is no difficulty, that is, iterative iteration, the matrix a QR decomposition, and then because Q is an orthogonal array of his inverse and transpose is the same, so you will see the above figure in the formula pushed to.
When the number of iterations is sufficient, a numerical solution is obtained that is close enough to the eigenvalues of the Matrix.

Again, the computer can only solve the numerical solution and cannot find the analytic solution.

    def eig(self, A) :        ifisNone :            return        forin range(020) :            (Q, R) = self.qr_decomposition(A)            A = self.multiply(R, Q)        return A

On the diagonal is the eigenvalues of the Matrix.

After finding the eigenvalues, according to
a x span class= "Mo" id= "mathjax-span-5" style= "font-family:mathjax_main; padding-left:0.255em; " >= β x

and then to A? Beta Matrix inversion can be


The first matrix of the output is a characteristic value on the diagonal of the
Function implementation:

     def Eig(self, A) :        ifA is None:returnTmp_mat = Copy.deepcopy (A) forIinchRange0, -): (Q, R) = Self.qr_decomposition (tmp_mat) Tmp_mat = self.multiply (R, Q) row = Len (Tmp_mat) col = Len (tmp_mat[0]) forIinchRange0, row): forJinchRange0, col):ifI! = J:tmp_mat[i][j] =0Eig_vec = Self.inverse (Self.sub (A, Tmp_mat))return(Tmp_mat, Eig_vec)

The implementation of the "unknown" function in the above function implementation can be found in the link inside the online interface.
http://blog.csdn.net/cinmyheart/article/details/43976423











推土机压过旧日的家只剩下门前电线杆和灰蒙的天房檐下伸手去捧雨天的房檐水屋后桔园里从秋千上摔下边疼边笑日落时有爷爷的三轮车从镇上回来门前有人坐着小木凳眨巴着眼痴痴地等太阳不等你我等你时间开着推土机无情的碾过童年


Photo taken on February 6, 2015

Using QR algorithm to solve eigenvalues and eigenvectors of matrices

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.