# The length of a segment in space: distance

### 14.12.7 The length of a segment in space: distance

See Section 13.14.2 for distances in two-dimensional geometry.

The distance command finds the distance between two points.

- distance takes two arguments:
  P,Q, two points or two lists with the coordinates of the points.
- distance(P,Q) returns the distance between P and Q.

#### Example.

Input:

distance(point(-1,1,1),point(1,1,1))

or:

distance([-1,1,1],[1,1,1])

Output:

2