TITLE: Approximate the second largest eigenvalue (and corresponding eigenvector) given the largest
QUESTION [10 upvotes]: Given a real-valued matrix $A$, one can obtain its largest eigenvalue $\lambda_1$ plus the corresponding eigenvector $v_1$ by choosing a random vector $r$ and repeatedly multiplying it by $A$ (and rescaling) until convergence. 
Once we have the first eigenpair, is there a similar way to estimate the second eigenpair?

REPLY [8 votes]: $A=\sum_{i=1}^n \lambda_i v_iv_i^\top$ where $(\lambda_i,v_i)$ are the eigenvalue/vector pairs of $A$.
So, if you know that $|\lambda_1| \ge |\lambda_2| \ge \dots \ge |\lambda_n|$, then you can obtain $\lambda_2$ by computing the largest eigenvalue/vector pair in absolute value of $$B=A-\lambda_1 v_1v_1^\top$$