Calculate a vector that lies on plane X and results in vector b when projected onto plane Y.

39 Views Asked by At

I'm working on a computer program and ran into this problem that I'm struggling to figure out.

Given:

  • two planes X and Y that belong to $\mathbf{R^3}$ that both pass through the origin and are defined by perpendicular vectors x and y respectively
  • vector b that lies on plane Y

How would you find vector a that lies on plane X and results in vector b when it is projected onto plane Y?

I tried projecting b onto X to find a, but I'm pretty sure that doesn't work.

1

There are 1 best solutions below

3
On BEST ANSWER

The projection of $\mathbf a$ on $Y$ is $$ \mathbf a - <\mathbf a,\mathbf y>\mathbf y, $$ so you need a vector $\mathbf a\in X$ that can be written as $\mathbf b + \lambda\mathbf y$ for some $\lambda$. The condition $\mathbf a\in X$ is equivalent to $<\mathbf a, \mathbf x>\, = 0$, so $$ 0 = <\mathbf b + \lambda\mathbf y, \mathbf x> \implies \lambda =-\frac{<\mathbf b , \mathbf x>}{<\mathbf y, \mathbf x>}. $$ As a consequence, $$ \mathbf a = \mathbf b -\frac{<\mathbf b , \mathbf x>}{<\mathbf y, \mathbf x>}\mathbf y $$