The problem states:

Find the intersection of the triangle $A(1, 0, -1), B(2, -1, 2), C(0, 0, 1)$ and the line $\frac{x+1}{2} = \frac{y}{-1} = \frac{z-1}{0}$

The method that I've tried using is first finding the equation of a plane that the triangle lies on. The normal vector I've found by taking the cross product of any two vectors from the same point of the triangle, for example:

$$\vec{AB} \times \vec{AC} = \Bigg{|} \begin{matrix}e_1 && e_2 && e_3 \\ 1 && -1 && 3 \\ -1 && 0 && 2 \end{matrix} \Bigg{|}$$

giving me the vector $\vec{n_{\alpha}} = (2,5,1)$. Then the equation of the plane becomes:

$$\alpha: 2x+5y+z-1=0$$

Now by transforming the line into parametric form and substituting the coordinates into the plane equation I've found the intersection of the line and the plane to be the point $M(-5,2,1)$

And now I'm stuck, because I don't know how to determine whether the point $M$ is inside the triangle. I remember that in 2D this can be done by checking the orientations of the triangles $AMC, ABM $ and $BCM$, and if they're the same that would mean the point lies inside the triangle $ABC$. However, since it's 3D here I can't do that.

So, any ideas?


  • $\begingroup$ The $x$ coordinate lies on the left of all $x$ coordinates of the corners. $\endgroup$ May 13, 2019 at 8:33
  • 2
    $\begingroup$ Is the line seriously given as $\frac{x+1}{2} = \frac{y}{-1} = \frac{z-1}{\color{red}{0}}$...?! $\endgroup$
    – StackTD
    May 13, 2019 at 8:42
  • $\begingroup$ Why can’t you check the triangles’ orientation? $\endgroup$
    – amd
    May 13, 2019 at 19:48

2 Answers 2


If the point lies in the triangle it will be a convex linear combination of the vertices, i.e, $M = \lambda_1 A + \lambda_2 B + (1-\lambda_1-\lambda_2) C$, for some $\lambda_1, \lambda_2 \in [0,1]$. So you just have to solve the previous system and, if you get a solution satisfying $\lambda_i \in [0,1]$, the point $M$ lies in the triangle. This is equivalent to the solution proposed by Cesareo.

You should however review your question... The equation for the line is wrong so I cannot say if the rest of your calculations are ok. However, like Stan pointed out, Looking at the x-coordinates of $M,A,B,C$ you can immediately realize that the point you proposed is not inside the triangle.

  • $\begingroup$ The equation for the line is given as a part of the problem, so how is it wrong exactly? $\endgroup$
    – Koy
    May 13, 2019 at 11:12
  • $\begingroup$ Problems can also be wrong... the term $\frac{z-1}{0}$ does not make any sense. $\endgroup$ May 13, 2019 at 13:54
  • $\begingroup$ It's a convention that is used at our faculty. It simply means that the third component of the direction vector is $0$ and that the $z$ coordinate expressed by some parameter is $z-1 = 0t$ or $z = 1$ $\endgroup$
    – Koy
    May 13, 2019 at 13:56
  • $\begingroup$ @Koy Ok but let me tell it is a really bad convention... An equal sign should stand for something. Anyway, this does not affect my answer. If you computed the intersection point correctly, you juist need to solve the linear system I mentioned and if both components of the solution $\lambda_1, \lambda_2$ belong to $[0,1]$ the point is in the triangle, otherwise it is not. $\endgroup$ May 13, 2019 at 14:02


If $M$ is interior to $ABC$ then the two linear systems

$$ M-A = \alpha_1(B-A)+\beta_1(C-A)\\ M-B = \alpha_2(A-B)+\beta_2(C-B) $$

have a solution with $\alpha_i \ge 0$ and $\beta_i \ge 0$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.