{
  "aliases": null,
  "backlinks": [
    {
      "field": "uses",
      "target": "T37Q055GDA"
    }
  ],
  "body": "\n## Statement\n\nThere is a constant $C$ with the following property.\nFor $x \\in \\C^N$ let $X$ be its [[discrete Fourier transform|TST0GH66A5]],\n$$X_k = \\sum_{n=0}^{N-1} x_n e^{-2\\pi i nk/N}, \\qquad 0 \\le k \u003c N.$$\nFor every integer $N \\ge 2$ some algorithm computes $X$ from any $x \\in \\C^N$ and precomputed roots of unity.\nIt uses at most $C N \\log_2 N$ complex additions and multiplications.\nAn algorithm of this kind is called a *fast Fourier transform* (FFT).\n\n## Remarks\n\nFor $N = 2^m$ the radix-2 [[Cooley–Tukey algorithm|9N8D9E5TB2]] gives the bound: it uses $\\frac{N}{2} \\log_2 N$ complex multiplications and $N \\log_2 N$ complex additions.\nFor general $N$, [[Bluestein's algorithm|RY3QGW87HX]] rewrites the transform as a cyclic convolution of a power-of-two length $M \u003c 4N$, computed by three radix-2 FFTs plus $O(N)$ operations.\nEvaluating the $N$ defining sums directly needs about $N^2$ multiplications, so the gain is a factor of order $N / \\log N$.\nThe inverse transform has the same form with $e^{+2\\pi i nk/N}$ and a factor $1/N$, so it is also computed by an FFT.\nThe bound counts arithmetic operations.\nIn floating-point arithmetic the FFT is also accurate: its normwise error bound grows like $\\log_2 N$ times the unit roundoff, against about $N$ times for direct evaluation.\nWhether $\\Theta(N \\log N)$ operations are necessary is not known in general; lower bounds are known only for restricted models of computation.\n\n## Explanations\n\n### L1 human\n\nThe discrete Fourier transform turns a list of $N$ samples into $N$ frequency coefficients.\nDone naively, it needs $N^2$ multiplications, which is a trillion for a million samples.\nA fast Fourier transform does the same job in a multiple of $N \\log N$ steps, about twenty million for a million samples.\nThis speed-up is what makes digital audio, image compression and fast multiplication of large numbers practical.\n\n### L2 human\n\n\"FFT\" names a family of algorithms rather than one method: Cooley–Tukey for composite lengths, the [[prime-factor algorithm|BH3NNAYJT5]] for coprime factors, and [[Rader's|9HYM2ZMS31]] or Bluestein's algorithm for prime lengths.\nAll exploit the structure of the DFT matrix $(\\omega^{nk})$, which factors into $O(\\log N)$ sparse matrices.\nCombined with the cyclic convolution property of the DFT, the FFT computes convolutions and polynomial products of length $N$ in $O(N \\log N)$ operations.\nSpectral methods for differential equations and fast polynomial interpolation at roots of unity rest on this.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "about": [
      "TST0GH66A5"
    ],
    "kind": "statement",
    "msc": [
      "65T50",
      "65Y20"
    ],
    "name": "Fast Fourier transform",
    "role": "theorem",
    "same_as": {
      "wikidata": "Q623950",
      "wikipedia": "Fast Fourier transform"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Fast_Fourier_transform"
      }
    ],
    "tag": "S966EZX3ZT",
    "uses": [
      "TST0GH66A5",
      "0TGV80E6A4",
      "9N8D9E5TB2",
      "RY3QGW87HX",
      "BH3NNAYJT5",
      "9HYM2ZMS31"
    ]
  },
  "kind": "statement",
  "link": "https://tamnd.github.io/math2/node/S966EZX3ZT/",
  "links": [
    {
      "field": "about",
      "target": "TST0GH66A5"
    },
    {
      "field": "uses",
      "target": "TST0GH66A5"
    },
    {
      "field": "uses",
      "target": "0TGV80E6A4"
    },
    {
      "field": "uses",
      "target": "9N8D9E5TB2"
    },
    {
      "field": "uses",
      "target": "RY3QGW87HX"
    },
    {
      "field": "uses",
      "target": "BH3NNAYJT5"
    },
    {
      "field": "uses",
      "target": "9HYM2ZMS31"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/S966EZX3ZT.md",
  "msc": [
    "65T50",
    "65Y20"
  ],
  "name": "Fast Fourier transform",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/S96/S966EZX3ZT.md",
  "status": null,
  "tag": "S966EZX3ZT",
  "uri": "m2://S966EZX3ZT",
  "url": "https://tamnd.github.io/math2/wiki/fast-fourier-transform/",
  "writing": {
    "tag": "S966EZX3ZT",
    "kind": "statement",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
