Equality of span of leading eigenvectors

Question: Assume $A$ is a full rank real $n\times n$ matrix and $B$ is a real symmetric, positive definite matrix of size $n\times n$. What conditions on $A$ ensures that the span of the first $p$ eigenvectors of $A'BA$ equals the span of the first $p$ eigenvectors of $B$? Here, first is in the sense of ordering by size of corresponding absolute eigenvalues.

I've spent considerable time on this. Tried SVD decomposition on $A$ after assuming $B$ diagonal and so on but just can't seem to quite get there. Here are some things I've done so far:

If we take $B$ to be diagonal, with entries sorted in descending order, then the first $p$ eigenvectors are the first $p$ standard basis vectors for $\mathbb R^n$. If in addition $A$ is orthogonal, then $A'BA$ is an eigendecomposition in itself and thus it suffices that the first $p$ columns of $A$ can all be written as $a_i = \sum_{j = 1}^pc_i e_i$.

Also if $A$ is symmetric with same eigenvectors as $B$, viz. $A'BA = U'DUU'\Lambda UU'DU = U'D\Lambda D U$, then we get the same first $p$ eigenvectors as long as the ordering of the diagonal $\Lambda$ is not changed by multiplication by $D^2$.

Both these are obviously most stronger conditions on $A$ than what I want.

• First of all, I could not understand how could this be a valid matrix multiplication? Commented Sep 18, 2015 at 15:56
• Yeah, typo, I'll fix it
– KOE
Commented Sep 18, 2015 at 16:00
• What do you mean by first $p$? Commented Sep 18, 2015 at 16:13
• Ordered by eigenvalue, descending.
– KOE
Commented Sep 18, 2015 at 16:14