A polygon can be defined (as illustrated above) as a geometric object "consisting of a number of points (called vertices) and an equal number of line segments (called sides), namely a cyclically ordered set of points in a plane, with no three successive points collinear, together with the line segments joining consecutive pairs of the points. In other words, a polygon is closed broken line lying in a plane" (Coxeter and Greitzer 1967, p. 51).
There is unfortunately substantial disagreement over the definition of a polygon. Other sources commonly define a polygon (in the sense illustrated above) as a "closed plane figure with straight edges" (Gellert et al. 1989, p. 162), "a closed plane figure bounded by straight line segments as its sides" (Bronshtein et al. 2003, p. 137), or "a closed plane figure bounded by three or more line segments that terminate in pairs at the same number of vertices, and do not intersect other than at their vertices" (Borowski and Borwein 2005, p. 573). These definitions all imply that a polygon is a set of line segments plus the region they enclose, though they never define precisely what is meant by "closed plane figure" and universally depict polygons as a closed broken black lines with no shading of the interiors.
In computer graphics parlance, the term polygon uniformly refers to a "filled" polygon, as is the case with the Wolfram Language's Polygon command, where the documentation explicitly includes the word "filled." However, this convention is also not without difficulty, since selfintersecting polygons are often rendered not as filled, but instead as alternating filled and nonfilled depending on the number of selfoverlaps (see figure above).
While the "filled" usage is consistent with common terminology such as "the area of a square is ," perhaps most clear is to use the terms "polygonal lamina" or "filled polygon" to refer to the region of which a closed broken line is the boundary. However, in keeping with common usage and to avoid excessive verbosity, this work will still use imprecise terms such as "the area of a triangle" to refer to the area of a triangular lamina when this meaning is clear by context.
A polygon with vertices (and sides) is known as an gon. A polygon for which the only points of the plane belonging to two polygon edges of are the polygon vertices is said to be a simple polygon.
If all sides and angles are equivalent, the polygon is called regular. Polygons can be convex, concave, or star. The word "polygon" derives from the Greek poly, meaning "many," and gonia, meaning "angle."
The most familiar type of polygon is the regular polygon, which is a convex polygon with equal sides lengths and angles. The generalization of a polygon into three dimensions is called a polyhedron, into four dimensions is called a polychoron, and into dimensions is called a polytope.
The sum of interior angles in the top left diagram of a dissected polygon is
(1)

But
(2)

and the sum of angles of the triangles is
(3)

Therefore,
(4)

The same equation can be derived using exterior angles (top right figure) or a triangulation from a single vertex (bottom figure).
The following table gives the names for polygons with sides. The words for polygons with sides (e.g., pentagon, hexagon, heptagon, etc.) can refer to either regular or nonregular polygons, depending on context. It is therefore always best to specify "regular gon" explicitly. For some polygons, several different terms are used interchangeably, e.g., nonagon and enneagon both refer to the polygon with sides.
polygon  
2  digon 
3  triangle (trigon) 
4  quadrilateral (tetragon) 
5  pentagon 
6  hexagon 
7  heptagon 
8  octagon 
9  nonagon (enneagon) 
10  decagon 
11  hendecagon (undecagon) 
12  dodecagon 
13  tridecagon (triskaidecagon) 
14  tetradecagon (tetrakaidecagon) 
15  pentadecagon (pentakaidecagon) 
16  hexadecagon (hexakaidecagon) 
17  heptadecagon (heptakaidecagon) 
18  octadecagon (octakaidecagon) 
19  enneadecagon (enneakaidecagon) 
20  icosagon 
30  triacontagon 
40  tetracontagon 
50  pentacontagon 
60  hexacontagon 
70  heptacontagon 
80  octacontagon 
90  enneacontagon 
100  hectogon 
10000  myriagon 