TITLE: How to find a vector orthogonal to a side (given as another vector) of a triangle
QUESTION [0 upvotes]: My question was put a little bit odd but it's kind of hard to explain what I am trying to do. I have 3 points defined in 3D space. They form a triangle and I am trying to find how does moving the points relate to the surface area of the triangle or with other words I am searching the gradient of the triangle's surface area given these 3 points. So my idea is to calculate the gradient for each point individually. 
My question is:
 If I have a point how to calculate the direction of the vector, that starts from the opposite side of the given point, which is also orthogonal to that side from which it starts .
I tried to draw my idea so it can be a little bit more clear what I am trying to achieve. 
Thanks in advance !

REPLY [1 votes]: I think there is a faster solution to your question based on your first paragraph, but feel free to disregard if it does not suit your purpose. 
Let $p_1=(x_1,y_1,z_1),p_2=(x_2,y_2,z_2),p_3=(x_3,y_3,z_3) \in \mathbb{R}^3.$ Assuming they are not collinear, the area of the triangle that spans the three points is given by
$$ \frac{1}{2} || (p_2-p_1) \times (p_3-p_1) ||$$ where the double bars mean magnitude 
and $$(p_2-p_1) \times (p_3-p_1)=\begin{vmatrix} i && j && k \\ x_2-x_1 && y_2-y_1 && z_2-z_1 \\ x_3-x_1 && y_3-y_1 && z_3-z_1 \\ \end{vmatrix}.$$
{"set_name": "stack_exchange", "score": 0, "question_id": 2146207}