{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nWe argue by induction on $j$.\n\n1. Let $V$ be an inner product space over $\\mathbb{K} = \\R$ or $\\C$, with [[inner product|0VGSYBWHV2]] $\\ip{\\cdot}{\\cdot}$. Let $v_1, \\dots, v_k \\in V$ be [[linearly independent|0EVHJFTG9Z]].\n2. The [[Gram–Schmidt process|0VT6P0GNQR]] sets $u_1 = v_1$ and $u_j = v_j - \\sum_{i=1}^{j-1} c_{ji} u_i$ for $j \\ge 2$, where $c_{ji} = \\ip{v_j}{u_i} / \\ip{u_i}{u_i}$.\n3. The formula for $u_j$ makes sense only if $u_1, \\dots, u_{j-1}$ are nonzero. So we prove, for $1 \\le j \\le k$, the claim $P(j)$ below.\n4. $P(j)$ says: the vectors $u_1, \\dots, u_j$ are defined and nonzero, they are pairwise [[orthogonal|0TS7VZJBWD]], and $\\operatorname{span}(u_1, \\dots, u_j) = \\operatorname{span}(v_1, \\dots, v_j)$. Here span is the [[linear span|0HR573CHNM]].\n5. Base case $j = 1$. We have $u_1 = v_1$. A linearly independent family has no zero vector, since $1 \\cdot 0 = 0$ is a nontrivial vanishing combination. So $u_1 \\ne 0$.\n6. Also $\\operatorname{span}(u_1) = \\operatorname{span}(v_1)$, and there is no pair to check. So $P(1)$ holds.\n7. Induction step. Let $2 \\le j \\le k$ and assume $P(j-1)$. Write $S = \\operatorname{span}(u_1, \\dots, u_{j-1}) = \\operatorname{span}(v_1, \\dots, v_{j-1})$.\n8. Each $u_i$ with $i \u003c j$ is nonzero, so $\\ip{u_i}{u_i} \u003e 0$. Hence the numbers $c_{ji}$ and the vector $u_j$ are defined.\n9. Fix $m \u003c j$. Linearity in the first argument gives $\\ip{u_j}{u_m} = \\ip{v_j}{u_m} - \\sum_{i=1}^{j-1} c_{ji} \\ip{u_i}{u_m}$.\n10. By $P(j-1)$, $\\ip{u_i}{u_m} = 0$ for $i \\ne m$ with $i, m \u003c j$. So the sum in step 9 is $c_{jm} \\ip{u_m}{u_m} = \\ip{v_j}{u_m}$.\n11. Hence $\\ip{u_j}{u_m} = 0$. By conjugate symmetry, also $\\ip{u_m}{u_j} = \\overline{0} = 0$. With $P(j-1)$, the vectors $u_1, \\dots, u_j$ are pairwise orthogonal.\n12. By step 2, $u_j = v_j - s$ with $s = \\sum_{i \u003c j} c_{ji} u_i \\in S$. Since $S \\subseteq \\operatorname{span}(v_1, \\dots, v_j)$, we get $u_j \\in \\operatorname{span}(v_1, \\dots, v_j)$.\n13. Also $u_1, \\dots, u_{j-1} \\in S \\subseteq \\operatorname{span}(v_1, \\dots, v_j)$. So $\\operatorname{span}(u_1, \\dots, u_j) \\subseteq \\operatorname{span}(v_1, \\dots, v_j)$, because the span is the smallest subspace that contains the vectors.\n14. Conversely, $v_j = u_j + s$ with $s \\in S \\subseteq \\operatorname{span}(u_1, \\dots, u_j)$. With $v_1, \\dots, v_{j-1} \\in S$, this gives the reverse inclusion. So the two spans are equal.\n15. Suppose that $u_j = 0$. Then $v_j = s \\in S = \\operatorname{span}(v_1, \\dots, v_{j-1})$.\n16. Write $v_j = \\sum_{i \u003c j} b_i v_i$. Then $\\sum_{i\u003cj} b_i v_i - v_j = 0$ is a vanishing combination with coefficient $-1$ at $v_j$. This contradicts linear independence.\n17. Hence $u_j \\ne 0$, and $P(j)$ holds.\n18. By induction, $P(k)$ holds, and $P(j)$ holds for every $j \\le k$. So $u_1, \\dots, u_k$ are nonzero and pairwise orthogonal, with the stated spans.\n\n## Idea\n\nEach new vector $u_j$ is $v_j$ minus its components along the earlier $u_i$. Because the earlier vectors are already orthogonal, subtracting the component along $u_m$ kills exactly the inner product with $u_m$. The vector $u_j$ cannot be zero, since then $v_j$ would be a combination of the earlier $v_i$.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "kind": "proof",
    "msc": [
      "15A63",
      "65F25"
    ],
    "name": "Proof that the Gram–Schmidt vectors are orthogonal",
    "proves": "0WXBGBTA3D",
    "sources": [
      {
        "locator": "Theorem 6.32",
        "url": "https://linear.axler.net/LADR4e.pdf"
      }
    ],
    "tag": "EG3D04CHCW",
    "uses": [
      "0VGSYBWHV2",
      "0VT6P0GNQR",
      "0TS7VZJBWD",
      "0EVHJFTG9Z",
      "0HR573CHNM"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/EG3D04CHCW/",
  "links": [
    {
      "field": "proves",
      "target": "0WXBGBTA3D"
    },
    {
      "field": "uses",
      "target": "0VGSYBWHV2"
    },
    {
      "field": "uses",
      "target": "0VT6P0GNQR"
    },
    {
      "field": "uses",
      "target": "0TS7VZJBWD"
    },
    {
      "field": "uses",
      "target": "0EVHJFTG9Z"
    },
    {
      "field": "uses",
      "target": "0HR573CHNM"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/EG3D04CHCW.md",
  "msc": [
    "15A63",
    "65F25"
  ],
  "name": "Proof that the Gram–Schmidt vectors are orthogonal",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/EG3/EG3D04CHCW.md",
  "status": null,
  "tag": "EG3D04CHCW",
  "uri": "m2://EG3D04CHCW",
  "url": "https://math2.tamnd.com/wiki/proof-that-the-gram-schmidt-vectors-are-orthogonal/",
  "writing": {
    "tag": "EG3D04CHCW",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
