# Find all unit vectors orthogonal to line with two given points

I have a line $L$ in $\mathbb{R}^2$ that passes through two points:

$[9;7]$ and $[1;-5]$

How do I find all unit vectors orthogonal to $L$?

-
It is probably preferable to say that a line passes through points. – 1015 Feb 14 '13 at 22:42

Your line has direction given by $$\vec{u}=(9-1,7-(-5))=(8,12).$$ (ie the vector $\vec{AB}$, where $A,B$ are your two points). The set you are looking for is the set of vectors $$\vec{v}=(x,y)$$ such that $$\vec{u}\cdot\vec{v}=8x+12y=0$$ (ie $\vec{v}$ and $\vec{AB}$ are orthogonal) and $$x^2+y^2=1$$ (ie $\vec{v}$ has norm $1$).

I think you can take it from here.

And let me know if you want me to expand.

Note: as pointed by @zaarcis in his/her answer, there is a faster route, when one already knows that there are exactly two solutions.

-
@Zilliput Thanks for taking the time to edit. So I'll accept it. But note that $(u,v)$ or $\langle u,v\rangle$ are extensively used notations for the inner product. – 1015 Feb 14 '13 at 22:52
Ah, thanks @julien, good to know.... – Zilliput Feb 14 '13 at 23:01
Thanks for your response. I'm a little confused. So I have my line passing through those two points. So when we say "find unit vectors orthogonal to L", that means find points perpendicular to L, right? Should we rewrite this Line in mx+b form? I know the slope is 1.5 and orthogonality gives us that it equals 0. – Allen Miller Feb 14 '13 at 23:08
@AllenMiller It is somehow more natural to compute the vector $\vec{AB}$, where where $A,B$ are the two points the line passes through. Using the equation $y=mx+b$ would work here because the line is not vertical. If your line happened to be vertical, you would be stuck since it would not have such an equation. That's why I think it is better to use a technique that works in every situation. I've added a few words. Let me know if you still need mroe explanations. – 1015 Feb 14 '13 at 23:11

Calculate vector from one point to another, then swap both coordinates of it and multiply one by $-1$ (in plane it gives orthogonal vector), finally divide this vector by its length (one answer) and multiply it by $-1$ (second answer).
The slope of L is $\frac{7+5}{9-1} = \frac{3}{2}$. So the slope of vectors orthogonal to L should be $\frac{-2}{3}$. So we have $v = [\sin(\operatorname{atan}(\frac{-2}{3})), \cos(\operatorname{atan}(\frac{-2}{3}))]$.