{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nWe write $v - w$ as a sum of two orthogonal vectors and apply the Pythagorean theorem.\n\n1. Let $V$ be an inner product space over $\\R$ or $\\C$, with [[inner product|0VGSYBWHV2]] $\\ip{\\cdot}{\\cdot}$ and [[induced norm|0KG4D8AP6G]] $\\norm{\\cdot}$. Let $W$ be a finite-dimensional subspace, let $v \\in V$ and let $w \\in W$.\n2. By the definition of the [[orthogonal projection|0Q8HZTJC7G]], $v = P_W(v) + w'$ with $P_W(v) \\in W$ and $w' = v - P_W(v) \\in W^\\perp$. Here $W^\\perp$ is the [[orthogonal complement|079D68S3AW]].\n3. Set $a = v - P_W(v)$ and $b = P_W(v) - w$. Then $v - w = a + b$.\n4. Since $W$ is a subspace and $P_W(v), w \\in W$, we have $b \\in W$. Since $a \\in W^\\perp$, we get $\\ip{a}{b} = 0$. So $a$ and $b$ are [[orthogonal|0TS7VZJBWD]].\n5. By the [[Pythagorean theorem|0BVTDM872V]], $\\norm{v - w}^2 = \\norm{a}^2 + \\norm{b}^2$.\n6. Since $\\norm{b}^2 \\ge 0$, this gives $\\norm{v - w}^2 \\ge \\norm{a}^2 = \\norm{v - P_W(v)}^2$.\n7. Both norms are nonnegative, and the square root is increasing on $[0, \\infty)$. So $\\norm{v - P_W(v)} \\le \\norm{v - w}$.\n8. Suppose equality holds. Then the squares are equal, and step 5 gives $\\norm{b}^2 = 0$.\n9. So $\\ip{b}{b} = 0$, and positivity of the inner product gives $b = 0$. That is, $w = P_W(v)$.\n10. Conversely, if $w = P_W(v)$, then both sides equal $\\norm{v - P_W(v)}$. So equality holds only for $w = P_W(v)$.\n\n## Idea\n\nGoing from $v$ to a point $w$ of $W$ can be done in two legs: first from $v$ to $P_W(v)$, then inside $W$ to $w$. The first leg is orthogonal to $W$, so the two legs are at a right angle. By Pythagoras, the detour through $P_W(v)$ is longer unless the second leg is zero.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "kind": "proof",
    "msc": [
      "46C05",
      "65F20"
    ],
    "name": "Proof that the orthogonal projection is the closest point",
    "proves": "0MCDDSCB9Z",
    "sources": [
      {
        "locator": "Theorem 6.61",
        "url": "https://linear.axler.net/LADR4e.pdf"
      }
    ],
    "tag": "6RSYZNC0V8",
    "uses": [
      "0VGSYBWHV2",
      "0KG4D8AP6G",
      "0Q8HZTJC7G",
      "079D68S3AW",
      "0TS7VZJBWD",
      "0BVTDM872V"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/6RSYZNC0V8/",
  "links": [
    {
      "field": "proves",
      "target": "0MCDDSCB9Z"
    },
    {
      "field": "uses",
      "target": "0VGSYBWHV2"
    },
    {
      "field": "uses",
      "target": "0KG4D8AP6G"
    },
    {
      "field": "uses",
      "target": "0Q8HZTJC7G"
    },
    {
      "field": "uses",
      "target": "079D68S3AW"
    },
    {
      "field": "uses",
      "target": "0TS7VZJBWD"
    },
    {
      "field": "uses",
      "target": "0BVTDM872V"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/6RSYZNC0V8.md",
  "msc": [
    "46C05",
    "65F20"
  ],
  "name": "Proof that the orthogonal projection is the closest point",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/6RS/6RSYZNC0V8.md",
  "status": null,
  "tag": "6RSYZNC0V8",
  "uri": "m2://6RSYZNC0V8",
  "url": "https://math2.tamnd.com/wiki/proof-that-the-orthogonal-projection-is-the-closest-point/",
  "writing": {
    "tag": "6RSYZNC0V8",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
