# The slope of a line: slope

### 13.14.8 The slope of a line: slope

The slope command finds the slope of a line.

- slope takes one or two arguments:
  L, a line, a line segment, or two points determining a line.
- slope(L) returns the slope of the line.

#### Examples.

- Input:
  slope(line(1,2i))
  or:
  slope(segment(1,2i))
  or:
  slope(1,2i)
  Output:

  −2

- Input:
  slope(line(x - 2y = 3))
  Output:

  1
  2

- Input:
  slope(tangent(plotfunc(sin(x)),pi/4))
  or:
  slope(LineTan(sin(x),pi/4))
  Output:

  √

  2

  2

The slope command has slopeat and slopeatraw versions (see Section 13.14.1).