Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

enter image description here

Knowing the two vectors in black, and the point x,y at the end of the two red vectors.

I'm having trouble figuring out a formula to get the perpendicular/parallel vectors represented in red in order to calculate their lengths.

My end goal is to figure out the ratio of length between one of the black vectors and its parallel red vector passing through the point x,y

[EDIT] It would be great if the solution is in terms of x,y coordinates and was solved from three sets of points, the x,y point represented then the two end points of the black vectors

share|cite|improve this question
up vote 7 down vote accepted

Your diagram may be somewhat misleading in that the point $x,y$ seems to lie halfway between the tips of the two black vectors. If that were the case, then the ratio would trivially be $2$. Also, it's not clear (to me) what you're referring to as "perpendicular", since there are no right angles in the diagram.

For general position of $x,y$, you can find two vectors parallel to the two black vectors that add up to $(x,y)$ by solving a linear system of equations:

$$a\vec v+b\vec w=\vec x\;,$$

where $\vec v$ and $\vec w$ are the two black vectors, $\vec x=(x,y)$, and $a$ and $b$ are parameters to be determined by solving the resulting $2\times2$ system of equations. The two desired vectors are then $a\vec v$ and $b\vec w$.

[Edit in response to the comment:]

If we denote the components of the black vectors by $(x_1,y_1)$ and $(x_2,y_2)$, respectively, the above linear system of equations becomes

$$ \begin{eqnarray} ax_1+bx_2&=&x\\ ay_1+by_2&=&y\;. \end{eqnarray} $$

This can be solved explicitly using Cramer's rule:



Then the components of the two red vectors are $(ax_1,ay_1)$ and $(bx_2,by_2)$, respectively (where $a$ and $b$ are determined as above).

share|cite|improve this answer
Thank you very much for this, is there a possibility you could list the solution based on x,y coordinates, where i have the x,y coordintates of each of the black vectors and the point I want to solve for? I not having much success converting the points i have into the mathematical representation of vectors – Tristan Jul 16 '11 at 17:02
I edited the answer. I hope this is what you need -- I'm not sure I understand the distinction between coordinates and "the mathematical representation of vectors" that you're making. – joriki Jul 16 '11 at 17:49
Admittedly very nitpicky, but if you're using $|\cdot|$, there's no need for $\det$, no? :) – J. M. Jul 16 '11 at 17:56
@J. M.: You're quite right -- at first I used parentheses, then I thought it looked weird, and I checked the Wikipedia article, wondered why the notation should be so redundant, and then copied it mindlessly :-) – joriki Jul 16 '11 at 18:09
I've corrected the notation in the Wikipedia article. – joriki Jul 18 '11 at 4:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.