Derivation of the formula for the area of a regular polygon given the side length. There are many formulas for finding the area of a regular polygon- but this is the one I am interested in:
$$A=\frac{S^2n}{4\tan(\frac{\pi}{n})}$$
where $n$ is the number of sides, and $S$ is the length of each side. Like I said, I would like to know how it is derived.

Hint: "Triangulate" your polygon, i.e. decompose it in $n$ triangles and measure the area of one of them (they are all same). Note that they are all isosceles (because the polygon is regular) and you can easily compute their angles. So you may take the altitude of it passing through the center of the polygon and then apply basic trigonometric formulas.
