Calculate an eigenvector using a dominant eigenvalue

I want to ask some question about the centrality of the eigenvector. I have to calculate the eigenvalue using a power iteration. This is my code for calculating the eigenvalue:

v=rand(165,1); for k=1:5 w = data_table*v; lamda = norm(w); v = w/lamda; end 

When I get a single eigenvalue, I confuse the calculation of the eigenvector using the only eigenvalue I got. for example, in my code to calculate an eigenvalue, I get the dominant eigenvalue = 78.50. With this eigenvalue, I want to compute an eigenvector. usually we always calculate the eigenvalue and eigenvector using the code, for example: [U, V] = eig (data_matrix); but the result of this code:

 v = -167.59 0 0 0 -117.51 0 0 0 -112.0 V = 0.0404505 0.04835455 -0.01170 0.0099050 -0.0035217 -0.05561 0.0319591 -0.0272589 0.018426 

From the result, we calculate the eigenvector using three values โ€‹โ€‹of the eigenvalues. My question is how to calculate the eigenvector estimate, but just using only one eigenvalue metric, which we get in the power iteration code?

+1
source share
1 answer

power iteration finds the dominant eigenvector, i.e. eigenvector with the largest eigenvalue.

if you start with

 v=ones(165,1)/165; % initialisation for i=1:5 % 5 iterations w=data_table*v; % assuming size(data_table) = [165 165] v=w/norm(w); end 

and your algorithm converges in 5 iterations, then v is your dominant eigenvector;

Also, I would start with a smaller example to test your code. Your call matlab [U,V] = eig(data_matrix); confused because V must be a diagonal matrix of size [165 165], and not a full matrix of size [3 3];

Try the following:

 X=[1 1 1;1 1 2;1 2 2] [U,V]=eig(X) X*U(:,3) U(:,3)*V(3,3) 

to see what is the largest eigenvalue in the output of the matrix, i.e. (V3,3) and the corresponding vector U (:, 3).

You can use power iteration to search for this eigenvector:

  v=ones(1,3) w=v*X;v=w/norm(w) w=v*X;v=w/norm(w) w=v*X;v=w/norm(w) w=v*X;v=w/norm(w) 
+1
source

Source: https://habr.com/ru/post/1501384/


All Articles