For calculations in 2D space, there exist a few useful equations to compute general geometry with the vector dot product . and the vector cross product x when working with homogeneous coordinates (remember even though we are working in 2D space the homogeneous representation of lines and point are 3D vectors):

1) The point where two lines cross x = l1 x l2.

2) The line between two points l = x1 x x2

3) A point lies on a line if x . l = 0

In 3D space a plane can be described by a normal vector n = [n1, n2, n3] and a point on the plane x = [x1, x2, x3] both in Euclidean coordinates.

In homogeneous coordinated the plane can be defined as p = [n1, n2, n3, -(n1*x1 + n2*x2 + n3*x3)].

Is there a short equation for finding the point where a line passes through a plane? Intuitively it feels as it should be x = l x p in homogeneous coordinates, but this computation does not exist, since there is no cross product in 4 dimensions.

At the moment I am only able to compute the intersection by defining the line with the equation l(t) = a + b(t), where a is a point on the line and b is the direction of the line in Euclidean coordinates.

For a = [a1, a2, a3], b = [b1, b2, b3] and the plane in question p = [p1, p2, p3, p4], the point of intersection x = [x1, x2, x3] can be obtained by substituting t in the line equation with t = -(p . [a1, a2, a3, 1])/(p . [b1, b2, b3, 0])

In summary, is there a elegant equation to find a point x where a line l crosses through a plane p preferably in homogeneous coordinates?


3 Answers 3



You are right, 3D points and planes are described with 4 homogeneous coordinates. A point at $\vec{r}$ is $P=(\vec{r};1)$ and a plane $W=(\vec{n};-d)=(\vec{n};-\vec{r}\cdot\vec{n})$ with normal $\vec{n}$ through point $\vec{r}$, or with minimum distance to origin $d$.

A line needs 6 coordinates (plücker coordinates) describing the direction and moment about the axis. A line along $\vec{e}$ through a point $\vec{r}$ has coordinates $L=[\vec{e};\vec{r}\times\vec{e}]$. Given a line $L=[\vec{l};\vec{m}]$, the direction is recovered by $\vec{e}=\frac{\vec{l}}{|\vec{l}|}$ and the position by $\vec{r} = \frac{\vec{l}\times\vec{m}}{|\vec{l}|^2}$

Now derive the point $P=(\vec{r};1)$ where line $L=[\vec{l};\vec{m}]$ meets plane $W=(\vec{w};\epsilon)$ as follows:

  • See that for the point to be on the plane you must have $\epsilon = - \vec{r}\cdot \vec{w}$
  • For the point to be on the line you must have $\vec{m} = \vec{r} \times \vec{l}$
  • Use the vector triple product to get $$ \vec{w} \times \vec{m} = \vec{w} \times \left( \vec{r} \times \vec{l} \right) = \vec{r} (\vec{w}\cdot\vec{l})-\vec{l}(\vec{w}\cdot\vec{r}) $$

$$ \vec{w} \times \vec{m} = \vec{r} (\vec{w}\cdot\vec{l}) - \vec{l}(-\epsilon) $$

$$ \vec{r} = \frac{\vec{w}\times\vec{m}-\epsilon \vec{l}}{\vec{w}\cdot\vec{l}} $$

  • Define the line-plane meet operator as

$$ \begin{aligned} P & = [W\times] L \\ \begin{pmatrix} \vec{p} \\ \delta \end{pmatrix} & = \begin{bmatrix} -\epsilon {\bf 1} & \vec{w}\times \\ \vec{w}^\top & 0 \end{bmatrix} \begin{pmatrix} \vec{l} \\ \vec{m} \end{pmatrix} \end{aligned}$$

where $\vec{w}\times = \begin{pmatrix}x\\y\\z\end{pmatrix} \times = \begin{bmatrix} 0 & -z & y \\ z & 0 & -x \\ -y & x & 0 \end{bmatrix}$ is the cross product matrix operator in 3×3 form.

  • The meet operator $[W\times]$ has dimensions 4×6 to work between lines and points.


  • A plane normal to the $x$ axis located at $x=3$ has coordinates $W=(1,0,0;-3)$
  • A line through $y=2$ directed towards $\hat{i}+\hat{k}$ has coordinates $L=[1,0,1;2,0,-2]$
  • The meet operator is $$ [W\times] = \left[ \begin{array}{ccc|ccc} 3 & 0 & 0 & 0 & 0 & 0 \\ 0 & 3 & 0 & 0 & 0 & -1 \\ 0 & 0 & 3 & 0 & 1 & 0 \\ \hline 1 & 0 & 0 & 0 & 0 & 0 \end{array}\right]$$
  • The point where the line meets the plane is $P=[W\times]L$ $$P=\left[ \begin{array}{ccc|ccc} 3 & 0 & 0 & 0 & 0 & 0 \\ 0 & 3 & 0 & 0 & 0 & -1 \\ 0 & 0 & 3 & 0 & 1 & 0 \\ \hline 1 & 0 & 0 & 0 & 0 & 0 \end{array}\right] \begin{bmatrix}1\\0\\1\\ \hline 2 \\ 0 \\ -2 \end{bmatrix} =\begin{pmatrix}3\\2\\3\\ \hline 1 \end{pmatrix}$$
  • The point is located at $\vec{r} = (3,2,3)$
  • $\begingroup$ Thanks, this is a very easy to code answer, exactly what I was looking for. $\endgroup$ Commented Sep 8, 2014 at 12:49
  • 1
    $\begingroup$ Note that a line between points $P_1=(\vec{p}_1;\delta_1)$ and $P_2=(\vec{p}_2;\delta_2)$ is defined by $$L=\begin{pmatrix} \delta_1 \vec{p}_2 - \delta_2 \vec{p}_1 \\ \vec{p}_1 \times \vec{p}_2 \end{pmatrix}$$ $\endgroup$ Commented Sep 8, 2014 at 12:55
  • $\begingroup$ Also in 2D lines are dual to points, but in 3D lines are dual to lines, and planes are dual to points. In 2D a line can be viewed as a 3D plane normal to the paper, or a line lying on the paper. A 2D point is either a 3D line coming out of the paper or a 3D point lying on the paper. It depends on the context. $\endgroup$ Commented Sep 10, 2014 at 19:01

To answer your question about the line and plane in $\mathbb R^3$, think of it this way: You want to find the line of intersection of a $2$-dimensional subspace $L$ and a $3$-dimensional subspace $P$ in $\mathbb R^4$. Let $\mathbf n$ be the normal vector of $P$; you want the line in $L$ orthogonal to $\mathbf n$. This is really the same as your approach.

If you want something more like your approach one dimension lower, you need two vectors orthogonal to $L$, i.e., a basis for $L^\perp$, say $\mathbf v_1$ and $\mathbf v_2$. Then compute the cross product $\mathbf n\times \mathbf v_1\times \mathbf v_2$, and, voilà! You compute the cross product of $n$ vectors in $\mathbb R^{n+1}$ exactly as in the case of $n=2$.

  • $\begingroup$ Thanks for the quick reply :). So $L$ is decomposed into two orthogonal vectors $\mathbf a$ and $\mathbf b$ (would this translate to a point on the line and the direction of the line?). So when you apply $\mathbf v\times \mathbf a\times \mathbf b$ what does the answer represent? I know it is not the point of intersection on the surface. How do I manipulate this value to get to the point on the surface? $\endgroup$ Commented May 29, 2013 at 1:03
  • $\begingroup$ If you're talking about my second paragraph, you want two vectors perpendicular to the plane $L\subset\mathbb R^4$, so they need to be vectors in $\mathbb R^4$ perpendicular to your $\mathbf a$ and $\mathbf b$ (you can find them, for example, by finding the nullspace of the matrix with rows $\mathbf a$ and $\mathbf b$). Yes, when you compute the cross product $\mathbf n\times\mathbf v_1\times\mathbf v_2$, this is the direction vector of a line in $\mathbb R^4$ that gives the homogeneous coordinates of the point you seek. $\endgroup$ Commented May 29, 2013 at 1:24

In a similar vein to ja72’s answer, you can use the Plücker matrix of a line to compute its intersection with a plane: The Plücker matrix of a line through points $\mathbf p$ and $\mathbf q$ is $L=\mathbf p\mathbf q^T-\mathbf q\mathbf p^T$, and its intersection with the plane $\mathbf\pi$ is simply $$L\pi = (\mathbf q^T\mathbf\pi)\mathbf p - (\mathbf p^T\mathbf\pi)\mathbf q.$$ If this product vanishes, then the line lies on $\mathbf\pi$. The Plücker matrix $L$ is in a certain sense the three-dimensional analog of the formula $\mathbf l = \mathbf p\times\mathbf q$ in 2-D.

  • $\begingroup$ How did you get the multiplication of $L\pi$ as that. Why not $pq^T\pi + ...$ $\endgroup$ Commented Jan 20, 2022 at 5:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .