# compute a vector which is perpendicular to another given vector (all are in 3D)

I have a vector $v_1$ (suppose $v_1= \langle a_1, b_1,c_1\rangle$) and this $v_1$ passes through the point $(x_1,y_1,z_1)$. Now I need a second vector, $v_2$ which is perpendicular to $v_1$. Suppose that $v_2$ is passing through the second point $(x_2,y_2,z_2)$. However, my final goal is to find the intersection point of above two lines. So, could you help me to find the vector which is perpendicular to another given vector? Please anyone help me.

• The question, as stated, is unclear. Since you are in 3-dimensional space, the answer is by no means unique. Given a vector $v=(a,b,c)$ the vectors perpendicular to $v$ are those whose components $(l,m,n)$ satisfy the relation $al+bm+cn=0$. They form a plane (2-dimensional linear subspace). – Andrea Mori Apr 8 '11 at 12:19
• ok, if i explain my question in another way;I have a point (x1,y1,z1) and a vector (a,b,c). This vector goes through that point. So, I am able to get the parametric equation of respective line. Now I have another point (x2,y2,z2) which locates closer to that line. If I draw another line, passing through (x2,y2,z2) and perpendicular to the above line, then what would be the coordinates of intersection point. That is what I am expecting at the end. – niro Apr 8 '11 at 12:28

Ok, so your line $\ell$ has parametric equations $$x=x_1+at,\qquad y=y_1+bt,\qquad z=z_1+ct.$$ If $Q=(x_2,y_2,z_2)$ is a point, the equation of the plane $\pi$ perpendicular to $\ell$ and passing through $Q$ has equation $$a(x-x_2)+b(y-y_2)+c(z-z_2)=0.$$ Now just plug the former equations into the latter and solve for $t$.
• Yes, the point is that a plane described by an equation $ax+by+cy+d=0$ is perpendicular to the vector $(a,b,c)$. Then you need to fix the coefficient $d$ so that the given point belongs to the plane, but that is automatic writing the equation as in my answer. And finally, once you solved for $t$ the equation obtained plugging the parametric equation in that of the plane, the value of $t$ corresponds to the point of intersection $\ell\cap\pi$. – Andrea Mori Apr 8 '11 at 17:25