Category: Geometry Level: 201
sum of interior angles = (n - 2) × 180°
From one corner, diagonals cut an n-sided polygon into n − 2 triangles. Each triangle adds 180°, so the interior angles add to (n − 2) × 180°.
This polygon has six sides, so n = 6. The question: what do its six inside angles add to? Measuring each one is slow, so cheat with triangles.
n = 6, sum = ?
From one corner, draw a diagonal to every corner that is not a neighbor. The corner skips itself and its two neighbors, so it gets three.
6 - 3 = 3 diagonals
The diagonals cut the polygon into four triangles. Two corners are neighbors of the start, so you always get two fewer triangles than sides.
n - 2 = 4 triangles
The triangle corners together fill the polygon corners exactly. So the polygon angles add to four times 180°.
(6 - 2) × 180° = 720°
The same trick works for every polygon. Each extra side adds one triangle and 180° more.
sum = (n - 2) × 180°
cd svg-generator python3 -m svgmath render polygon-angles --out /tmp/polygon-angles
Source: svgmath/diagrams/angles.py