[Math] How to find perpendicular point of a vector to another vector 2d

geometrytrigonometry

Given the axis x-y and some random points to the vectors AB and CD, how can i find out where will the point D lie when the vector CD(dashed line) is perpendicular to AB. For example if point A has coordinates (2,1), B (10,7), C (6,3), D (6,14), what will the coordinates of D be, if the vector CD is perpendicular to the vector AB.

enter image description here

I am not looking for a straight solution, but for some guidelines on how can I achieve that, since I am not very good in geometry. I guess it can be managed by using the angle between points of the vector AB, but I am not sure.
Thank you in advance!

Best Answer

You know two things:

  1. The dashed line $\vec{CD}$ is perpendicular to $\vec{AB}$
  2. The dashed $\vec{CD}$ and the bold $\vec{CD}$ have the same length. Actually, just call the bold one something else, like $\vec{CE}$.

The first condition means that $<B-A,C-D> = 0$. The second condition means that $\|C-E\| = \|C-D\|$. You have two unknowns, namely the coordinates of $D$. You can use these two conditions to solve for these unknowns.

Note on inner products: You can think of an inner product as a function that captures the notion of angle. In your case, we can use the traditional dot product, a type of inner product. In the plane, for example, the dot product of $A = (a_1,a_2)$ and $B=(b_1,b_2)$ is written $A\cdot B$ and is given by \begin{equation} a_1b_1 + a_2b_2. \end{equation} A very important fact is that when two vectors are perpendicular (orthogonal), they have dot product equal to $0$.

So, let the coordinates of $D$ be $(x,y)$. Expand the first condition using the formula for the dot product I gave above. Expand the second condition using the definition of the Euclidean norm (in this case, the familiar distance formula). This will give you a system of two equations in two unknowns. Solve it for $x$ and $y$.

Note: Once you use these conditions to write a system of equations, you may want to think about how many solutions this system has and what this means geometrically.