{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $X = (X_1, \\dots, X_n)^{\\mathsf{T}}$ be a random vector in $\\mathbb{R}^n$ with $E[X_i^2] \u003c \\infty$ for each $i$, and let $\\mu = E[X]$ be its mean vector.\nThe covariance matrix of $X$ is the $n \\times n$ matrix $\\Sigma = \\operatorname{Cov}(X)$ with entries\n$$\\Sigma_{ij} = \\operatorname{Cov}(X_i, X_j), \\quad 1 \\le i, j \\le n.$$\nIn matrix form, $\\Sigma = E\\left[(X - \\mu)(X - \\mu)^{\\mathsf{T}}\\right]$.\n\n## Remarks\n\nThe diagonal entries are the [[variances|007QED3E0Y]] $\\Sigma_{ii} = \\operatorname{Var}(X_i)$.\n$\\Sigma$ is symmetric and positive semidefinite: $a^{\\mathsf{T}} \\Sigma a = \\operatorname{Var}(a^{\\mathsf{T}} X) \\ge 0$ for each $a \\in \\mathbb{R}^n$.\nFor a real $m \\times n$ matrix $A$ and $b \\in \\mathbb{R}^m$, $\\operatorname{Cov}(AX + b) = A \\Sigma A^{\\mathsf{T}}$.\nThe covariance matrix and the mean vector are the two parameters of the [[multivariate normal distribution|0G558GJQMW]].\n\n## Explanations\n\n### L1 human\n\nFor a random vector, one number is not enough to describe the spread.\nThe covariance matrix collects the variance of each component and the covariance of each pair in one table.\n",
  "commit": "6ac761d40018146541484a9e8b9eafd6ecc303dc",
  "front": {
    "defines": "0V7G6WMFK0",
    "kind": "definition",
    "msc": [
      "62H05"
    ],
    "name": "Covariance matrix",
    "sources": [
      {
        "locator": "Definition",
        "url": "https://en.wikipedia.org/wiki/Covariance_matrix"
      }
    ],
    "tag": "02CBHV4ZZQ",
    "uses": [
      "0DJ8W3HP2D",
      "007QED3E0Y",
      "0DCT0QZVQ1"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/02CBHV4ZZQ/",
  "links": [
    {
      "field": "defines",
      "target": "0V7G6WMFK0"
    },
    {
      "field": "uses",
      "target": "0DJ8W3HP2D"
    },
    {
      "field": "uses",
      "target": "007QED3E0Y"
    },
    {
      "field": "uses",
      "target": "0DCT0QZVQ1"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/02CBHV4ZZQ.md",
  "msc": [
    "62H05"
  ],
  "name": "Covariance matrix",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/02C/02CBHV4ZZQ.md",
  "status": null,
  "tag": "02CBHV4ZZQ",
  "uri": "m2://02CBHV4ZZQ",
  "url": "https://math2.tamnd.com/wiki/covariance-matrix-definition/",
  "writing": {
    "tag": "02CBHV4ZZQ",
    "kind": "definition",
    "level": "W1",
    "next": [
      {
        "what": "edge instance_of in",
        "note": "one example",
        "have": 0,
        "want": 1
      },
      {
        "what": "edge not_instance_of in",
        "note": "one non-example that fails one clause",
        "have": 0,
        "want": 1
      }
    ]
  }
}
