{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nWe expand the square of the length of a difference of two vectors.\n\n1. Let $u = A - C$ and $v = B - C$. With the [[Euclidean distance|0NPPGHQNXQ]] and the [[length|0XKBKGTCPC]], $\\norm{u} = b$ and $\\norm{v} = a$.\n2. We have $u - v = A - B$, so $c^2 = \\norm{u - v}^2 = (u - v) \\cdot (u - v)$, with the [[dot product|0S52TNNTH9]].\n3. The dot product is bilinear and symmetric. So $(u - v) \\cdot (u - v) = u \\cdot u - 2 \\, u \\cdot v + v \\cdot v = b^2 + a^2 - 2 \\, u \\cdot v$.\n4. The vertices of the [[triangle|0CTNFGYMM2]] are not collinear, so they are distinct. Thus $u \\neq 0$ and $v \\neq 0$, and the [[angle|0GJAJC6TNZ]] $\\gamma$ at $C$ is defined.\n5. By the definition of the angle at $C$, $\\cos \\gamma = \\dfrac{u \\cdot v}{\\norm{u} \\, \\norm{v}} = \\dfrac{u \\cdot v}{ab}$. So $u \\cdot v = ab \\cos \\gamma$.\n6. Steps 2, 3 and 5 give $c^2 = a^2 + b^2 - 2ab \\cos \\gamma$.\n\n## Idea\n\nPut the vertex $C$ at the origin. The side $AB$ is the difference of the two vectors from $C$. Squaring its length produces the two squared sides and a cross term, and the cross term is the dot product, which is $ab \\cos \\gamma$.\n",
  "commit": "68a8c3dc73fd55004b2796431c607c30960d1a85",
  "front": {
    "kind": "proof",
    "msc": [
      "51M04"
    ],
    "name": "Proof of the law of cosines with the dot product",
    "proves": "060ZVZBV3E",
    "sources": [
      {
        "locator": "Using vectors",
        "url": "https://en.wikipedia.org/wiki/Law_of_cosines"
      }
    ],
    "tag": "T5X9ZN2E4M",
    "uses": [
      "0CTNFGYMM2",
      "0GJAJC6TNZ",
      "0NPPGHQNXQ",
      "0XKBKGTCPC",
      "0S52TNNTH9"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/T5X9ZN2E4M/",
  "links": [
    {
      "field": "proves",
      "target": "060ZVZBV3E"
    },
    {
      "field": "uses",
      "target": "0CTNFGYMM2"
    },
    {
      "field": "uses",
      "target": "0GJAJC6TNZ"
    },
    {
      "field": "uses",
      "target": "0NPPGHQNXQ"
    },
    {
      "field": "uses",
      "target": "0XKBKGTCPC"
    },
    {
      "field": "uses",
      "target": "0S52TNNTH9"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/T5X9ZN2E4M.md",
  "msc": [
    "51M04"
  ],
  "name": "Proof of the law of cosines with the dot product",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/T5X/T5X9ZN2E4M.md",
  "status": null,
  "tag": "T5X9ZN2E4M",
  "uri": "m2://T5X9ZN2E4M",
  "url": "https://math2.tamnd.com/wiki/proof-of-the-law-of-cosines-with-the-dot-product/",
  "writing": {
    "tag": "T5X9ZN2E4M",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
