make two sets of eigenvectors orthogonal

Suppose that $v_1,v_2,v_3$ are orthogonal eigenvectors of $A$ and $u_1,u_2$ are orthogonal eigenvectors of $B$. Is there any way to choose $v_1,v_2,v_3$ and $u_1,u_2$ such that $v_1,v_2,v_3,u_1,u_2$ are orthogonal eigenvectors?

• Is $A$ symmetric? Do $v_1,v_2,v_3$ span the same eigenspace? If so, Gram-Schmidt. – Element118 Dec 11 '15 at 23:03
• Is there any other information about $A$ and $B$? Clearly if $A$ and $B$ are both tranformations $\mathbb R^3 \to \mathbb R^3$ then the answer is no. – David K Dec 11 '15 at 23:06
• I forgot to mention, yes $A,B$ are symmetric. Let's say that $A,B$ are 10x10 and $v_1,v_2,v_3$ correspond to 3 different eigenvalues of $A$ while $u_1,u_2$ correspond to 2 different eigenvalues of $B$. – Tomas Jorovic Dec 12 '15 at 0:30

Without any further information on $A$ and $B$, I'd say that this isn't possible in general. In particular when the dimension of the eigenspaces is one (for each of the 3 eigenvectors of $A$ and $B$). One easy example to see this is considering a 10x10 matrix $A$ with 10 distinct eigenvalues and taking $B=2A$, and taking the eigenvectors corresponing to the 3 largest eigenvalues of $A$ and the 2 largest eigenvalues of $B$.