Quickly and efficiently calculating an eigenvector for known eigenvalue

前端 未结 1 1312
梦如初夏
梦如初夏 2021-02-05 21:27

Short version of my question:

What would be the optimal way of calculating an eigenvector for a matrix A, if we already know the eigenvalue

相关标签:
1条回答
  • 2021-02-05 22:01

    Here's one approach using Matlab:

    1. Let x denote the (row) left eigenvector associated to eigenvalue 1. It satisfies the system of linear equations (or matrix equation) xA = x, or x(AI)=0.
    2. To avoid the all-zeros solution to that system of equations, remove the first equation and arbitrarily set the first entry of x to 1 in the remaining equations.
    3. Solve those remaining equations (with x1 = 1) to obtain the other entries of x.

    Example using Matlab:

    >> A = [.6 .1 .3
            .2 .7 .1
            .5 .1 .4]; %// example stochastic matrix
    >> x = [1, -A(1, 2:end)/(A(2:end, 2:end)-eye(size(A,1)-1))]
    x =
       1.000000000000000   0.529411764705882   0.588235294117647
    >> x*A %// check
    ans =
       1.000000000000000   0.529411764705882   0.588235294117647
    

    Note that the code -A(1, 2:end)/(A(2:end, 2:end)-eye(size(A,1)-1)) is step 3.

    In your formulation you define x to be a (column) right eigenvector of AT (such that ATx = x). This is just x.' from the above code:

    >> x = x.'
    x =
       1.000000000000000
       0.529411764705882
       0.588235294117647
    >> A.'*x %// check
    ans =
       1.000000000000000
       0.529411764705882
       0.588235294117647
    

    You can of course normalize the eigenvector to sum 1:

    >> x = x/sum(x)
    x =
       0.472222222222222
       0.250000000000000
       0.277777777777778
    >> A.'*x %'// check
    ans =
       0.472222222222222
       0.250000000000000
       0.277777777777778
    

    Following the usual convention. Equivalently, this corresponds to a right eigenvector of the transposed matrix.

    0 讨论(0)
提交回复
热议问题