# [Textbook] Power Method -Lee

## 2305 days ago by math2013

# Example 1 (SGLee) from numpy import argmax,argmin A=matrix([[4,-5],[2,-3]]) x0=vector([0.0,1.0]) # Initial guess of eigenvector maxit=20 # Maximum number of iterates dig=8 # number of decimal places to be shown is dig-1 tol=0.0001 # Tolerance limit for difference of two consecutive eigenvectors err=1 # Initialization of tolerance i=0 while(i<=maxit and err>=tol): y0=A*x0 ymod=y0.apply_map(abs) imax=argmax(ymod) c1=y0[imax] x1=y0/c1 err=norm(x0-x1) i=i+1 x0=x1 print "Iteration Number:", i-1 print "y"+str(i-1)+"=",y0.n(digits=dig), "c"+str(i-1)+"=", c1.n(digits=dig), "x"+str(i)+"=",x0.n(digits=dig) print "n"
 Iteration Number: 0 y0= (-5.0000000, -3.0000000) c0= -5.0000000 x1= (1.0000000, 0.60000000) n Iteration Number: 1 y1= (1.0000000, 0.20000000) c1= 1.0000000 x2= (1.0000000, 0.20000000) n Iteration Number: 2 y2= (3.0000000, 1.4000000) c2= 3.0000000 x3= (1.0000000, 0.46666667) n Iteration Number: 3 y3= (1.6666667, 0.60000000) c3= 1.6666667 x4= (1.0000000, 0.36000000) n Iteration Number: 4 y4= (2.2000000, 0.92000000) c4= 2.2000000 x5= (1.0000000, 0.41818182) n Iteration Number: 5 y5= (1.9090909, 0.74545455) c5= 1.9090909 x6= (1.0000000, 0.39047619) n Iteration Number: 6 y6= (2.0476190, 0.82857143) c6= 2.0476190 x7= (1.0000000, 0.40465116) n Iteration Number: 7 y7= (1.9767442, 0.78604651) c7= 1.9767442 x8= (1.0000000, 0.39764706) n Iteration Number: 8 y8= (2.0117647, 0.80705882) c8= 2.0117647 x9= (1.0000000, 0.40116959) n Iteration Number: 9 y9= (1.9941520, 0.79649123) c9= 1.9941520 x10= (1.0000000, 0.39941349) n Iteration Number: 10 y10= (2.0029326, 0.80175953) c10= 2.0029326 x11= (1.0000000, 0.40029283) n Iteration Number: 11 y11= (1.9985359, 0.79912152) c11= 1.9985359 x12= (1.0000000, 0.39985348) n Iteration Number: 12 y12= (2.0007326, 0.80043956) c12= 2.0007326 x13= (1.0000000, 0.40007323) n Iteration Number: 13 y13= (1.9996338, 0.79978030) c13= 1.9996338 x14= (1.0000000, 0.39996338) n Iteration Number: 14 y14= (2.0001831, 0.80010987) c14= 2.0001831 x15= (1.0000000, 0.40001831) n Iteration Number: 0 y0= (-5.0000000, -3.0000000) c0= -5.0000000 x1= (1.0000000, 0.60000000) n Iteration Number: 1 y1= (1.0000000, 0.20000000) c1= 1.0000000 x2= (1.0000000, 0.20000000) n Iteration Number: 2 y2= (3.0000000, 1.4000000) c2= 3.0000000 x3= (1.0000000, 0.46666667) n Iteration Number: 3 y3= (1.6666667, 0.60000000) c3= 1.6666667 x4= (1.0000000, 0.36000000) n Iteration Number: 4 y4= (2.2000000, 0.92000000) c4= 2.2000000 x5= (1.0000000, 0.41818182) n Iteration Number: 5 y5= (1.9090909, 0.74545455) c5= 1.9090909 x6= (1.0000000, 0.39047619) n Iteration Number: 6 y6= (2.0476190, 0.82857143) c6= 2.0476190 x7= (1.0000000, 0.40465116) n Iteration Number: 7 y7= (1.9767442, 0.78604651) c7= 1.9767442 x8= (1.0000000, 0.39764706) n Iteration Number: 8 y8= (2.0117647, 0.80705882) c8= 2.0117647 x9= (1.0000000, 0.40116959) n Iteration Number: 9 y9= (1.9941520, 0.79649123) c9= 1.9941520 x10= (1.0000000, 0.39941349) n Iteration Number: 10 y10= (2.0029326, 0.80175953) c10= 2.0029326 x11= (1.0000000, 0.40029283) n Iteration Number: 11 y11= (1.9985359, 0.79912152) c11= 1.9985359 x12= (1.0000000, 0.39985348) n Iteration Number: 12 y12= (2.0007326, 0.80043956) c12= 2.0007326 x13= (1.0000000, 0.40007323) n Iteration Number: 13 y13= (1.9996338, 0.79978030) c13= 1.9996338 x14= (1.0000000, 0.39996338) n Iteration Number: 14 y14= (2.0001831, 0.80010987) c14= 2.0001831 x15= (1.0000000, 0.40001831) n
# Example 2 (SGLee) from numpy import argmax, argmin A=matrix([[1,-3,3], [3, -5, 3], [6,-6,4]]) x0=vector([1.0,1.0,1.0]) ## Initial guess maxit=20 # Maximum number of iterates dig=8 # number of decimal places to be shown is dig-1 tol=0.00001 # Tolerance limit for difference of two consecutive eigenvectors err=1 # Initialization of tolerance
i=0 while(i<=n and err>=tol): y0=A*x0 ymod=y0.apply_map(abs) imax=argmax(ymod) c1=y0[imax] x1=y0/c1 err=norm(x0-x1) i=i+1 x0=x1 print "Iteration Number:", i-1 print "y"+str(i-1)+"=",y0.n(digits=dig), " c"+str(i-1)+"=", c1.n(digits=dig) print "x"+str(i)+"=",x0.n(digits=dig) print "n"
 Iteration Number: 0 y0= (1.0000000, 1.0000000, 4.0000000) c0= 4.0000000 x1= (0.25000000, 0.25000000, 1.0000000) n Iteration Number: 1 y1= (2.5000000, 2.5000000, 4.0000000) c1= 4.0000000 x2= (0.62500000, 0.62500000, 1.0000000) n Iteration Number: 2 y2= (1.7500000, 1.7500000, 4.0000000) c2= 4.0000000 x3= (0.43750000, 0.43750000, 1.0000000) n Iteration Number: 3 y3= (2.1250000, 2.1250000, 4.0000000) c3= 4.0000000 x4= (0.53125000, 0.53125000, 1.0000000) n Iteration Number: 4 y4= (1.9375000, 1.9375000, 4.0000000) c4= 4.0000000 x5= (0.48437500, 0.48437500, 1.0000000) n Iteration Number: 5 y5= (2.0312500, 2.0312500, 4.0000000) c5= 4.0000000 x6= (0.50781250, 0.50781250, 1.0000000) n Iteration Number: 6 y6= (1.9843750, 1.9843750, 4.0000000) c6= 4.0000000 x7= (0.49609375, 0.49609375, 1.0000000) n Iteration Number: 7 y7= (2.0078125, 2.0078125, 4.0000000) c7= 4.0000000 x8= (0.50195312, 0.50195312, 1.0000000) n Iteration Number: 8 y8= (1.9960938, 1.9960938, 4.0000000) c8= 4.0000000 x9= (0.49902344, 0.49902344, 1.0000000) n Iteration Number: 9 y9= (2.0019531, 2.0019531, 4.0000000) c9= 4.0000000 x10= (0.50048828, 0.50048828, 1.0000000) n Iteration Number: 10 y10= (1.9990234, 1.9990234, 4.0000000) c10= 4.0000000 x11= (0.49975586, 0.49975586, 1.0000000) n Iteration Number: 0 y0= (1.0000000, 1.0000000, 4.0000000) c0= 4.0000000 x1= (0.25000000, 0.25000000, 1.0000000) n Iteration Number: 1 y1= (2.5000000, 2.5000000, 4.0000000) c1= 4.0000000 x2= (0.62500000, 0.62500000, 1.0000000) n Iteration Number: 2 y2= (1.7500000, 1.7500000, 4.0000000) c2= 4.0000000 x3= (0.43750000, 0.43750000, 1.0000000) n Iteration Number: 3 y3= (2.1250000, 2.1250000, 4.0000000) c3= 4.0000000 x4= (0.53125000, 0.53125000, 1.0000000) n Iteration Number: 4 y4= (1.9375000, 1.9375000, 4.0000000) c4= 4.0000000 x5= (0.48437500, 0.48437500, 1.0000000) n Iteration Number: 5 y5= (2.0312500, 2.0312500, 4.0000000) c5= 4.0000000 x6= (0.50781250, 0.50781250, 1.0000000) n Iteration Number: 6 y6= (1.9843750, 1.9843750, 4.0000000) c6= 4.0000000 x7= (0.49609375, 0.49609375, 1.0000000) n Iteration Number: 7 y7= (2.0078125, 2.0078125, 4.0000000) c7= 4.0000000 x8= (0.50195312, 0.50195312, 1.0000000) n Iteration Number: 8 y8= (1.9960938, 1.9960938, 4.0000000) c8= 4.0000000 x9= (0.49902344, 0.49902344, 1.0000000) n Iteration Number: 9 y9= (2.0019531, 2.0019531, 4.0000000) c9= 4.0000000 x10= (0.50048828, 0.50048828, 1.0000000) n Iteration Number: 10 y10= (1.9990234, 1.9990234, 4.0000000) c10= 4.0000000 x11= (0.49975586, 0.49975586, 1.0000000) n
Mat=['A','B','C'] from numpy import argmax,argmin @interact def _QRMethod(A1=input_box(default='[[1,2], [3,4]]', type = str, label = 'A'), B1=input_box(default='[[1.7,-0.4], [0.15,2.2]]', type = str, label = 'B'),C1=input_box(default='[[1,2],[-3,4]]', type = str, label = 'C'),example=selector(Mat,buttons=True,label='Choose the Matrix'),maxit=slider(1, 500, 1, default=100, label="Maximum no. of iterations"),tol=input_box(label="Tolerance",default=0.001),v= input_box([0.1,1.0])): if(example=='A'): A1=sage_eval(A1) A=matrix(A1) elif(example=='B'): B1=sage_eval(B1) A=matrix(B1) elif(example=='C'): C1=sage_eval(C1) A=matrix(C1) x0=vector(v)

Choose the Matrix
Maximum no. of iterations
Tolerance

## Click to the left again to hide and once more to show the dynamic interactive window

html('A=%s,~~ x_0=%s'%(latex(A),latex(x0))) #html('x_0=%s'%latex(x0)) #x0=vector([0.0,1.0]) i=0 err=1 while(i<=maxit and err>=tol): y0=A*x0 ymod=y0.apply_map(abs) imax=argmax(ymod) c1=y0[imax] x1=y0/c1 err=norm(x0-x1) print "Iteration Number:", i+1 html('y_i=%s,~~ c_i=%s~~ x_i=%s'%(latex(y0),latex(c1),latex(x0))) i=i+1 x0=x1 if(i==maxit+1): print 'Convergence is not achieved' else: print 'The number iteration required for tolerance=',tol,'is:',i
 A=\left(\begin{array}{rrr} 1 & -3 & 3 \\ 3 & -5 & 3 \\ 6 & -6 & 4 \end{array}\right),~~ x_0=\left(0.499755859375000,\,0.499755859375000,\,1.00000000000000\right) A=\left(\begin{array}{rrr} 1 & -3 & 3 \\ 3 & -5 & 3 \\ 6 & -6 & 4 \end{array}\right),~~ x_0=\left(0.499755859375000,\,0.499755859375000,\,1.00000000000000\right)
from numpy import argmax, argmin A=matrix([[10,-8,-4],[-8,13,5],[-4,4,4]]) Id=identity_matrix(3) x0=vector([1.0,1.0,1.0]) ## Initial guess maxit=20 # Maximum number of iterates dig=8 # number of decimal places to be shown is dig-1 tol=0.00001 # Tolerance limit for difference of two consecutive eigenvectors err=1 # Initialization of tolerance sig=1.9 # Initial Shifting number i=0 while(i<=n and err>=tol): y0=(A-sig*Id).inverse()*x0 ymod=y0.apply_map(abs) imax=argmax(ymod) c1=y0[imax] d1=sig+1/c1 x1=y0/c1 print "Iteration Number:", i+1 print "y"+str(i)+"=",y0.n(digits=dig), "d"+str(i)+"=", d1.n(digits=dig) print "x"+str(i+1)+"=",x0.n(digits=dig) print "n"
 WARNING: Output truncated! Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) ... Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n WARNING: Output truncated! Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) ... Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n Iteration Number: 1 y0= (3.0273924, -3.8029171, 13.486304) d0= 1.9741493 x1= (1.0000000, 1.0000000, 1.0000000) n
A=matrix([[10,-8,-4],[-8,13,5],[-4,5,4]]) Id=identity_matrix(3) x0=vector([1.5,-2.5,5]) #x0=vector([1.0,0.0,0.0]) #x0=vector([1.0,-1,-1]) x0=x0/norm(x0) maxit=20 # Maximum number of iterates dig=8 # number of decimal places to be shown is dig-1 tol=0.00001 # Tolerance limit for difference of two consecutive eigenvectors err=1 # Initialization of tolerance i=0 while(i<=n and err>=tol): lam0=x0.dot_product(A*x0) y0=(A-lam0*Id).inverse()*x0 x1=y0/norm(y0) print "Iteration Number:", i+1 print "y"+str(i)+"=",y0.n(digits=dig), "lambda"+str(i)+"=", lam0.n(digits=dig) print "x"+str(i+1)+"=",x0.n(digits=dig) print "n" i=i+1 x0=x1
A=matrix(RDF, [[10,3,4],[3,5,1],[4,2,3]]) print "The actual eivenvalues of A are" ev=A.eigenvalues() show(ev) n=10 for i in range(n): Q1,R1=A.QR() print "Iteration Number", i print "The matrix Q"+str(i), "is" show(Q1) print "The matrix R"+str(i), "is" show(R1) A1=R1*Q1 print "The matrix A"+str(i), "is" show(A1) A=A1
 WARNING: Output truncated! full_output.txt The actual eivenvalues of A are \newcommand{\Bold}[1]{\mathbf{#1}}\left[13.1804689044, 3.56330346867, 1.25622762694\right] Iteration Number 0 The matrix Q0 is \newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr} -0.894427191 & 0.314676219522 & -0.31777173705 \\ -0.2683281573 & -0.946058827723 & -0.181583849743 \\ -0.3577708764 & -0.0771464280117 & 0.930617229931 \end{array}\right) The matrix R0 is \newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr} -11.1803398875 & -4.7404641123 & -4.9193495505 \\ 0.0 & -3.94055833607 & 0.0812067663282 \\ 0.0 & 0.0 & 1.33918089185 \end{array}\right) The matrix A0 is \newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr} 13.032 & 1.34608107814 & -0.164443701815 \\ 1.02830934109 & 3.72173518805 & 0.791114168732 \\ -0.479119921336 & -0.103313022268 & 1.24626481195 \end{array}\right) Iteration Number 1 The matrix Q1 is \newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr} -0.996232453991 & 0.0790956260904 & 0.0355637392449 \\ -0.0786092033716 & -0.996794511229 & 0.0148760051455 \\ 0.0366263670188 & 0.0120243219007 & 0.999256686203 \end{array}\right) The matrix R1 is \newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr} -13.0812843406 & -1.63735627471 & 0.147281450427 \\ 0.0 & -3.60457835109 & -0.786599549427 \\ -0.0 & -0.0 & 1.25125883164 \end{array}\right) The matrix A1 is \newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr} 13.1661056568 & 0.599206332142 & -0.342404731552 \\ 0.254542748875 & 3.58356558947 & -0.839636585227 \\ 0.045829065203 & 0.0150455389727 & 1.25032875368 \end{array}\right) Iteration Number 2 The matrix Q2 is \newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr} -0.999807111701 & 0.0193418421557 & -0.00341065019922 \\ -0.0193294552839 & -0.999806585683 & -0.00362813765143 \\ -0.00348016539642 & -0.00356151181562 & 0.999987601964 \end{array}\right) The matrix R2 is \newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr} -13.1686457345 & -0.668411484034 & 0.354217052652 \\ 0.0 & -3.57133630715 & 0.82839838859 \\ 0.0 & 0.0 & 1.25452739194 \end{array}\right) The matrix A2 is \newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr} 13.1777929528 & 0.412314788263 & 0.401551394126 \\ 0.0661490220464 & 3.56769520893 & 0.841345417799 \\ -0.00436596281828 & -0.0044680141294 & 1.25451183826 \end{array}\right) ... 0.000345421989234 & 3.56334001726 & 0.842834604169 \\ -3.60119110165 \times 10^{-07} & -6.60350277778 \times 10^{-05} & 1.25620349462 \end{array}\right) Iteration Number 7 The matrix Q7 is Iteration Number 7 The matrix Q7 is \newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr} -0.999999999657 & 2.62071344828 \times 10^{-05} & 2.68366066777 \times 10^{-08} \\ -2.62071339811 \times 10^{-05} & -0.999999999485 & 1.85291721393 \times 10^{-05} \\ 2.73222031699 \times 10^{-08} & 1.85291714296 \times 10^{-05} & 0.999999999828 \end{array}\right) The matrix R7 is \newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr} -13.1804564926 & -0.346157842028 & -0.412328449793 \\ 0.0 & -3.56333094729 & -0.842800521956 \\ -0.0 & -0.0 & 1.2562191225 \end{array}\right) The matrix A7 is \newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr} 13.1804655487 & 0.345804779749 & -0.412335217459 \\ 9.33616643875 \times 10^{-05} & 3.56331532906 & -0.842866547384 \\ 3.43226740909 \times 10^{-08} & 2.3276699474 \times 10^{-05} & 1.25621912228 \end{array}\right) Iteration Number 8 The matrix Q8 is \newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr} -0.999999999975 & 7.08333588542 \times 10^{-06} & -2.55778745488 \times 10^{-09} \\ -7.08333586857 \times 10^{-06} & -0.999999999954 & -6.53206714223 \times 10^{-06} \\ -2.60405628036 \times 10^{-09} & -6.53206712395 \times 10^{-06} & 0.999999999979 \end{array}\right) The matrix R8 is \newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr} -13.180465549 & -0.3458300199 & 0.412341184485 \\ 0.0 & -3.5633128796 & 0.842855420928 \\ 0.0 & 0.0 & 1.25622462897 \end{array}\right) The matrix A8 is \newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr} 13.1804679972 & 0.345733964779 & 0.412343477174 \\ 2.5237947088 \times 10^{-05} & 3.56330737384 & 0.842878696709 \\ -3.27127963462 \times 10^{-09} & -8.20574359921 \times 10^{-06} & 1.25622462895 \end{array}\right) Iteration Number 9 The matrix Q9 is \newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr} -0.999999999998 & 1.91479901175 \times 10^{-06} & 2.43782023435 \times 10^{-10} \\ -1.91479901118 \times 10^{-06} & -0.999999999996 & 2.30282107451 \times 10^{-06} \\ 2.48191462951 \times 10^{-10} & 2.30282107404 \times 10^{-06} & 0.999999999997 \end{array}\right) The matrix R9 is \newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr} -13.1804679972 & -0.345740787796 & -0.412345090804 \\ 0.0 & -3.56330671184 & -0.84287501429 \\ -0.0 & -0.0 & 1.25622657004 \end{array}\right) The matrix A9 is \newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr} 13.1804686591 & 0.34571460029 & -0.412345890196 \\ 6.82280697398 \times 10^{-06} & 3.56330477083 & -0.842883219946 \\ 3.11784710217 \times 10^{-10} & 2.89286501927 \times 10^{-06} & 1.25622657004 \end{array}\right) WARNING: Output truncated! full_output.txt The actual eivenvalues of A are Iteration Number 0 The matrix Q0 is The matrix R0 is The matrix A0 is Iteration Number 1 The matrix Q1 is The matrix R1 is The matrix A1 is Iteration Number 2 The matrix Q2 is The matrix R2 is The matrix A2 is ... 0.000345421989234 & 3.56334001726 & 0.842834604169 \\ -3.60119110165 \times 10^{-07} & -6.60350277778 \times 10^{-05} & 1.25620349462 \end{array}\right) Iteration Number 7 The matrix Q7 is Iteration Number 7 The matrix Q7 is The matrix R7 is The matrix A7 is Iteration Number 8 The matrix Q8 is The matrix R8 is The matrix A8 is Iteration Number 9 The matrix Q9 is The matrix R9 is The matrix A9 is
The actual eivenvalues of A are
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left[13.1804689044, 3.56330346867, 1.25622762694\right]</script></html>
Iteration Number 0
The matrix Q0 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
-0.894427191 & 0.314676219522 & -0.31777173705 \\
-0.2683281573 & -0.946058827723 & -0.181583849743 \\
-0.3577708764 & -0.0771464280117 & 0.930617229931
\end{array}\right)</script></html>
The matrix R0 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
-11.1803398875 & -4.7404641123 & -4.9193495505 \\
0.0 & -3.94055833607 & 0.0812067663282 \\
0.0 & 0.0 & 1.33918089185
\end{array}\right)</script></html>
The matrix A0 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
13.032 & 1.34608107814 & -0.164443701815 \\
1.02830934109 & 3.72173518805 & 0.791114168732 \\
-0.479119921336 & -0.103313022268 & 1.24626481195
\end{array}\right)</script></html>
Iteration Number 1
The matrix Q1 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
-0.996232453991 & 0.0790956260904 & 0.0355637392449 \\
-0.0786092033716 & -0.996794511229 & 0.0148760051455 \\
0.0366263670188 & 0.0120243219007 & 0.999256686203
\end{array}\right)</script></html>
The matrix R1 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
-13.0812843406 & -1.63735627471 & 0.147281450427 \\
0.0 & -3.60457835109 & -0.786599549427 \\
-0.0 & -0.0 & 1.25125883164
\end{array}\right)</script></html>
The matrix A1 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
13.1661056568 & 0.599206332142 & -0.342404731552 \\
0.254542748875 & 3.58356558947 & -0.839636585227 \\
0.045829065203 & 0.0150455389727 & 1.25032875368
\end{array}\right)</script></html>
Iteration Number 2
The matrix Q2 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
-0.999807111701 & 0.0193418421557 & -0.00341065019922 \\
-0.0193294552839 & -0.999806585683 & -0.00362813765143 \\
-0.00348016539642 & -0.00356151181562 & 0.999987601964
\end{array}\right)</script></html>
The matrix R2 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
-13.1686457345 & -0.668411484034 & 0.354217052652 \\
0.0 & -3.57133630715 & 0.82839838859 \\
0.0 & 0.0 & 1.25452739194
\end{array}\right)</script></html>
The matrix A2 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
13.1777929528 & 0.412314788263 & 0.401551394126 \\
0.0661490220464 & 3.56769520893 & 0.841345417799 \\
-0.00436596281828 & -0.0044680141294 & 1.25451183826
\end{array}\right)</script></html>
Iteration Number 3
The matrix Q3 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
-0.999987346489 & 0.00502006948539 & 0.000325214070543 \\
-0.00501967099239 & -0.999986663533 & 0.00121476745407 \\
0.000331307950364 & 0.00121311961536 & 0.999999209288
\end{array}\right)</script></html>
The matrix R3 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
-13.1779597003 & -0.430219707472 & -0.405353960534 \\
0.0 & -3.56558319982 & -0.837796508404 \\
-0.0 & -0.0 & 1.2556634755
\end{array}\right)</script></html>
The matrix A3 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
13.1798182172 & 0.363567953649 & -0.410161914829 \\
0.0176204859151 & 3.56451930016 & -0.842127200374 \\
0.000416011292415 & 0.00152326999242 & 1.25566248263
\end{array}\right)</script></html>
Iteration Number 4
The matrix Q4 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
-0.999999105813 & 0.00133694143112 & -3.09971638507 \times 10^{-05} \\
-0.0013369281631 & -0.999999016346 & -0.00042418069644 \\
-3.15642381076 \times 10^{-05} & -0.000424138876162 & 0.999999909555
\end{array}\right)</script></html>
The matrix R4 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
-13.1798300024 & -0.368333182873 & 0.41124777761 \\
0.0 & -3.56403037093 & 0.841045434281 \\
0.0 & 0.0 & 1.25603229702
\end{array}\right)</script></html>
The matrix A4 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
13.1802976715 & 0.350537733605 & 0.41181251759 \\
0.00473830561868 & 3.56367014509 & 0.842557151098 \\
-3.96457024939 \times 10^{-05} & -0.000532732126881 & 1.25603218342
\end{array}\right)</script></html>
Iteration Number 5
The matrix Q5 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
-0.999999935376 & 0.00035949955706 & 2.95431498575 \times 10^{-06} \\
-0.000359499112279 & -0.99999992425 & 0.000149199140331 \\
3.00795178683 \times 10^{-06} & 0.000149198068615 & 0.999999988865
\end{array}\right)</script></html>
The matrix R5 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
-13.1802985233 & -0.351818848808 & -0.412111611441 \\
0.0 & -3.56354393647 & -0.84222164328 \\
-0.0 & -0.0 & 1.25615909486
\end{array}\right)</script></html>
The matrix A5 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
13.1804229104 & 0.34701902442 & -0.412203036675 \\
0.00127855751963 & 3.56341800869 & -0.842753311594 \\
3.77846599392 \times 10^{-06} & 0.000187416510826 & 1.25615908087
\end{array}\right)</script></html>
Iteration Number 6
The matrix Q6 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
-0.999999995295 & 9.70043009362 \times 10^{-05} & -2.81573350399 \times 10^{-07} \\
-9.70042860007 \times 10^{-05} & -0.999999993913 & -5.25671697234 \times 10^{-05} \\
-2.86672590236 \times 10^{-07} & -5.25671421623 \times 10^{-05} & 0.999999998618
\end{array}\right)</script></html>
The matrix R6 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
-13.1804229725 & -0.347364689661 & 0.412284425313 \\
0.0 & -3.56338433451 & 0.842647288304 \\
0.0 & 0.0 & 1.25620349636
\end{array}\right)</script></html>
The matrix A6 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
13.1804564881 & 0.346064457216 & 0.412306395978 \\
0.000345421989234 & 3.56334001726 & 0.842834604169 \\
-3.60119110165 \times 10^{-07} & -6.60350277778 \times 10^{-05} & 1.25620349462
\end{array}\right)</script></html>
Iteration Number 7
The matrix Q7 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
-0.999999999657 & 2.62071344828 \times 10^{-05} & 2.68366066777 \times 10^{-08} \\
-2.62071339811 \times 10^{-05} & -0.999999999485 & 1.85291721393 \times 10^{-05} \\
2.73222031699 \times 10^{-08} & 1.85291714296 \times 10^{-05} & 0.999999999828
\end{array}\right)</script></html>
The matrix R7 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
-13.1804564926 & -0.346157842028 & -0.412328449793 \\
0.0 & -3.56333094729 & -0.842800521956 \\
-0.0 & -0.0 & 1.2562191225
\end{array}\right)</script></html>
The matrix A7 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
13.1804655487 & 0.345804779749 & -0.412335217459 \\
9.33616643875 \times 10^{-05} & 3.56331532906 & -0.842866547384 \\
3.43226740909 \times 10^{-08} & 2.3276699474 \times 10^{-05} & 1.25621912228
\end{array}\right)</script></html>
Iteration Number 8
The matrix Q8 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
-0.999999999975 & 7.08333588542 \times 10^{-06} & -2.55778745488 \times 10^{-09} \\
-7.08333586857 \times 10^{-06} & -0.999999999954 & -6.53206714223 \times 10^{-06} \\
-2.60405628036 \times 10^{-09} & -6.53206712395 \times 10^{-06} & 0.999999999979
\end{array}\right)</script></html>
The matrix R8 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
-13.180465549 & -0.3458300199 & 0.412341184485 \\
0.0 & -3.5633128796 & 0.842855420928 \\
0.0 & 0.0 & 1.25622462897
\end{array}\right)</script></html>
The matrix A8 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
13.1804679972 & 0.345733964779 & 0.412343477174 \\
2.5237947088 \times 10^{-05} & 3.56330737384 & 0.842878696709 \\
-3.27127963462 \times 10^{-09} & -8.20574359921 \times 10^{-06} & 1.25622462895
\end{array}\right)</script></html>
Iteration Number 9
The matrix Q9 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
-0.999999999998 & 1.91479901175 \times 10^{-06} & 2.43782023435 \times 10^{-10} \\
-1.91479901118 \times 10^{-06} & -0.999999999996 & 2.30282107451 \times 10^{-06} \\
2.48191462951 \times 10^{-10} & 2.30282107404 \times 10^{-06} & 0.999999999997
\end{array}\right)</script></html>
The matrix R9 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
-13.1804679972 & -0.345740787796 & -0.412345090804 \\
0.0 & -3.56330671184 & -0.84287501429 \\
-0.0 & -0.0 & 1.25622657004
\end{array}\right)</script></html>
The matrix A9 is
<html><script type="math/tex; mode=display">\newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrr}
13.1804686591 & 0.34571460029 & -0.412345890196 \\
6.82280697398 \times 10^{-06} & 3.56330477083 & -0.842883219946 \\
3.11784710217 \times 10^{-10} & 2.89286501927 \times 10^{-06} & 1.25622657004
\end{array}\right)</script></html>