[Math] Power iteration sign of eigenvalue

eigenvalues-eigenvectorslinear algebranumerical linear algebranumerical methods

I need to write a program which computes all eigenvalues and corresponding eigenvectors. I'd like to use power iterations method (I know that it's not good but it's really necessary).

my algorithm is:

1) find largest (absolute) eigenvalue\eigenvector by power iterations method

2) determine sign (positive or negative) of that found eigenvalue

3) recalculate initial matrix for finding next largest (absolute) eigenvalue\eigenvector

4) goto step 1)

My question is about step 2).
I have no idea how to determine sign of eigenvalue. It's important because algorithm does not work if sign is incorrect.
Could somebody help me???

P.S. for example:
I have the matrix
$$\begin{matrix}
1 & 2 & 3 \\
2 & 5 & 6 \\
3 & 6 & 2 \\
\end{matrix}$$
I'd like to find all eigenpairs. At first I use power iteration method and found that eigenvalue is 10.88 and eigenvector is {0.33 0.73 0.60}

I have no idea is found eigenvalue is positive or negative. I assume that is positive and recalculate my initial matrix:
$$\begin{pmatrix}
1 & 2 & 3 \\
2 & 5 & 6 \\
3 & 6 & 2 \\
\end{pmatrix}-\begin{pmatrix}
0.33 & 0 & 0 \\
0.73 & 0 & 0 \\
0.60 & 0 & 0 \\
\end{pmatrix}\cdot\begin{pmatrix}
0.33 & 0.73 & 0.60 \\
0 & 0 & 0 \\
0 & 0 & 0 \\
\end{pmatrix}\cdot10.88=\begin{pmatrix}
-0.18 & -0.61 & 0.84 \\
-0.61 & -0.75 & 1.24 \\
0.84 & 1.24 & -1.95 \\
\end{pmatrix}$$
After that I again use power iteration method and found that eigenvalue is 3.089.
Here is:
$$EigenvectorEstimation1=\begin{pmatrix}
-0.18 & -0.61 & 0.84 \\
-0.61 & -0.75 & 1.24 \\
0.84 & 1.24 & -1.95 \\
\end{pmatrix}\cdot\begin{pmatrix}
1 \\
1 \\
1 \\
\end{pmatrix}=\begin{pmatrix}
0.042 \\
-0.12 \\
0.12 \\
\end{pmatrix}$$
$$EigenvalueEstimation1=\sqrt{0.042^2+(-0.12)^2+0.12^2}=0.178$$
$$EigenvectorNormalized1=\begin{pmatrix}
0.042/0.178 \\
-0.12/0.178 \\
0.12/0.178 \\
\end{pmatrix}=\begin{pmatrix}
0.237 \\
-0.68 \\
0.69 \\
\end{pmatrix}$$
$$EigenvectorEstimation2=\begin{pmatrix}
-0.18 & -0.61 & 0.84 \\
-0.61 & -0.75 & 1.24 \\
0.84 & 1.24 & -1.95 \\
\end{pmatrix}\cdot\begin{pmatrix}
0.237 \\
-0.68 \\
0.69 \\
\end{pmatrix}=\begin{pmatrix}
0.95 \\
1.22 \\
-1.99 \\
\end{pmatrix}$$
$$EigenvalueEstimation2=\sqrt{0.95^2+1.22^2+(-1.99)^2}=2.524$$
$$EigenvectorNormalized2=\begin{pmatrix}
0.95/2.524 \\
1.22/2.524 \\
-1.99/2.524 \\
\end{pmatrix}=\begin{pmatrix}
0.377 \\
0.4837 \\
-0.79 \\
\end{pmatrix}$$
$$EigenvectorEstimation3=\begin{pmatrix}
-0.18 & -0.61 & 0.84 \\
-0.61 & -0.75 & 1.24 \\
0.84 & 1.24 & -1.95 \\
\end{pmatrix}\cdot\begin{pmatrix}
0.377 \\
0.4837 \\
-0.79 \\
\end{pmatrix}=\begin{pmatrix}
-1.025 \\
-1.567 \\
2.45 \\
\end{pmatrix}$$
$$EigenvalueEstimation3=\sqrt{(-1.025)^2+(-1.567)^2+2.45^2}=3.086$$

and so on…

It's second eigenvalue of initial matrix. But actually it's should be negative! How can I get that it's negative??? this algorithm gives only magnitude (without sign). How can I modify this?

Best Answer

Dima Railguner;

If I remember correctly you can determine the sign of the dominant eigenvalue by observing the xn and the xn+1 iteration. The signs will alternate when the dominant eigenvalue is negative and won't when it is positive. That is at least what some books say.

Also, my power method gets -3.09... So for at least this problem it does not have a problem with the signs.

Looks like we are not using the same method. I can give you a link to mine if you want it.

Related Question