# Using a subspace iteration method to obtain eigenvalues. Getting eigenvectors too but I don't understand why

I'm using an iterative subspace algorithm (dsrrit) to obtain the eigenvalues of an eigenvector equation $$-\nabla^2 \mathbf{x} = \lambda\mathbf{x}$$ where $\nabla^2$ is the usual Laplacian operator. The algorithm returns a set of eigenvalues $\lambda$ and a subspace $Q$ that spans the eigenvectors of $\lambda$.

The literature states

"the programs do not produce a set of eigenvectors corresponding to the eigenvalues computed" ... "If explicit eigenvectors are desired, they may be obtained by evaluating the eigenvectors of $T$ and applying (2)."

but I have plotted the vectors in the returned subspace $Q$ and they do indeed match the expected eigenvectors of $\lambda$. Are there particular conditions that guarantee this? (My eigenvectors are real, and my operator is represented by a symmetric matrix)

SRRIT attempts to compute a nested sequence of orthonormal bases of $Q_1, Q_2, \ldots, Q_m$. Specifically, if all goes well, the subroutine produces a matrix Q with orthonormal columns having the property that if $|\lambda_i| > |\lambda_{i+1}|$ then $q_1,\ldots,q_i$ span $Q_i$.
What this means is that if your matrix has only real eigenvalues, with $|\lambda_1|\geq|\lambda_2|\geq\cdots\geq|\lambda_n|$, then $q_i$ will be an eigenvector for $\lambda_i$, using the fact that the matrix is symmetric and the eigenvectors will be orthogonal to each other.
If $\lambda_i, \lambda_{i+1}$ are two complex conjugate eigenvalues, then the corresponding columns of $Q$ wouldn't be the eigenvectors because they would be real.
The reason that the $Q_i$ are eigenvectors of your original matrix is actually due to the symmetry of that matrix. Yes, it is true that because of the symmetry the eigenvalues are real. But also due to the symmetry, the $T$ matrix returned from dsrrit is not only upper triangular but also symmetric, itself. Thus it must be a diagonal matrix. The $T$ matrix can be thought of as representing the eigenvectors of the reduced eigen-system. In general, the eigenvectors of the original matrix are computed as $QT$. In this case, because $T$ is diagonal, it is simply selecting columns from the $Q$ matrix.
That the eigenvalues are all real is not enough for the eigenvectors to be columns of $Q$. It is easy to construct an unsymmetric matrix that has real eigenvalues. In this case, $T$ will not be diagonal so the eigenvectors must be computed as $QT$.