When does there exist an isometry that switches two subspaces?

Let $V$ be a real vector space of finite dimension and let $\langle \cdot, \cdot \rangle$ be a non-degenerate symmetric bilinear form on $V$. Let $U, W \subseteq V$ be linear subspaces such that the bilinear forms $\langle \cdot, \cdot \rangle \vert_U$ and $\langle \cdot, \cdot \rangle \vert_W$ are isometric and non-degenerate.

It is quite easy to prove that there exists an isometry $f$ of $V$ such that $f(U) = W$. I would like to know whether there are some sufficient conditions such that there exists an isometry $f$ of $V$ such that $f(U) = W$ and $f(W) = U$.

Thanks to all!

EDIT. Since I have not received any answer, I want to say that I'm interested in a very particular case: $V = \mathbb{R}^{n+1}$, $\langle \cdot , \cdot \rangle$ is the Lorentzian scalar product on $\mathbb{R}^{n+1}$, i.e. $\langle x, y \rangle = \sum_{i=1}^n x_i y_i - x_{n+1} y_{n+1}$, and $U$ and $W$ are $2$-dimensional subspaces of $\mathbb R^{n+1}$ such that $\langle \cdot, \cdot \rangle \vert_U$ and $\langle \cdot, \cdot \rangle \vert_W$ have signature $(1,1)$.

-
Wait, what is the isometry of $\mathbb R^3$ under the usual dot product that maps the two-dimensional subspace $U = \{(x,y,0)\}$ to a one-dimensional subspace $W = \{(x,0,0)\}$? – Rahul Mar 11 '12 at 12:25
He/she is supposing that there exists an isometry between $U$ and $W$, therefore $U$ and $W$ have the same dimension. – Andrea Mar 11 '12 at 12:29
How about a function that just swaps $U\leftrightarrow W$ and doesn't do anything to any subspaces perpendicular to $U + W$? Maybe write down bases for $U$, $W$, extend to $V$, and then define $f$ on the basis? – Neal Mar 11 '12 at 12:37
@Neal: if the symmetric form isn't positive, the orthogonal complement of a subspace F isn't necessarily a complementary subspace of F. – PseudoNeo Mar 11 '12 at 14:44

If the scalar product

• restricted to $U$ and $V$ is definite and has the same sign, and
• is not degenerate on $U+V$

then the answer is yes. This also applies to some of your cases since you can switch the orthogonal complements $U^{\perp}$ and $V^{\perp}$. It would be nice if the second condition could be dropped, but I'll need to think about that some more.

Let $\pi_U$ and $\pi_V$ be the orthogonal projections onto $U$ and $V$ with respect to the scalar product. Then $\pi_U \pi_V$ maps $U$ into $U$ and its restriction to $U$ is self adjoint. That is, for all $v, w \in U$

$$\langle \pi_U\pi_V v, w \rangle = \langle v, \pi_U\pi_V w \rangle.$$

This means that $U$ has an orthonormal basis $u_1, \dotsc, u_k$ of eigenvectors for eigenvalues $0 \leq \lambda_1, \dotsc, \lambda_k \leq 1$. Likewise, $V$ has an orthonormal basis of eigenvectors $v_1, \dotsc, v_k$ for the same eigenvalues. That the eigenvalues are the same follows from

$$\pi_V\pi_U(\pi_V u_j) = \pi_V(\pi_U\pi_V u_j) = \lambda_j \pi_Vu_j$$

and

$$\langle \pi_Vu_j, \pi_Vu_j \rangle = \langle \pi_Vu_j, u_j \rangle = \langle \pi_Vu_j, \pi_Uu_j \rangle = \langle \pi_U\pi_Vu_j, u_j \rangle = \lambda_j.$$

In fact, for any eigenvalue $\lambda_j \neq 0$ the projection $\pi_V$ is $\lambda_j^{1/2}$ times an isometry from the eigenspace in $U$ onto the eigenspace in $V$. In particular we can chose the basis $(v_j)$ such that $\pi_Vu_j = \lambda_j^{1/2}v_j$ for all $j$.

Now define $f$ by

$$f(x) = \begin{cases} v_j & \textrm{if }x = u_j\\ u_j & \textrm{if }x = v_j\\ x & \textrm{if } x \in U^{\perp} \cap V^{\perp} \end{cases}.$$

Then $f$ switches the subspaces $U$ and $V$ and by the observations above one can check that it is also an isometry.

-
Added the non-degeracy condition on $U+V$ since the definition of $f$ at the end is incorrect otherwise. I'll have to think about if and how it can be dropped. – WimC Mar 16 '12 at 6:13