I have some vectors, and I'm trying to obtain a particular combination of them. I've managed to work out the solution with some trigonometry, but it would be cleaner if I could work this out with only vector arithmetic and vector projections.
I have three vectors: $q, n$ and $v$. I would like to obtain the projection of $q$ onto the hyperplane (passing through the origin) to which $n$ is normal, "along" the direction $v$. In other words, I want a vector $u$ so that:
- $u\cdot n = 0\ \ \ \ \ \ \ $ ($u$ lies in the hyperplane)
- $q-u = \lambda v\ \ \ $ ($u$ lies "along" the direction of $v$ from $q$)
Here's an illustration. Note that $q$ and $u$ are to scale, but $v$ and $n$ are of arbitrary (e.g. unit) length. In other words, $q+v \neq u$ in general. Also note that $q$, $n$ and $v$ may be of high dimension.
If it is helpful, using some trigonometry and the projection of $q$ onto $n$, I've gotten that:
$$u = q - \frac{q\cdot n}{v\cdot n} v$$
But I would like to employ only vector operations in my arguments to get to this result if possible. How can we employ geometric reasoning to get this result from projections and vector arithmetic?

Only using analytic geometry, an argument for your formula can be set up as follows.
Here we use the property that two vectors $a,b$ are orthogonal $(a \perp b)$ if and only if their dot product is equal to zero $(a\cdot b = 0)$.
Hence, the searched for $u$ is the one you found: $$\boxed{u = q-\frac{q\cdot n}{v\cdot n}v}$$