Off[General::spell1]; 
Clear[InvPower,A0,X0,n,m,M];
InvPower[A0_,X0_,M_]:=
Module[{A, Y, n },
  A=A0;
  X=X0; 
  n=Length[A]; 
    m=0; z=0;
   LU=GaussLU[A];
   Y=GaussSol[LU,X];  
    For[i=1, i<=n, i++,
      If[Abs[Y[[i]]] >= z, z=Abs[Y[[i]]]; m=i] ];
 Clear[Y];
 lambda = 0;
 For[k=1, k<=M, k++,
    Y=GaussSol[LU,X];
    lambda = Y[[m]]/X[[m]];
    X = Y / Max[Abs[Y]];
    Print[N[{lambda,X},digit]  ]; ];
 Return[N[{lambda,X},digit]]; ];
On[General::spell1];

Clear[digit]; 
digit=10;

Clear[A,X];
A = {{6,5,-5},{2,6,-2},{2,5,-1}};
TableForm[A] 
X = {3,7,-13}

InvPower[A,X, 11]

Eigensystem[A] //N

Clear[A,X];
A = {{4,-1,1},{-1,3,-2},{1,-2,3}}; 
TableForm[A]
X = {1,1,1}

InvPower[A,X, 10]

Eigensystem[A]

norm[V_] :=N[ Sqrt[V^2/.List->Plus], digit];  
norm[A.X-lambda X]