Equation of vector that is perpendicular to and intersects a line with unknown variables So my question is:
Find the equation of the line passing through a point $B$, with position vector $b$ relative to an origin $O$, which is perpendicular to and intersects the line $r = a + \lambda c$, $c \neq0$, given that $B$ is not a point of the line. 
So far I know to let $r_1$ be the point on the line which the perpendicular line through $B$ intersects and so the vector $b-r_1$ must be perpendicular to the line with direction $c$.
And that $$\begin{align}(b-r_1)\cdot c&=0\\
(b−(a+\lambda c))\cdot c&=0 \end{align}$$
Assuming $\|c\|=1$
$$\lambda =(b−a)\cdot c$$
But now I am unsure where to go from here...
Thanks
 A: Let the lines be 
$$
r = a + \lambda c \\
s = b + \mu f
$$
You want a direction vector $f$ with
$$
c \perp f \iff \\
0 = c \cdot f \quad (*)
$$
For example $f = (c_y, -c_x)$ would do the job, if we work in two dimensions:
$$
(c_x, c_y) \cdot (c_y, -c_x) = c_x c_y + c_y (-c_x) = 0
$$
For more dimensions, we need to ensure that there is an intersection:
$$
a + \lambda c = b + \mu f
$$
for at least one $\lambda$ and $\mu$.
This gives
$$
\lambda c - \mu f = b -a
$$
then for any $f$ with $c \perp f$ we can multiply both sides by $c$ and get
$$
\lambda c^2 = (b-a)\cdot c \Rightarrow \\
\lambda = \frac{(b-a)\cdot c}{c^2} \\
$$
which gives
$$
\mu f = \frac{(b-a)\cdot c}{c^2} c - (b - a)
$$
If we choose 
$$
f = \frac{(b-a)\cdot c}{c^2} c - (b - a)
$$
and $f \ne 0$ then $\mu = 1$.

A: Sketch (for 2 or 3 dimensions): To describe a line, in general, you need two things


*

*A point on the line

*A direction for the line.


You already know a point on the line, $\vec{b}$, so we're half-way there.  
Now, we need the direction for the line.  The new line must be perpendicular to the given line, so the direction vector for the new line must be perpendicular to $\vec{c}$.  If we're working in two dimensions and $\vec{c}=\langle c_1,c_2\rangle$, then you can use $\vec{c}^\perp=\langle -c_2,c_1\rangle$ and your line is $\vec{b}+\mu\vec{c}^\perp$.
In three dimensions, you need to find a vector that is perpendicular to $\vec{c}$ (of which there are many) such that the constructed line passes through the given line.  The most straight-forward approach is as follows:


*

*Find the vector between $\vec{b}$ and $\vec{a}$.  This vector is $\vec{b}-\vec{a}$.

*Find a vector perpendicular to both the vector between $\vec{b}$ and $\vec{a}$ and the line, $\vec{c}$.  In other words, use the cross product to get $(\vec{b}-\vec{a})\times\vec{c}$.  Call this vector $\vec{d}$.

*Find a vector perpendicular to both $\vec{c}$ and $\vec{d}$ by using the cross product.  $\vec{c}\times\vec{d}$.  Call this vector $\vec{c}^\perp$.

*Your desired line is $\vec{b}+\mu\vec{c}^\perp$.
The idea of what you're doing is that you consider the plane containing both the given line and $\vec{b}$.  The line that you're trying to construct lives in this plane (it intersects both $\vec{b}$ and a point on the given line, which are both in the plane).  Therefore, the direction of the new line is perpendicular to the normal to the plane and the given line.  To get the normal to the plane, you need two nonparallel vectors in the plane, a good choice would be the direction vector for the line and the direction vector from a point on the line ($\vec{a}$) to a point in the plane not on the line ($\vec{b}$).  Now, just take cross products and use the property that the cross product of two nonparallel vectors is perpendicular to both inputs.
