Lines and planes

Lines
Given a point identified with a vector and a direction vector , the line through in direction is given parametrically by the formula:

Given two points and , the line passing through these two points is given parametrically by:

The line segment from to corresponds to . The point may be considered to be a weighted average of and with weights and .

Planes
A plane in can be determined as the points satisfying a single linear equation, such as:

Other formulations of this equation can display more meaning.

A plane is determined in vector form by the data of a single point through which it passes together with a normal vector that is perpendicular to the plane. The equation of the plane can be formed by simply stating that vectors in the plane from are perpendicular to :

If we have components and and , then this formula can be rewritten as:

This equation implies that the , , in the linear equation of the plane are just the components of its normal vector .

Distances

Point to point
The distance between and (more accurately, between the point identified by and that identified by ) is .

Point to line
The vector from a point to a line , namely to the point on the line closest to , is given by taking the vector from to and removing the component parallel to :

The distance from to is then .

Projection gives minimal distance

One can verify the formula for by minimizing the squared distance from to using the standard calculus technique.

Point to plane
The vector from a point to the plane through with normal vector (that is, to the nearest point on the plane) is given by projecting onto , that is:

So the distance from to this plane is:

Plane to plane