Analytic geometry in space: lines, planes, distances and angles
The equation of a plane and its normal vector, the plane through three points, lines in parametric and Cartesian form, relative positions, skew lines, distances and angles.
In three-dimensional space the linear objects are planes and lines. With vectors, the dot product and the cross product you can solve all the classic problems: equations, relative positions, angles and distances. It is the geometry behind 3D graphics, robotics and mechanical design.
The plane
A plane is determined by a point
and a normal vector
. A point
lies on the plane if
is perpendicular to
:
![]()
As for a line in the plane, the coefficients of
are the components of a normal vector.
Plane through three points. If A, B, C are not collinear, the vector
is normal to the plane. Example:
,
,
.
,
, cross product
. The plane is
, that is
, or
(intercept form: you read off where it crosses the axes).
Alternatively: the point
is on plane ABC if and only if
,
,
are coplanar, that is if their triple product, a 3×3 determinant, is zero.
The line
A line in space is written in parametric form, with a point and a direction vector
:
![]()
or in Cartesian form, as the intersection of two non-parallel planes:
![Rendered by QuickLaTeX.com \[ \begin{cases} a_1x + b_1y + c_1z + d_1 = 0\\ a_2x + b_2y + c_2z + d_2 = 0 \end{cases} \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-f9159ec6e54ccab9b319be60606b7bae_l3.png)
A single linear equation in space is a plane, not a line: a common mistake. To go from Cartesian to parametric form you solve the system (rank 2, one free variable); the direction vector is also
, perpendicular to both normals.
Relative positions
Two planes are parallel if their normals are proportional; otherwise they meet in a line. The angle between two planes is the angle between their normals.
Line and plane. With
the direction of the line and
the normal of the plane: if
they meet at a point; if
the line is parallel to the plane (or lies in it). The line is perpendicular to the plane if
is parallel to
.
Two lines in space can intersect, be parallel or be skew: not parallel and with no common point, like two roads one above the other at a flyover. They are coplanar (so intersecting or parallel) if and only if the triple product of
,
,
is zero.
Distances

from the plane
is the length of the perpendicular segment: the component of
along the normal vector
.Point-plane distance
![]()
Proof. It is identical to the point-line distance in the plane: project
onto the normal,
, and use
. Example: the distance of the origin from
is
.
Point-line distance
The distance of
from the line through
with direction
is the height of the parallelogram built on
and
, that is area divided by base:
![Rendered by QuickLaTeX.com \[ d(Q, r) = \frac{|\overrightarrow{P_0Q}\times\mathbf d|}{|\mathbf d|} \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-d08435542c27030fe894b1934f748102_l3.png)
Distance between skew lines
The vector
is perpendicular to both lines. The distance is the projection of
onto that direction, that is the volume of the parallelepiped divided by the area of its base:
![Rendered by QuickLaTeX.com \[ d(r_1, r_2) = \frac{|\overrightarrow{P_1P_2}\cdot(\mathbf d_1\times\mathbf d_2)|}{|\mathbf d_1\times\mathbf d_2|} \]](https://www.electronics-engineering.com/wp-content/ql-cache/quicklatex.com-c5c46675844270377c9fde5def4ba36a_l3.png)
Example.
:
, the
axis;
:
.
,
, dot product
. Distance
. Since it is not zero, the lines are skew.
Angles
- between two lines:
; - between two planes: the same with the normals;
- between a line and a plane:
, because the angle with the plane is the complement of the angle with the normal.
A practical note
In 3D graphics every triangle of a model has a normal computed as the cross product of two of its sides: it is used to decide whether the face points towards the camera (back-face culling) and how much light it gets (the cosine between the normal and the light direction, a dot product). Ray tracing computes millions of line-plane intersections per second with the formulas of this lesson.





