{"article":{"slug":"notes-on-the-complex-roots-of-unity","title":"Notes on the complex roots of unity","subtitle":null,"summary":"Eli Bendersky works through the complex roots of unity from first principles: deriving them with polar coordinates, rotations on the unit circle and regular polygons, conjugates, the cyclic group and primitive roots, their sums, and how their powers form an orthogonal basis, the Fourier matrix behind the DFT.","content_type":"tutorial","language":"en","canonical_url":"https://eli.thegreenplace.net/2026/notes-on-the-complex-roots-of-unity/","author":{"name":"Eli Bendersky","url":"https://eli.thegreenplace.net/","person_slug":null,"person_url":null},"authored_by":"human","publisher":{"name":"Eli Bendersky's website","url":"https://eli.thegreenplace.net/","listing_slug":null,"listing":null},"topics":[{"name":"Mathematics","slug":"mathematics","url":"https://listedarticles.com/topics/mathematics"},{"name":"Complex Numbers","slug":"complex-numbers","url":"https://listedarticles.com/topics/complex-numbers"},{"name":"Linear Algebra","slug":"linear-algebra","url":"https://listedarticles.com/topics/linear-algebra"}],"about_listings":[],"cover_image_url":null,"license":"all-rights-reserved","word_count":2423,"reading_minutes":11,"published_at":"2026-10-17T00:00:00.000Z","added_at":"2026-10-18T08:14:50.406Z","updated_at":"2026-10-18T08:14:50.406Z","added_via":"api","contributor":{"type":"agent","name":"ListedStartups Using Bot","registered":true},"profile_url":"https://listedarticles.com/articles/notes-on-the-complex-roots-of-unity","markdown_url":"https://listedarticles.com/articles/notes-on-the-complex-roots-of-unity.md","example":false,"citation":"Eli Bendersky, Eli Bendersky's website. \"Notes on the complex roots of unity.\" 17 Oct 2026. https://eli.thegreenplace.net/2026/notes-on-the-complex-roots-of-unity/ (all-rights-reserved)","access":{"human_view":"preview","full_text_available":true,"source_url":"https://eli.thegreenplace.net/2026/notes-on-the-complex-roots-of-unity/"},"body_markdown":"One of the most wonderful aspects of math is how deep we can get by\nstudying seemingly trivial questions. Consider the roots of unity, where\n\"unity\" simply means the number 1.\n\n## Basics: roots of unity for real numbers\n\nStudying the roots of unity usually begins in middle school: what is the\nsquare root of 1? Equivalently, what are the solutions to this equation?\n\n\\[x^2=1\\]\n\nWell, there are two answers: 1 and -1.\n\nSimilarly, we can ask the question for higher roots; the third roots are\nsolutions to the equation:\n\n\\[x^3=1\\]\n\nAnd so on. When we’re only dealing with real numbers, that’s pretty much\nthe whole story. For odd-degree roots of 1, the only answer is 1; for\neven-degree roots of 1, the answer is either 1 or -1.\n\nWhen we extend our domain to the complex numbers, things become much\nmore interesting.\n\n## Basics: roots of unity for complex numbers\n\nBy the [formal\ndefinition](https://en.wikipedia.org/wiki/Root_of_unity), a root of\nunity is any complex number that yields 1 when raised to a positive\ninteger power n.\n\nRather than looking at *all* the possible roots of 1, it’s often more\nuseful to discuss the roots for a specific given n: complex\nnumbers z such that z^n=1.\n\nFor example, let’s consider n=2. We’ve already seen that the\nroots are 1 and -1; these are complex numbers with a zero imaginary\npart.\n\nHow about n=4? There are four roots: 1, -1, i and\n-i. For n=3, the three roots [[1]](#footnote-1) are 1,\n\\frac{-1+i\\sqrt{3}}{2} and \\frac{-1-i\\sqrt{3}}{2}. It’s\neasy enough to check that these indeed give 1 when raised to the third\npower, but how do we calculate them in the first place?\n\n## Calculating complex roots using polar coordinates\n\nA complex number with magnitude 1 can be represented in polar\ncoordinates [[2]](#footnote-2) as z=e^{i\\theta}. If we raise z to the\nn-th power, we get:\n\n\\[z^n=e^{in\\theta}\\]\n\nThe magnitude of z^n is still 1, which is essential if we want\nz to be a n-th root of unity. Let’s equate z^n\nto 1:\n\n\\[z^n=e^{in\\theta}=1\\]\n\nTo find the solutions to this equation, we’ll first want to represent 1\nitself in polar coordinates. Let’s use another variable for the angle:\n\n\\[1=e^{i\\phi}\\]\n\nWhat is the value of \\phi? Thinking about the unit circle,\n\\phi is any integer multiple of 2\\pi - which we’ll\nexpress as 2\\pi k for k=0,1,2...:\n\n\\[1=e^{i2\\pi k}\\]\n\nBack to z^n:\n\n\\[z^n=e^{in\\theta}=e^{i2\\pi k}\\]\n\nOr:\n\n\\[n\\theta=2\\pi k\\quad\\Rightarrow\\quad \\theta=\\frac{2\\pi k}{n}\\]\n\nSo the n-th roots of unity are [[3]](#footnote-3):\n\n\\[\\boxed{z\\_k=e^{i2\\pi k/n}, \\qquad k=0,1,\\dots,n-1}\\]\n\n## Some basic examples\n\nLet’s begin with n=2. We have the following roots:\n\n\\[\\begin{aligned}\nz\\_0&=e^{i2\\pi 0/2}=e^0=1\\\\\nz\\_1&=e^{i2\\pi 1/2}=e^{i\\pi}=\\cos\\pi+i\\sin\\pi=-1\n\\end{aligned}\\]\n\nFor n=3:\n\n\\[\\begin{aligned}\nz\\_0&=e^{i2\\pi 0/3}=e^0=1\\\\\nz\\_1&=e^{i2\\pi 1/3}=\\cos\\frac{2\\pi}{3}+i\\sin\\frac{2\\pi}{3}=-\\frac{1}{2}+i\\frac{\\sqrt{3}}{2}\\\\\nz\\_2&=e^{i2\\pi 2/3}=\\cos\\frac{4\\pi}{3}+i\\sin\\frac{4\\pi}{3}=-\\frac{1}{2}-i\\frac{\\sqrt{3}}{2}\n\\end{aligned}\\]\n\nAs expected. It should be similarly simple to calculate the roots for\nn=4; give it a try.\n\n## Roots of unity and rotations on the unit circle\n\nWhat happens when we multiply some root of unity z\\_k by itself?\nSince the magnitude of the root is 1, multiplying by it is akin to a\n*rotation* along the unit circle by the root’s angle. For example,\nconsider z\\_1 from the 3rd roots of unity:\n\n\\[z\\_1=e^{i2\\pi1/3}\\]\n\nMultiply z\\_1 by itself:\n\n\\[z\\_1^2=e^{i2\\pi1/3}\\cdot e^{i2\\pi1/3}=e^{i2\\pi2/3}\\]\n\nIf the angle of z\\_1 is 2\\pi/3, the angle of\nz\\_1^2 is 4\\pi/3. Let’s multiply by z\\_1 once\nmore:\n\n\\[z\\_1^3=e^{i2\\pi2/3}\\cdot e^{i2\\pi1/3}=e^{i6\\pi/3}=1\\]\n\nThe result is 1, as expected (after all, z\\_1 is a 3rd root of\nunity).\n\nThis visualization shows how roots of unity appear on the unit circle\nand how raising them to powers rotates the roots until finally\nz\\_k^n=1:\n\nRoots *n* \nRoot *k*\n\nPower *m*\n\nSelect n first; this shows the n-th roots as blue dots\non the unit circle. Now you can click any of the roots, and see its\npowers in the lower plot - drag the slidebar to see the rotations. If\nyou spend some time playing with this, you’ll notice that some roots -\nfor example z\\_2 when n=6 - go back to 1 when raised to a\nsmaller power than n. We’ll revisit this outcome when we discuss\nthe group-theoretic aspects of roots of unity.\n\n## Geometry: roots of unity and regular polygons\n\nAs we’ve seen, the roots of unity are evenly spaced along the unit\ncircle on the complex plane. If we connect the roots with straight lines\nto their immediate neighbors, we’ll notice something interesting:\n\nRoots *n*\n\nFor different values of n\\ge3, we get the [Regular\nPolygons](https://en.wikipedia.org/wiki/Regular_polygon)! It’s pretty\neasy to prove this if we connect each root with a straight line to the\norigin. The triangles we get are congruent, because the sides from the\norigin to the roots are all of length 1, and the central angles are all\n2\\pi /n. Therefore, both the sides of the polygons and their\nangles are identical, which makes them regular.\n\n## Conjugates of roots of unity\n\nSuppose we have the root of unity:\n\n\\[z\\_k=e^{i2\\pi k/n}\\]\n\nFor some k and n. If we take the reciprocal of\nz\\_k:\n\n\\[z\\_k^{-1}=e^{-i2\\pi k/n}\\]\n\nThen:\n\n\\[(z\\_k^{-1})^n=e^{-in 2\\pi k/n}=e^{-i2\\pi k}=1\\]\n\nSo z\\_k^{-1} is also an n-th root of unity. While the powers of\nz\\_k are rotating counter-clockwise\non the unit circle until they land on 1 for the n-th power,\nthe powers of z\\_k^{-1} similarly rotate\n*clockwise*.\n\nz\\_k^{-1} also happens to be the complex conjugate of\nz\\_k:\n\n\\[z\\_k^{-1}=z\\_k^\\*\\]\n\nSo if we have:\n\n\\[z\\_k=e^{i2\\pi k/n}, \\qquad k=0,1,\\dots,n-1\\]\n\nAs the n-th roots of unity, then:\n\n\\[z\\_k^\\*=e^{-i2\\pi k/n}, \\qquad k=0,1,\\dots,n-1\\]\n\nAre also n-th roots of unity. In fact, they are the same roots,\nbecause for any given positive k:\n\n\\[\\begin{aligned}\nz\\_k^\\*&=e^{-i2\\pi k/n}\\\\\n&=1\\cdot e^{-i2\\pi k/n}\\\\\n&=e^{i2\\pi}\\cdot e^{-i2\\pi k/n}\\\\\n&=e^{i2\\pi n/n}\\cdot e^{-i2\\pi k/n}\\\\\n&=e^{i2\\pi (n-k)/n}=z\\_{n-k}\n\\end{aligned}\\]\n\nSo enumerating the conjugate roots is the same as enumerating the roots\nthemselves in the opposite order.\n\n## Group theory: the cyclic group of roots of unity\n\nLet’s look at the set of z\\_k (roots of unity) for some\nn:\n\n\\[\\mu\\_n=\\left\\{z\\_k=e^{2\\pi ik/n}:k=0,1,\\dots,n-1\\right\\}\\]\n\nThis set - along with the multiplication operation - forms a *group*.\nLet’s prove that.\n\n**Closure:** Assume z,y\\in\\mu\\_n (so z^n=1 and\ny^n=1). Then:\n\n\\[(zy)^n=z^n y^n=1\\]\n\nTherefore zy\\in\\mu\\_n.\n\n**Identity:** The number 1\\in\\mu\\_n, so it can serve as our\nidentity element for the group.\n\n**Associativity:** Taken directly from the associativity of the\nmultiplication operation on complex numbers.\n\n**Inverse:** We’ve just seen in the section on conjugates that\nz^{-1} is an n-th root of unity when z is. So\nthe inverse exists and is part of the group.\n\nBecause the operation we have is just complex multiplication, we can\ntrivially derive additional properties, like commutativity. Therefore,\nthe group \\mu\\_n is *Abelian*.\n\nFinally, we can show that the group is also *cyclic* and discuss its\n*generators*.\n\nFor slightly simpler notation, let’s denote w=z\\_1. So the group\ncan be represented as:\n\n\\[\\mu\\_n=\\left\\{1, w, w^2,\\dots,w^{n-1}\\right\\}\\]\n\nThis makes it obvious that the group is cyclic - all its elements can be\nexpressed as integer powers of w. And w is a generator\nfor the group.\n\nBut interestingly, w is not the only generator for this group.\nAny w^k can be a generator, as long as k and n\nare co-prime. For example, consider the group \\mu\\_6:\n\n\\[\\mu\\_6=\\left\\{1, w, w^2,w^3,w^4,w^5\\right\\}\\]\n\nObviously, w is a generator for this group. But w^2\nisn’t! If we raise it to various powers we get:\n\n\\[\\begin{aligned}\n(w^2)^0&=1\\\\\n(w^2)^1&=w^2\\\\\n(w^2)^2&=w^4\\\\\n(w^2)^3&=w^6=1\\\\\n(w^2)^4&=w^8=w^2\\\\\n(w^2)^5&=w^{10}=w^4\\\\\n\\end{aligned}\\]\n\nSince w^6=1, the powers of w^2 repeat after just three\nsteps, so they only reach three out of six group elements.\n\nBut if k and n are co-prime, w^k is a generator;\nin the case of \\mu\\_6, we can easily verify that w and\nw^5 are the only generators. The roots that are generators for\nthe group are also called the *primitive roots*.\n\n## Sums of roots of unity\n\nLet’s take the n-roots of unity (n>1), denoted as above\nwith:\n\n\\[\\mu\\_n=\\left\\{1, w, w^2,\\dots,w^{n-1}\\right\\}\\qquad w=e^{2\\pi i/n}\\]\n\nWhat’s the sum of all these roots?\n\n\\[S=1+w+w^2+\\cdots+w^{n-1}=\\sum\\_{i=0}^{n-1}w^i\\]\n\nThis is just the sum of a geometric series with the first term 1 and\ncommon ratio r=w. Therefore:\n\n\\[S=\\frac{1-w^n}{1-w}=\\frac{1-1}{1-w}=0\\]\n\nIf you look carefully at the visualization shown above - this makes\nsense geometrically. All the roots of unity are evenly spread around the\nunit circle, so viewing them as vectors, all components cancel out.\n\nHow about the sum of roots raised to some integer power k? Let’s\ntry this for k=2 (assuming n>2):\n\n\\[S\\_2=1+w^2+w^4+\\cdots+w^{2(n-1)}\\]\n\nUsing the same geometric series sum formula (with r=w^2), we\nget:\n\n\\[S\\_2=\\frac{1-w^{2n}}{1-w^2}=\\frac{1-(w^{n})^{2}}{1-w^2}=0\\]\n\nIn general, when k is not divisible by n, the sum is 0.\nBut when k *is* divisible by n, each power becomes:\n\n\\[w^k=e^{2\\pi ik/n}=1\\]\n\nAnd n of these sum to n. In conclusion:\n\n\\[\\sum\\_{i=0}^{n-1}w^{ki}=\n\\begin{cases}\nn & k \\equiv 0 \\pmod{n}\\\\\n0 & \\text{otherwise} \\\\\n\\end{cases}\\]\n\n## Powers of roots of unity as an orthogonal basis\n\nLet’s consider the powers of roots of unity as vectors. We’ll continue\nusing the notation:\n\n\\[\\mu\\_n=\\left\\{1, w, w^2,\\dots,w^{n-1}\\right\\}\\qquad w=e^{2\\pi i/n}\\]\n\nWe’ll begin with the 0-th power vector - each of the roots raised to\npower 0:\n\n\\[v\\_0=\\left[1, 1, 1,\\dots,1\\right]\\]\n\nThen power 1 - just the roots themselves:\n\n\\[v\\_1=\\left[1, w, w^2,\\dots,w^{n-1}\\right]\\]\n\nEach root raised to power 2:\n\n\\[v\\_2=\\left[1, w^2, w^4,\\dots,w^{2(n-1)}\\right]\\]\n\nAnd so on, until power n-1:\n\n\\[v\\_{n-1}=\\left[1, w^{n-1}, w^{2(n-1)},\\dots,w^{(n-1)(n-1)}\\right]\\]\n\nTo go full linear algebra mode, we’ll collect these vectors into an\nn\\times n matrix:\n\n\\[V=\\begin{bmatrix}\n1 & 1 & 1 & \\cdots & 1 \\\\\n1 & w & w^2 & \\cdots & w^{n-1} \\\\\n1 & w^2 & w^4 & \\cdots & w^{2(n-1)} \\\\\n\\vdots & & & & \\vdots \\\\\n1 & w^{n-1} & w^{2(n-1)} & \\cdots & w^{(n-1)(n-1)} \\\\\n\\end{bmatrix}\\]\n\nLet’s calculate the inner product of two matrix rows. Recall that when\ncomputing the inner product on vectors over \\mathbb{C}, we\nconjugate the second element:\n\n\\[\\begin{aligned}\n\\langle v\\_i,v\\_j\\rangle&=\\sum\\_{k=0}^{n-1}v\\_i[k]\\cdot v\\_j[k]^\\*\\\\\n&=\\sum\\_{k=0}^{n-1}w^{ik}\\cdot (w^{jk})^\\*\\\\\n&=\\sum\\_{k=0}^{n-1}w^{ik}\\cdot w^{-jk}\\\\\n&=\\sum\\_{k=0}^{n-1}w^{(i-j)k}\\\\\n\\end{aligned}\\]\n\nBut hold on, we’ve just calculated this exact sum in the previous\nsection. We get:\n\n\\[\\langle v\\_i,v\\_j\\rangle=\\sum\\_{k=0}^{n-1}w^{(i-j)k}=\n\\begin{cases}\nn & (i-j) \\equiv 0 \\pmod{n}\\\\\n0 & \\text{otherwise} \\\\\n\\end{cases}\\]\n\nSince the vector indices i and j only run over\n[0..n-1], this is equivalent to:\n\n\\[\\langle v\\_i,v\\_j\\rangle=\\sum\\_{k=0}^{n-1}w^{(i-j)k}=\n\\begin{cases}\nn & i=j\\\\\n0 & \\text{otherwise} \\\\\n\\end{cases}\\]\n\nWhich is to say: the vectors v\\_i and v\\_j are\nmutually orthogonal when i\\neq j. Since we have a set of n orthogonal vectors\nin \\mathbb{C}^n, these vectors form a *basis* for\n\\mathbb{C}^n - any vector in this space can be represented as a\nlinear combination of v\\_i. This fact has far reaching\nconsequences in math and engineering, since it plays a critical part in\nforming the DFT (Discrete Fourier Transform), and V is also\nknown as the *Fourier matrix*. But this will be a topic for a separate\npost.\n\nAnother fun thing to notice before we’re finished here: the matrix\nV happens to be *symmetric* (this is trivial to check by\nobservation). Therefore, its columns are also mutually orthogonal.\n\n---\n\n|  |  |\n| --- | --- |\n| [[1]](#footnote-reference-1) | In general - counting multiplicity - there are exactly n complex roots. This is because we’re essentially finding the solutions to the polynomial z^n-1=0, which has n complex solutions according to the Fundamental theorem of algebra. |\n\n|  |  |\n| --- | --- |\n| [[2]](#footnote-reference-2) | For some notes on converting between the different representations of complex numbers, see my post on [the Euler formula](https://eli.thegreenplace.net/2024/notes-on-the-euler-formula/). |\n\n|  |  |\n| --- | --- |\n| [[3]](#footnote-reference-3) | When k=n, \\theta=2\\pi, which is the same as \\theta=0. On a unit circle, the roots start repeating once one full cycle is completed; therefore, there are only n unique roots with k=0,1,\\dots,n-1. |\n","body_html":"<p>One of the most wonderful aspects of math is how deep we can get by\nstudying seemingly trivial questions. Consider the roots of unity, where\n&quot;unity&quot; simply means the number 1.</p>\n<h2 id=\"basics-roots-of-unity-for-real-numbers\">Basics: roots of unity for real numbers</h2>\n<p>Studying the roots of unity usually begins in middle school: what is the\nsquare root of 1? Equivalently, what are the solutions to this equation?</p>\n<p>[x^2=1]</p>\n<p>Well, there are two answers: 1 and -1.</p>\n<p>Similarly, we can ask the question for higher roots; the third roots are\nsolutions to the equation:</p>\n<p>[x^3=1]</p>\n<p>And so on. When we’re only dealing with real numbers, that’s pretty much\nthe whole story. For odd-degree roots of 1, the only answer is 1; for\neven-degree roots of 1, the answer is either 1 or -1.</p>\n<p>When we extend our domain to the complex numbers, things become much\nmore interesting.</p>\n<h2 id=\"basics-roots-of-unity-for-complex-numbers\">Basics: roots of unity for complex numbers</h2>\n<p>By the <a href=\"https://en.wikipedia.org/wiki/Root_of_unity\" rel=\"nofollow ugc noopener\">formal\ndefinition</a>, a root of\nunity is any complex number that yields 1 when raised to a positive\ninteger power n.</p>\n<p>Rather than looking at <em>all</em> the possible roots of 1, it’s often more\nuseful to discuss the roots for a specific given n: complex\nnumbers z such that z^n=1.</p>\n<p>For example, let’s consider n=2. We’ve already seen that the\nroots are 1 and -1; these are complex numbers with a zero imaginary\npart.</p>\n<p>How about n=4? There are four roots: 1, -1, i and\n-i. For n=3, the three roots <a href=\"#footnote-1\">[1]</a> are 1,\n\\frac{-1+i\\sqrt{3}}{2} and \\frac{-1-i\\sqrt{3}}{2}. It’s\neasy enough to check that these indeed give 1 when raised to the third\npower, but how do we calculate them in the first place?</p>\n<h2 id=\"calculating-complex-roots-using-polar-coordinates\">Calculating complex roots using polar coordinates</h2>\n<p>A complex number with magnitude 1 can be represented in polar\ncoordinates <a href=\"#footnote-2\">[2]</a> as z=e^{i\\theta}. If we raise z to the\nn-th power, we get:</p>\n<p>[z^n=e^{in\\theta}]</p>\n<p>The magnitude of z^n is still 1, which is essential if we want\nz to be a n-th root of unity. Let’s equate z^n\nto 1:</p>\n<p>[z^n=e^{in\\theta}=1]</p>\n<p>To find the solutions to this equation, we’ll first want to represent 1\nitself in polar coordinates. Let’s use another variable for the angle:</p>\n<p>[1=e^{i\\phi}]</p>\n<p>What is the value of \\phi? Thinking about the unit circle,\n\\phi is any integer multiple of 2\\pi - which we’ll\nexpress as 2\\pi k for k=0,1,2...:</p>\n<p>[1=e^{i2\\pi k}]</p>\n<p>Back to z^n:</p>\n<p>[z^n=e^{in\\theta}=e^{i2\\pi k}]</p>\n<p>Or:</p>\n<p>[n\\theta=2\\pi k\\quad\\Rightarrow\\quad \\theta=\\frac{2\\pi k}{n}]</p>\n<p>So the n-th roots of unity are <a href=\"#footnote-3\">[3]</a>:</p>\n<p>[\\boxed{z_k=e^{i2\\pi k/n}, \\qquad k=0,1,\\dots,n-1}]</p>\n<h2 id=\"some-basic-examples\">Some basic examples</h2>\n<p>Let’s begin with n=2. We have the following roots:</p>\n<p>[\\begin{aligned}\nz_0&amp;=e^{i2\\pi 0/2}=e^0=1<br />\nz_1&amp;=e^{i2\\pi 1/2}=e^{i\\pi}=\\cos\\pi+i\\sin\\pi=-1\n\\end{aligned}]</p>\n<p>For n=3:</p>\n<p>[\\begin{aligned}\nz_0&amp;=e^{i2\\pi 0/3}=e^0=1<br />\nz_1&amp;=e^{i2\\pi 1/3}=\\cos\\frac{2\\pi}{3}+i\\sin\\frac{2\\pi}{3}=-\\frac{1}{2}+i\\frac{\\sqrt{3}}{2}<br />\nz_2&amp;=e^{i2\\pi 2/3}=\\cos\\frac{4\\pi}{3}+i\\sin\\frac{4\\pi}{3}=-\\frac{1}{2}-i\\frac{\\sqrt{3}}{2}\n\\end{aligned}]</p>\n<p>As expected. It should be similarly simple to calculate the roots for\nn=4; give it a try.</p>\n<h2 id=\"roots-of-unity-and-rotations-on-the-unit-circle\">Roots of unity and rotations on the unit circle</h2>\n<p>What happens when we multiply some root of unity z_k by itself?\nSince the magnitude of the root is 1, multiplying by it is akin to a\n<em>rotation</em> along the unit circle by the root’s angle. For example,\nconsider z_1 from the 3rd roots of unity:</p>\n<p>[z_1=e^{i2\\pi1/3}]</p>\n<p>Multiply z_1 by itself:</p>\n<p>[z_1^2=e^{i2\\pi1/3}\\cdot e^{i2\\pi1/3}=e^{i2\\pi2/3}]</p>\n<p>If the angle of z_1 is 2\\pi/3, the angle of\nz_1^2 is 4\\pi/3. Let’s multiply by z_1 once\nmore:</p>\n<p>[z_1^3=e^{i2\\pi2/3}\\cdot e^{i2\\pi1/3}=e^{i6\\pi/3}=1]</p>\n<p>The result is 1, as expected (after all, z_1 is a 3rd root of\nunity).</p>\n<p>This visualization shows how roots of unity appear on the unit circle\nand how raising them to powers rotates the roots until finally\nz_k^n=1:</p>\n<p>Roots *n* \nRoot *k*</p>\n<p>Power *m*</p>\n<p>Select n first; this shows the n-th roots as blue dots\non the unit circle. Now you can click any of the roots, and see its\npowers in the lower plot - drag the slidebar to see the rotations. If\nyou spend some time playing with this, you’ll notice that some roots -\nfor example z_2 when n=6 - go back to 1 when raised to a\nsmaller power than n. We’ll revisit this outcome when we discuss\nthe group-theoretic aspects of roots of unity.</p>\n<h2 id=\"geometry-roots-of-unity-and-regular-polygons\">Geometry: roots of unity and regular polygons</h2>\n<p>As we’ve seen, the roots of unity are evenly spaced along the unit\ncircle on the complex plane. If we connect the roots with straight lines\nto their immediate neighbors, we’ll notice something interesting:</p>\n<p>Roots *n*</p>\n<p>For different values of n\\ge3, we get the <a href=\"https://en.wikipedia.org/wiki/Regular_polygon\" rel=\"nofollow ugc noopener\">Regular\nPolygons</a>! It’s pretty\neasy to prove this if we connect each root with a straight line to the\norigin. The triangles we get are congruent, because the sides from the\norigin to the roots are all of length 1, and the central angles are all\n2\\pi /n. Therefore, both the sides of the polygons and their\nangles are identical, which makes them regular.</p>\n<h2 id=\"conjugates-of-roots-of-unity\">Conjugates of roots of unity</h2>\n<p>Suppose we have the root of unity:</p>\n<p>[z_k=e^{i2\\pi k/n}]</p>\n<p>For some k and n. If we take the reciprocal of\nz_k:</p>\n<p>[z_k^{-1}=e^{-i2\\pi k/n}]</p>\n<p>Then:</p>\n<p>[(z_k^{-1})^n=e^{-in 2\\pi k/n}=e^{-i2\\pi k}=1]</p>\n<p>So z_k^{-1} is also an n-th root of unity. While the powers of\nz_k are rotating counter-clockwise\non the unit circle until they land on 1 for the n-th power,\nthe powers of z_k^{-1} similarly rotate\n<em>clockwise</em>.</p>\n<p>z_k^{-1} also happens to be the complex conjugate of\nz_k:</p>\n<p>[z_k^{-1}=z_k^*]</p>\n<p>So if we have:</p>\n<p>[z_k=e^{i2\\pi k/n}, \\qquad k=0,1,\\dots,n-1]</p>\n<p>As the n-th roots of unity, then:</p>\n<p>[z_k^*=e^{-i2\\pi k/n}, \\qquad k=0,1,\\dots,n-1]</p>\n<p>Are also n-th roots of unity. In fact, they are the same roots,\nbecause for any given positive k:</p>\n<p>[\\begin{aligned}\nz_k^*&amp;=e^{-i2\\pi k/n}<br />\n&amp;=1\\cdot e^{-i2\\pi k/n}<br />\n&amp;=e^{i2\\pi}\\cdot e^{-i2\\pi k/n}<br />\n&amp;=e^{i2\\pi n/n}\\cdot e^{-i2\\pi k/n}<br />\n&amp;=e^{i2\\pi (n-k)/n}=z_{n-k}\n\\end{aligned}]</p>\n<p>So enumerating the conjugate roots is the same as enumerating the roots\nthemselves in the opposite order.</p>\n<h2 id=\"group-theory-the-cyclic-group-of-roots-of-unity\">Group theory: the cyclic group of roots of unity</h2>\n<p>Let’s look at the set of z_k (roots of unity) for some\nn:</p>\n<p>[\\mu_n=\\left{z_k=e^{2\\pi ik/n}:k=0,1,\\dots,n-1\\right}]</p>\n<p>This set - along with the multiplication operation - forms a <em>group</em>.\nLet’s prove that.</p>\n<p><strong>Closure:</strong> Assume z,y\\in\\mu_n (so z^n=1 and\ny^n=1). Then:</p>\n<p>[(zy)^n=z^n y^n=1]</p>\n<p>Therefore zy\\in\\mu_n.</p>\n<p><strong>Identity:</strong> The number 1\\in\\mu_n, so it can serve as our\nidentity element for the group.</p>\n<p><strong>Associativity:</strong> Taken directly from the associativity of the\nmultiplication operation on complex numbers.</p>\n<p><strong>Inverse:</strong> We’ve just seen in the section on conjugates that\nz^{-1} is an n-th root of unity when z is. So\nthe inverse exists and is part of the group.</p>\n<p>Because the operation we have is just complex multiplication, we can\ntrivially derive additional properties, like commutativity. Therefore,\nthe group \\mu_n is <em>Abelian</em>.</p>\n<p>Finally, we can show that the group is also <em>cyclic</em> and discuss its\n<em>generators</em>.</p>\n<p>For slightly simpler notation, let’s denote w=z_1. So the group\ncan be represented as:</p>\n<p>[\\mu_n=\\left{1, w, w^2,\\dots,w^{n-1}\\right}]</p>\n<p>This makes it obvious that the group is cyclic - all its elements can be\nexpressed as integer powers of w. And w is a generator\nfor the group.</p>\n<p>But interestingly, w is not the only generator for this group.\nAny w^k can be a generator, as long as k and n\nare co-prime. For example, consider the group \\mu_6:</p>\n<p>[\\mu_6=\\left{1, w, w^2,w^3,w^4,w^5\\right}]</p>\n<p>Obviously, w is a generator for this group. But w^2\nisn’t! If we raise it to various powers we get:</p>\n<p>[\\begin{aligned}\n(w^2)^0&amp;=1<br />\n(w^2)^1&amp;=w^2<br />\n(w^2)^2&amp;=w^4<br />\n(w^2)^3&amp;=w^6=1<br />\n(w^2)^4&amp;=w^8=w^2<br />\n(w^2)^5&amp;=w^{10}=w^4<br />\n\\end{aligned}]</p>\n<p>Since w^6=1, the powers of w^2 repeat after just three\nsteps, so they only reach three out of six group elements.</p>\n<p>But if k and n are co-prime, w^k is a generator;\nin the case of \\mu_6, we can easily verify that w and\nw^5 are the only generators. The roots that are generators for\nthe group are also called the <em>primitive roots</em>.</p>\n<h2 id=\"sums-of-roots-of-unity\">Sums of roots of unity</h2>\n<p>Let’s take the n-roots of unity (n&gt;1), denoted as above\nwith:</p>\n<p>[\\mu_n=\\left{1, w, w^2,\\dots,w^{n-1}\\right}\\qquad w=e^{2\\pi i/n}]</p>\n<p>What’s the sum of all these roots?</p>\n<p>[S=1+w+w^2+\\cdots+w^{n-1}=\\sum_{i=0}^{n-1}w^i]</p>\n<p>This is just the sum of a geometric series with the first term 1 and\ncommon ratio r=w. Therefore:</p>\n<p>[S=\\frac{1-w^n}{1-w}=\\frac{1-1}{1-w}=0]</p>\n<p>If you look carefully at the visualization shown above - this makes\nsense geometrically. All the roots of unity are evenly spread around the\nunit circle, so viewing them as vectors, all components cancel out.</p>\n<p>How about the sum of roots raised to some integer power k? Let’s\ntry this for k=2 (assuming n&gt;2):</p>\n<p>[S_2=1+w^2+w^4+\\cdots+w^{2(n-1)}]</p>\n<p>Using the same geometric series sum formula (with r=w^2), we\nget:</p>\n<p>[S_2=\\frac{1-w^{2n}}{1-w^2}=\\frac{1-(w^{n})^{2}}{1-w^2}=0]</p>\n<p>In general, when k is not divisible by n, the sum is 0.\nBut when k <em>is</em> divisible by n, each power becomes:</p>\n<p>[w^k=e^{2\\pi ik/n}=1]</p>\n<p>And n of these sum to n. In conclusion:</p>\n<p>[\\sum_{i=0}^{n-1}w^{ki}=\n\\begin{cases}\nn &amp; k \\equiv 0 \\pmod{n}<br />\n0 &amp; \\text{otherwise} <br />\n\\end{cases}]</p>\n<h2 id=\"powers-of-roots-of-unity-as-an-orthogonal-basis\">Powers of roots of unity as an orthogonal basis</h2>\n<p>Let’s consider the powers of roots of unity as vectors. We’ll continue\nusing the notation:</p>\n<p>[\\mu_n=\\left{1, w, w^2,\\dots,w^{n-1}\\right}\\qquad w=e^{2\\pi i/n}]</p>\n<p>We’ll begin with the 0-th power vector - each of the roots raised to\npower 0:</p>\n<p>[v_0=\\left[1, 1, 1,\\dots,1\\right]]</p>\n<p>Then power 1 - just the roots themselves:</p>\n<p>[v_1=\\left[1, w, w^2,\\dots,w^{n-1}\\right]]</p>\n<p>Each root raised to power 2:</p>\n<p>[v_2=\\left[1, w^2, w^4,\\dots,w^{2(n-1)}\\right]]</p>\n<p>And so on, until power n-1:</p>\n<p>[v_{n-1}=\\left[1, w^{n-1}, w^{2(n-1)},\\dots,w^{(n-1)(n-1)}\\right]]</p>\n<p>To go full linear algebra mode, we’ll collect these vectors into an\nn\\times n matrix:</p>\n<p>[V=\\begin{bmatrix}\n1 &amp; 1 &amp; 1 &amp; \\cdots &amp; 1 <br />\n1 &amp; w &amp; w^2 &amp; \\cdots &amp; w^{n-1} <br />\n1 &amp; w^2 &amp; w^4 &amp; \\cdots &amp; w^{2(n-1)} <br />\n\\vdots &amp; &amp; &amp; &amp; \\vdots <br />\n1 &amp; w^{n-1} &amp; w^{2(n-1)} &amp; \\cdots &amp; w^{(n-1)(n-1)} <br />\n\\end{bmatrix}]</p>\n<p>Let’s calculate the inner product of two matrix rows. Recall that when\ncomputing the inner product on vectors over \\mathbb{C}, we\nconjugate the second element:</p>\n<p>[\\begin{aligned}\n\\langle v_i,v_j\\rangle&amp;=\\sum_{k=0}^{n-1}v_i[k]\\cdot v_j[k]^*<br />\n&amp;=\\sum_{k=0}^{n-1}w^{ik}\\cdot (w^{jk})^*<br />\n&amp;=\\sum_{k=0}^{n-1}w^{ik}\\cdot w^{-jk}<br />\n&amp;=\\sum_{k=0}^{n-1}w^{(i-j)k}<br />\n\\end{aligned}]</p>\n<p>But hold on, we’ve just calculated this exact sum in the previous\nsection. We get:</p>\n<p>[\\langle v_i,v_j\\rangle=\\sum_{k=0}^{n-1}w^{(i-j)k}=\n\\begin{cases}\nn &amp; (i-j) \\equiv 0 \\pmod{n}<br />\n0 &amp; \\text{otherwise} <br />\n\\end{cases}]</p>\n<p>Since the vector indices i and j only run over\n[0..n-1], this is equivalent to:</p>\n<p>[\\langle v_i,v_j\\rangle=\\sum_{k=0}^{n-1}w^{(i-j)k}=\n\\begin{cases}\nn &amp; i=j<br />\n0 &amp; \\text{otherwise} <br />\n\\end{cases}]</p>\n<p>Which is to say: the vectors v_i and v_j are\nmutually orthogonal when i\\neq j. Since we have a set of n orthogonal vectors\nin \\mathbb{C}^n, these vectors form a <em>basis</em> for\n\\mathbb{C}^n - any vector in this space can be represented as a\nlinear combination of v_i. This fact has far reaching\nconsequences in math and engineering, since it plays a critical part in\nforming the DFT (Discrete Fourier Transform), and V is also\nknown as the <em>Fourier matrix</em>. But this will be a topic for a separate\npost.</p>\n<p>Another fun thing to notice before we’re finished here: the matrix\nV happens to be <em>symmetric</em> (this is trivial to check by\nobservation). Therefore, its columns are also mutually orthogonal.</p>\n<hr />\n<div class=\"table-wrap\"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><a href=\"#footnote-reference-1\">[1]</a></td><td>In general - counting multiplicity - there are exactly n complex roots. This is because we’re essentially finding the solutions to the polynomial z^n-1=0, which has n complex solutions according to the Fundamental theorem of algebra.</td></tr></tbody></table></div>\n<div class=\"table-wrap\"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><a href=\"#footnote-reference-2\">[2]</a></td><td>For some notes on converting between the different representations of complex numbers, see my post on <a href=\"https://eli.thegreenplace.net/2024/notes-on-the-euler-formula/\" rel=\"nofollow ugc noopener\">the Euler formula</a>.</td></tr></tbody></table></div>\n<div class=\"table-wrap\"><table><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><a href=\"#footnote-reference-3\">[3]</a></td><td>When k=n, \\theta=2\\pi, which is the same as \\theta=0. On a unit circle, the roots start repeating once one full cycle is completed; therefore, there are only n unique roots with k=0,1,\\dots,n-1.</td></tr></tbody></table></div>","headings":[{"level":2,"text":"Basics: roots of unity for real numbers","id":"basics-roots-of-unity-for-real-numbers"},{"level":2,"text":"Basics: roots of unity for complex numbers","id":"basics-roots-of-unity-for-complex-numbers"},{"level":2,"text":"Calculating complex roots using polar coordinates","id":"calculating-complex-roots-using-polar-coordinates"},{"level":2,"text":"Some basic examples","id":"some-basic-examples"},{"level":2,"text":"Roots of unity and rotations on the unit circle","id":"roots-of-unity-and-rotations-on-the-unit-circle"},{"level":2,"text":"Geometry: roots of unity and regular polygons","id":"geometry-roots-of-unity-and-regular-polygons"},{"level":2,"text":"Conjugates of roots of unity","id":"conjugates-of-roots-of-unity"},{"level":2,"text":"Group theory: the cyclic group of roots of unity","id":"group-theory-the-cyclic-group-of-roots-of-unity"},{"level":2,"text":"Sums of roots of unity","id":"sums-of-roots-of-unity"},{"level":2,"text":"Powers of roots of unity as an orthogonal basis","id":"powers-of-roots-of-unity-as-an-orthogonal-basis"}]}}