# The coordinates of a point, vector or line in space: coordinates

### 14.12.4 The coordinates of a point, vector or line in space: coordinates

See Section 13.13.4 for coordinates in two-dimensional geometry.

The coordinates command takes finds the coordinates of a point.

- coordinates takes one argument:
  P, which can be a point (or a sequence or list of points), a vector, or a line.
- If P is a point, then coordinates(P) returns a list consisting of the abscissa, ordinate and cote. If P is a list or sequence of points, then the command returns a list or sequence of such lists.
- If P is a vector, for example from A to B, then coordinates(P) returns a list of the coordinates of B−A.
- If P is a line, then coordinates(P) returns a list of two points on the line, in the order determined by the direction of the line.

#### Examples.

- Input:
  coordinates(point(1,2,3))
  Output:

  ⎡ ⎣ | 1,2,3 | ⎤ ⎦

- Input:
  coordinates(point(0,1,2),point(1,2,4))
  Output:

  ⎡ ⎣ | 0,1,2 | ⎤ ⎦ | , | ⎡ ⎣ | 1,2,4 | ⎤ ⎦

- Note that if the argument is a list of real numbers, it is interpreted as a list of points on the real axis of the plane.
  Input:
  coordinates([1,2,4])
  Output:

  ⎡
  ⎢
  ⎢
  ⎣

  1 | 0
  2 | 0
  4 | 0

  ⎤
  ⎥
  ⎥
  ⎦

- Input:
  coordinates(vector(point(1,2,3),point(2,4,7)))
  Output:

  ⎡ ⎣ | 1,2,4 | ⎤ ⎦

- Input:
  coordinates(line(point(-1,1,0),point(1,2,3)))
  Output:

  ⎡ ⎣ | ⎡ ⎣ | −1,1,0 | ⎤ ⎦ | , | ⎡ ⎣ | 1,2,3 | ⎤ ⎦ | ⎤ ⎦

- Input:
  coordinates(line(x-2*y+3=0, 6*x + 3*y - 5*z + 3 = 0))
  Output:

  ⎡ ⎣ | ⎡ ⎣ | −1,1,0 | ⎤ ⎦ | , | ⎡ ⎣ | 9,6,15 | ⎤ ⎦ | ⎤ ⎦