# Calculus/Lines and Planes in Space

 ← Vectors Calculus Multivariable calculus → Lines and Planes in Space

## Introduction

For many practical applications, for example for describing forces in physics and mechanics, you have to work with the mathematical descriptions of lines and planes in 3-dimensional space.

## Parametric Equations

### Line in Space

A line in space is defined by two points in space, which I will call $P_1$ and $P_2$. Let $\mathbf{x}_1$ be the vector from the origin to $P_1$, and $\mathbf{x}_2$ the vector from the origin to $P_2$. Given these two points, every other point $P$ on the line can be reached by

$\mathbf{x} = \mathbf{x}_1 + \lambda \mathbf{a}$

where $\mathbf{a}$ is the vector from $P_1$ and $P_2$:

$\mathbf{a} = \mathbf{x}_2 - \mathbf{x}_1$

### Plane in Space

The same idea can be used to describe a plane in 3-dimensional space, which is uniquely defined by three points (which do not lie on a line) in space ($P_1, P_2, P_3$). Let $\mathbf{x}_i$ be the vectors from the origin to $P_i$. Then

$\mathbf{x} = \mathbf{x}_1 + \lambda \mathbf{a} + \mu \mathbf{b}$

with:

$\mathbf{a} = \mathbf{x}_2 - \mathbf{x}_1 \,\, \text{and} \,\, \mathbf{b} = \mathbf{x}_3 - \mathbf{x}_1$

Note that the starting point does not have to be $\mathbf{x}_1$, but can be any point in the plane. Similarly, the only requirement on the vectors $\mathbf{a}$ and $\mathbf{b}$ is that they have to be two non-collinear vectors in our plane.

## Vector Equation (of a Plane in Space, or of a Line in a Plane)

An alternative representation of a Plane in Space is obtained by observing that a plane is defined by a point $P_1$ in that plane and a direction perpendicular to the plane, which we denote with the vector $\mathbf{n}$. As above, let $\mathbf{x}_1$ describe the vector from the origin to $P_1$, and $\mathbf{x}$ the vector from the origin to another point $P$ in the plane. Since any vector that lies in the plane is perpendicular to $\mathbf{n}$, the vector equation of the plane is given by

$\mathbf{n} \cdot (\mathbf{x} - \mathbf{x}_1) = 0$

In 2 dimensions, the same equation uniquely describes a Line.

## Scalar Equation (of a Plane in Space, or of a Line in a Plane)

If we express $\mathbf{n}$ and $\mathbf{x}$ through their components

$\mathbf{n} = \left( {\begin{array}{*{20}c} a \\ b \\ c \\ \end{array}} \right),\,\,\text{and}\,\, \mathbf{x} = \left( {\begin{array}{*{20}c} x \\ y \\ z \\ \end{array}} \right),$

writing out the scalar product for $\mathbf{n} \cdot (\mathbf{x} - \mathbf{x}_1) = 0$ provides us with the scalar equation for a plane in space:

$ax+by+cz=d$

where $d = \mathbf{n} \cdot \mathbf{x}_1$.

In 2d space, the equivalent steps lead to the scalar equation for a line in a plane:

$ax+by=c$