Equation of a line passing through a given point, perpendicular with a line I need the equation  of the line passing through a given point $A(2,3,1)$ perpendicular to the given line
$$
\frac{x+1}{2}= \frac{y}{-1} = \frac{z-2}{3}.
$$
I think there must bee some kind of rule to do this, but I can't find it anyway.
 A: Imagine you put point A in a plane that is perpendicular to given line, then the line you're looking for be in this plane, and could be found using the plane line intersection point and point A.

something like this. 


*

*So normal vector of the plane is the direction vector of the given line. 

*Point A is located in this plane

*I can construct equation of the plane

*I can find intersection point B, where line intersects the plane

*Line you're looking for is the line passing through the points A and B.

Calculus would look something like this:
$\vec c=(2,-1,3)=\vec{n_{\pi}}$
$2(x-x_A)-1(y-y_A)+3(z-z_A)=0$
$2(x-2)-1(y-3)+3(z-1)=0$
$2x-y+3z-4=0$
Line parametric: 
$$x(t)=2t-1$$
$$y(t)=-t$$
$$z(t)=3t+2$$
Throw it in the plane equ: 
$4t-2+t+9t+6-4=0\rightarrow t_B=0$
So coordinates of point B are: 
$$x(t_B)=2t-1=-1$$
$$y(t_B)=-t=0$$
$$z(t_B)=3t+2=2$$
We have now point B(-1,0,-2), we can construct direction vector of the line as $\vec{AB}$ we have a point on a line and that's it. 
A: Your wording (x+1)/2= y/-1 = (z-2)/3 looks strange. Why not  (x+1)/2= -y = (z-2)/3 ? Is there not a typing mistake ? If it's OK, an analylical method is shown below :

A: 
The system looks over determined by the line's equation. However, one chooses the line between (2,3,1) and (-1,0,2). (I minimized the distance and got a result in agreement.) I thought it a bit of a trick question.  
