{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $D = (d_{ij})$ be an $n \\times n$ [[symmetric matrix|0VR671PHE5]] with $d_{ii} = 0$ and $d_{ij} \\ge 0$, the dissimilarities of $n$ objects, and let $1 \\le k \u003c n$.\n*Multidimensional scaling* seeks points $x_1, \\ldots, x_n \\in \\R^k$ whose distances $\\abs{x_i - x_j}$ approximate the $d_{ij}$.\n*Classical multidimensional scaling* computes them as follows:\n\n1. Let $D^{(2)} = (d_{ij}^2)$ and $J = I_n - \\tfrac{1}{n} \\mathbf{1} \\mathbf{1}^T$, where $\\mathbf{1}$ is the vector of ones, and let $B = -\\tfrac{1}{2} J D^{(2)} J$.\n2. Let $\\lambda_1 \\ge \\cdots \\ge \\lambda_k$ be the $k$ largest [[eigenvalues|0BQAA2BK3Q]] of $B$, assumed positive, with orthonormal [[eigenvectors|0N6960W0BV]] $e_1, \\ldots, e_k$.\n3. Let $x_i \\in \\R^k$ be the $i$-th row of the $n \\times k$ matrix $\\begin{pmatrix} \\sqrt{\\lambda_1} e_1 \u0026 \\cdots \u0026 \\sqrt{\\lambda_k} e_k \\end{pmatrix}$.\n\n## Remarks\n\nThe matrix $D$ is the matrix of [[Euclidean distances|0NPPGHQNXQ]] of some points in $\\R^k$ exactly when $B$ is [[positive semidefinite|01MMVW8CKC]] of rank at most $k$.\nIn that case classical scaling recovers the points up to a translation and an orthogonal transformation, since $B$ is then the Gram matrix of the centred points.\nExample: three points on a line at distances $d_{12} = d_{23} = 1$, $d_{13} = 2$.\nThe centred configuration $-1, 0, 1$ has Gram matrix $B = \\begin{pmatrix} 1 \u0026 0 \u0026 -1 \\\\ 0 \u0026 0 \u0026 0 \\\\ -1 \u0026 0 \u0026 1 \\end{pmatrix}$, with largest eigenvalue $2$ and eigenvector $(1, 0, -1)/\\sqrt{2}$.\nStep 3 gives the coordinates $1, 0, -1$, the original points after a reflection.\nNon-example: if $d_{12} = d_{23} = 1$ and $d_{13} = 3$, the triangle inequality fails, so no points in any $\\R^k$ realise $D$, and $B$ has a negative eigenvalue.\nMetric and non-metric scaling instead minimise a stress function, such as $\\sum_{i \u003c j} (d_{ij} - \\abs{x_i - x_j})^2$, by iteration.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "EZ596QFCKY",
    "kind": "definition",
    "msc": [
      "62H25",
      "62H30"
    ],
    "name": "Multidimensional scaling",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Multidimensional_scaling"
      }
    ],
    "tag": "R4WG4AQH56",
    "uses": [
      "0VR671PHE5",
      "0BQAA2BK3Q",
      "0N6960W0BV",
      "01MMVW8CKC",
      "0NPPGHQNXQ"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/R4WG4AQH56/",
  "links": [
    {
      "field": "defines",
      "target": "EZ596QFCKY"
    },
    {
      "field": "uses",
      "target": "0VR671PHE5"
    },
    {
      "field": "uses",
      "target": "0BQAA2BK3Q"
    },
    {
      "field": "uses",
      "target": "0N6960W0BV"
    },
    {
      "field": "uses",
      "target": "01MMVW8CKC"
    },
    {
      "field": "uses",
      "target": "0NPPGHQNXQ"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/R4WG4AQH56.md",
  "msc": [
    "62H25",
    "62H30"
  ],
  "name": "Multidimensional scaling",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/R4W/R4WG4AQH56.md",
  "status": null,
  "tag": "R4WG4AQH56",
  "uri": "m2://R4WG4AQH56",
  "url": "https://tamnd.github.io/math2/wiki/multidimensional-scaling-definition/",
  "writing": {
    "tag": "R4WG4AQH56",
    "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
      }
    ]
  }
}
