Skip to content

Roots of unity ๐Ÿฅ•

JavaScriptThree.js

The nn-th roots of unity are the complex numbers zz that satisfy the equation:

zn=1orย equivalentlyznโˆ’1=0z^n =1\quad \text{or equivalently}\quad z^n -1 = 0

using Eulerโ€™s formula, we can find all nn distinct roots. They are given by:

zk=ei2ฯ€kn=cosโก(2ฯ€kn)+isinโก(2ฯ€kn),k=0,1,2,โ‹ฏโ€‰,nโˆ’1.z_k=e^{i\dfrac{2\pi k}{n}}=\cos\left(\dfrac{2\pi k}{n}\right) + i\sin\left(\dfrac{2\pi k}{n}\right), \quad k=0, 1, 2,\cdots,n-1.
Source