In reply to Rick Wicklin.

Well, I was wrong. I tried running the code multiple times, and saw that the method I said of finding smallest eigenvalue from the Power method by using the shift lambda_max is very unstable. It's better not to use that. Instead using inverse Power method gives very stable results.

I guess the post where I learnt it from, needs some modification -_-