The question is as follows:
Let $V$ be an inner product space of dimension $n$, and let $U$ and $W$ be two $m$-dimensional subspaces of $V$. Assume there is some nonzero vector $v$ in $U$, such that $v$ is orthogonal to $W$. (that is $\langle v,w\rangle =0$ for all $w$ in $W$). Prove that $w$ is orthogonal to $U$ for some nonzero $w$ in $W$.
So I got a hint that it helps to fix a basis $B$ and $A$ for $V$ and $W$ and write $v$ as a linear combination of it. Then explore what it means for $v$ to be perpendicular to every vector in $W$.
This is what I have done so far: Let $B= \{b_1,...,b_m\}$ and $A = \{a_1,...,a_m\}$ be basis for $U$ and $W$. I found an $m\times m$ matrix $M = [\langle b_i,a_j\rangle]$ such that $\langle v,w \rangle = [w]_A M [v]_B = 0$ for any $w$, so $[v]_B$ is in the nullspace of $M$. From here, I don't know how to keep going.
Can someone kindly suggest? Thanks, and sorry for the messy notation.
We wish to show that $W \cap U^\perp$ is nontrivial. We have \begin{align} \dim(W \cap U^\perp) &= \dim V - \dim\big((W \cap U^\perp)^\perp\big) \\ &= \dim V - \dim (W^\perp + U) \\ &= \dim V - \dim (W^\perp) - \dim U + \dim(W^\perp \cap U)\\ &\ge \dim W - \dim U + 1\\ &= 1 \end{align}
since $v \in W^\perp \cap U$, $v \ne 0$ so $\dim(W^\perp \cap U) \ge 1$.
We conclude $\dim(W\cap U^\perp) \ge 1$ so there exists $w \in W \cap U^\perp$, $w \ne 0$.