Final Project: Power Method
Final Project: Power Method
ZJT
Introduction:
equation. For large-scale matrix, the characteristic equation would be difficult and
time-consuming to solve.
can be used only to find the dominant eigenvalue of A, dominant eigenvalues are
In this project, I want to apply power method to solve some given matrix eigenvalue
problem and address the benefits and disadvantages about this method.
Firstly, I want to address the importance to find the dominant eigenvalue in some
practical cases, for example: to measure the influence of a node of network in graph
theory, eigenvector centrality has been widely used to assign relative scores to all
nodes. And concluded from the Perron-Frobenius theorem[1]: only the greatest
The dominant eigenvalue is the eigenvalue that largest in absolute value in a matrix:
Power method
In power method, there are three main steps to find out the dominant eigenvalue:
1 = 0
2 = 1 = (0 ) = 2 0
3 = 2 = (2 0 ) = 3 0
= 1 = (1 0 ) = 0
dominant eigenvalue.
Power method convergence:
0 = 1 1 + 2 2 +. . . + ( 0)
0 = (1 1 + 2 2 +. . . + )
= 1 (1 ) + 2 (2 )+. . . + ( )
= 1 (1 1 ) + 2 (2 2 )+. . . + ( )
0 = 1 (1 1 ) + 2 (2 2 )+. . . + ( )
2
= 1 [1 1 + 2 ( ) 2 +. . . + ( ) ]
1 1
In the expression [1 1 + 2 (2 ) 2 +. . . + ( ) ], these fractions such as
1 1
2
,..., are less than 1, so the items (2 ) , . . . , ( ) will approach 0 when
1 1 1 1
sample code with a given matrix and then verify the characteristic of power method
Sample Code[2]:
#include<stdio.h>
#include<math.h>
int main()
{
int i,j,k,n,iter;
float x[10],y[10],z[10],a[10][10],l,d,f,e,Z;
printf("\nEnter the order of the matrix : \n");
scanf("%d",&n);
printf("\nEnter the number of Iterations : \n");
scanf("%d",&iter);
printf("\nEnter the coefficients of the matrix row wise :\n");
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
scanf("%f",&a[i][j]);
}
x[i]=1;
}
k=0;
line:
for(i=0;i<n;i++)
{
y[i]=0;
for(j=0;j<n;j++)
{
y[i]=y[i]+a[i][j]*x[j];
}
z[i]=fabs(y[i]);
}
Z=z[0];
j=0;
for(i=1;i<n;i++)
{
if(z[i]>=Z)
{
Z=z[i];
j=i;
}
}
if(Z==y[j])
{
d=Z;
}
else
{
d=-Z;
}
for(i=0;i<n;i++)
{
x[i]=y[i]/d;
}
k++;
if(k>=iter)
{
printf("\nThe numerically largest Eigen value is %f \n",d);
}
else
{
goto line;
}
return 0;
}
2 4 2
first test the code with a 3 dimension matrix [2 1 2] , by solving its
4 2 5
characteristic equation, we know the analytical eigenvalues are 1 = 6 , 2 =
3 , 3 = 5
the numerical dominant eigenvalue is the same as the analytical value, we can say the
From the prove of convergence of power method, we know the convergence rate of
| |
power method is related with the absolute value of , we can guess that the bigger
|1 |
the absolute value is, the slow the convergence rate is. To verify the guess, we can
1 3 |2 |
1. In matrix [ ] , the numerical eigenvalues are 1 = 10, 2 = 1. =
6 8 |1 |
0.1 is small.
8 2 |2 |
2. In matrix [ ] , the numerical eigenvalues are 1 = 10, 2 = 9. =
17 7 |1 |
| |
from the 2 examples, we find when |1 |
is small, it can converge to a stable value
|2 |
in a few steps, but when |1 |
is large, it usually takes more steps to converge.
1 2 0 0.5
matrix[2 1 2] is 3, and its corresponding dominant eigenvector is [0.5] ,
1 3 1 1
after 80 iterations, power method gives numerical dominant eigenvalue and
the advantage of power method is that it can approximate both dominant eigenvalue
and corresponding dominant eigenvector at the same time, the disadvantage is that it
can only obtain the dominant eigenvalue, the other eigenvalues are unknown.
Reference:
[1]: https://en.wikipedia.org/wiki/Eigenvector_centrality
http://computingforbeginners.blogspot.com/2014/05/power-method-to-find-
largest-eigenvalue.html