{
  "aliases": null,
  "backlinks": [
    {
      "field": "uses",
      "target": "081YA6RCX6"
    },
    {
      "field": "uses",
      "target": "0CQW20XGFW"
    },
    {
      "field": "uses",
      "target": "0TWPTQ0AD7"
    },
    {
      "field": "uses",
      "target": "0X89GC65N1"
    }
  ],
  "body": "\n## Statement\n\nLet $a$, $b$ and $c$ be real numbers with $(a, b) \\neq (0, 0)$, and let $L = \\{(x, y) \\in \\mathbb{R}^2 : a x + b y + c = 0\\}$ be a [[line|0MP9BCF6DP]] in the plane.\nLet $P = (x_0, y_0)$ be a point of $\\mathbb{R}^2$. The distance from $P$ to $L$ is the smallest [[Euclidean distance|0NPPGHQNXQ]] $d(P, Q)$ for $Q \\in L$. Then\n$$\\operatorname{dist}(P, L) = \\frac{|a x_0 + b y_0 + c|}{\\sqrt{a^2 + b^2}}.$$\n\n## Remarks\n\nThe smallest distance is reached at exactly one point $Q$ of $L$, the foot of the perpendicular from $P$. It is $Q = P - \\frac{a x_0 + b y_0 + c}{a^2 + b^2} (a, b)$.\nIn $\\mathbb{R}^n$, let $L$ be the line through the point $A$ with the direction vector $v$. The distance from $P$ to $L$ is the length of the part of $P - A$ that is perpendicular to $v$: the length of $(P - A) - \\frac{(P - A) \\cdot v}{v \\cdot v} v$.\nIn $\\mathbb{R}^3$ this distance is also $\\|(P - A) \\times v\\| / \\|v\\|$.\n\n## Explanations\n\n### L1 human\n\nThe shortest way from a point to a line is the path that meets the line at a right angle. The formula measures this path. For the line $y = 0$, thus $a = 0$, $b = 1$, $c = 0$, it gives $|y_0|$: the height of the point above or below the horizontal axis.\n",
  "commit": "f591989ed15704e9d8755a7a5a6426d73de7a3ae",
  "front": {
    "kind": "statement",
    "msc": [
      "51N20"
    ],
    "name": "Distance from a point to a line",
    "role": "proposition",
    "same_as": {
      "wikidata": "Q2485106",
      "wikipedia": "Distance from a point to a line"
    },
    "sources": [
      {
        "locator": "Line defined by an equation",
        "url": "https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line"
      }
    ],
    "tag": "01AAYNSBN6",
    "uses": [
      "0NPPGHQNXQ",
      "0MP9BCF6DP",
      "0WQJJCCTC8"
    ]
  },
  "kind": "statement",
  "link": "https://math2.tamnd.com/node/01AAYNSBN6/",
  "links": [
    {
      "field": "uses",
      "target": "0NPPGHQNXQ"
    },
    {
      "field": "uses",
      "target": "0MP9BCF6DP"
    },
    {
      "field": "uses",
      "target": "0WQJJCCTC8"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/01AAYNSBN6.md",
  "msc": [
    "51N20"
  ],
  "name": "Distance from a point to a line",
  "prov": null,
  "role": "proposition",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/01A/01AAYNSBN6.md",
  "status": null,
  "tag": "01AAYNSBN6",
  "uri": "m2://01AAYNSBN6",
  "url": "https://math2.tamnd.com/wiki/distance-from-a-point-to-a-line/",
  "writing": {
    "tag": "01AAYNSBN6",
    "kind": "statement",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
