{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $\\varphi$ be the scaling function of a [[multiresolution analysis|1GHQMBR7DE]] of $L^2(\\R)$, with [[refinement equation|YH4BERB952]] $\\varphi(x) = \\sqrt2 \\sum_k h_k \\varphi(2x - k)$.\nPut $g_k = (-1)^k \\overline{h_{1-k}}$ for $k \\in \\Z$.\nFor a sequence $a = (a_n)_{n \\in \\Z} \\in \\ell^2(\\Z)$, one *level* of the discrete wavelet transform gives the two sequences\n$$c_k = \\sum_{n \\in \\Z} \\overline{h_{n - 2k}} \\, a_n, \\qquad d_k = \\sum_{n \\in \\Z} \\overline{g_{n - 2k}} \\, a_n, \\qquad k \\in \\Z.$$\nThe *discrete wavelet transform* with $J \\ge 1$ levels applies one level to $a$, then to the resulting $c$, and so on $J$ times.\nIts output is the detail sequences of all levels together with the last coarse sequence.\n\n## Remarks\n\nThe map $a \\mapsto (c, d)$ is a unitary operator from $\\ell^2(\\Z)$ onto $\\ell^2(\\Z) \\oplus \\ell^2(\\Z)$, so the transform is inverted by its adjoint.\nIf $a_n = \\ip{f}{\\varphi_{j+1, n}}$ for $f \\in L^2(\\R)$, where $\\varphi_{j,k}(x) = 2^{j/2} \\varphi(2^j x - k)$, then $c_k = \\ip{f}{\\varphi_{j,k}}$ and $d_k = \\ip{f}{\\psi_{j,k}}$ for the associated orthonormal [[wavelet|4PZ35C0GV3]] $\\psi$.\nThe same name is used for the coefficient family $(\\ip{f}{\\psi_{j,k}})_{j,k}$ of a function, and for finite signals with periodic or other boundary rules.\n\nExample: for the Haar filter $h_0 = h_1 = 1/\\sqrt2$ one gets $g_0 = 1/\\sqrt2$ and $g_1 = -1/\\sqrt2$.\nThen $c_k = (a_{2k} + a_{2k+1})/\\sqrt2$ and $d_k = (a_{2k} - a_{2k+1})/\\sqrt2$.\nFor $a = (4, 2, 5, 5)$ (and zeros elsewhere) one level gives $c = (6/\\sqrt2, 10/\\sqrt2)$ and $d = (2/\\sqrt2, 0)$.\nEnergy is preserved: $16 + 4 + 25 + 25 = 70 = 18 + 50 + 2 + 0$.\n\nNon-example: the pairwise means $(a_{2k} + a_{2k+1})/2$ alone discard information, since $(1, 0)$ and $(0, 1)$ have the same mean; the transform keeps the details $d_k$ as well.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "P3H4MMC4ZH",
    "kind": "definition",
    "msc": [
      "42C40",
      "65T60",
      "94A12"
    ],
    "name": "Discrete wavelet transform",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Discrete_wavelet_transform"
      }
    ],
    "tag": "FXSY9SXHFZ",
    "uses": [
      "YH4BERB952",
      "1GHQMBR7DE",
      "4PZ35C0GV3"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/FXSY9SXHFZ/",
  "links": [
    {
      "field": "defines",
      "target": "P3H4MMC4ZH"
    },
    {
      "field": "uses",
      "target": "YH4BERB952"
    },
    {
      "field": "uses",
      "target": "1GHQMBR7DE"
    },
    {
      "field": "uses",
      "target": "4PZ35C0GV3"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/FXSY9SXHFZ.md",
  "msc": [
    "42C40",
    "65T60",
    "94A12"
  ],
  "name": "Discrete wavelet transform",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/FXS/FXSY9SXHFZ.md",
  "status": null,
  "tag": "FXSY9SXHFZ",
  "uri": "m2://FXSY9SXHFZ",
  "url": "https://tamnd.github.io/math2/wiki/discrete-wavelet-transform-definition/",
  "writing": {
    "tag": "FXSY9SXHFZ",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
