Here the statement of the theorem from Mathworld:

**Theorem**. If isosceles triangles with apex angles \(2 k \pi/n\) are erected on the sides of an arbitrary \(n\)-gon \(A_0\), and if this process is repeated with the \(n\)-gon \(A_1\) formed by the free apices of the triangles, but with a different value of \(k\), and so on until all values \(1 \le k \le n-2\) have been used in arbitrary order, then a regular \(n\)-gon \(A_{n-2}\) is formed whose centroid coincides with the centroid of \(A_0\).

*Proof*. You can represent an \(n\)-gon by the list of its vertices thought of as complex numbers, that is, by a vector in \(\mathbb{C}^n\). Take an \(n\)-gon \(A\) and let’s try to find a formula for the \(n\)-gon \(B\) formed by the free vertices of similar triangles built on the sides of \(A\). For a fixed complex number \(\alpha\) determining the shape of the similar triangles, we have \(\alpha (A_i - B_i) = A_{i+1} - B_i\), that is, \(B_i = (1-\alpha)^{-1}(A_{i+1} - \alpha A_i).\)

In terms of the linear operator \(S : \mathbb{C}^n \to \mathbb{C}^n\) that cyclically permutes the coordinates one place, we have \(B = (1-\alpha)^{-1}(S-\alpha I) A\), where \(I\) is the identity. Taking centroids is a linear functional on this space of \(n\)-gons and is invariant under \(S\), so we easily see that \(B\) has the same centroid as \(A\), which will prove the final remark in the theorem once we’ve proved the rest.

This means that the polygon \(A_{n-2}\) that we need to show is regular is obtained from \(A_0\) by applying the composition of the operators \((1-\omega^k)^{-1} (S-\omega^k I)\) for \(k=1,2,\ldots,n-2\), where \(\omega = \exp(2 \pi i/n)\). (These commute because they are all polynomials in the same operator \(S\).)

To proceed we need a criterion for when a polygon is regular. Well, \(P\) is a regular \(n\)-gon if each side is obtained from the next by rotating an angle of \(2\pi/n\), that is, if \(P_{i+1}-P_i = \omega (P_{i+2} - P_{i+1})\). In terms of \(S\), \(P\) is regular if it is in the kernel of \((S-I)(I-\omega S)\), or better yet, of \((S-I)(S-\omega^{n-1}I)\).

So to prove the theorem we only need to show that the composition of all the \(S - \omega^k I\) for \(k=0,1,\ldots,n-1\) is zero, which is true since that composition is just (a factored form of) \(S^n - I = 0\). □