%% Inverse power iteration
A = [-2, 1, 0; 1,-2,1;0,1,-2]
x=[1;0;0]
mu=0
for i=1:10,
    y = (A-mu*eye(3))\x
    x = y/norm(y,2)
end