# The area of a polygon: area

### 13.14.6 The area of a polygon: area

The area command finds the area of a circle or star-shaped polygon.

- area takes one argument:
  P, a circle or polygon which is star-shaped with respect to its first vertex (i.e., the line segment from the first vertex to any point in the polygon lies within the polygon).
- area(P) returns the area of P.

#### Examples.

- Input:
  area(triangle(0,1,i))
  Output:

  1
  2

- Input:
  area(square(0,2))
  Output:

  4

The area command has areaat and areaatraw versions (see Section 13.14.1).