{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nA set $C \\subseteq \\mathbb{R}^n$ is convex if $t x + (1 - t) y \\in C$ for all $x, y \\in C$ and all $t \\in [0, 1]$.\nLet $C \\subseteq \\mathbb{R}^n$ be convex.\nA function $f \\colon C \\to \\mathbb{R}$ is convex if, for all $x, y \\in C$ and all $t \\in [0, 1]$,\n$$f(t x + (1 - t) y) \\le t f(x) + (1 - t) f(y).$$\nThe function $f$ is strictly convex if the inequality is strict for all $x \\ne y$ and all $t \\in (0, 1)$.\n\n## Remarks\n\nIf $C$ is open and $f$ is differentiable on $C$, then $f$ is convex if and only if $f(y) \\ge f(x) + \\nabla f(x) \\cdot (y - x)$ for all $x, y \\in C$.\nLet $C$ be open and let $f$ be of class $C^2$. Then $f$ is convex if and only if its [[Hessian matrix|0SCSQWXRA4]] is positive semidefinite at each point of $C$.\nEach local minimum of a convex function is a global minimum, and a strictly convex function has at most one global minimum.\nA function can be convex in each variable separately but not convex. The function $f(x, y) = x y$ is linear in each variable, but $f(t, -t) = -t^2$ is not convex.\n\n## Explanations\n\n### L1 human\n\nA convex function is bowl-shaped: the straight segment between two points of its graph never goes below the graph.\nExamples are $\\|x\\|^2$ and, on all of $\\mathbb{R}^n$, each linear function.\n",
  "commit": "6ac761d40018146541484a9e8b9eafd6ecc303dc",
  "front": {
    "defines": "07GR3TNW4H",
    "kind": "definition",
    "msc": [
      "26B25"
    ],
    "name": "Convex function on R^n",
    "sources": [
      {
        "locator": "Definition",
        "url": "https://en.wikipedia.org/wiki/Convex_function"
      },
      {
        "locator": "Functions of several variables",
        "url": "https://en.wikipedia.org/wiki/Convex_function"
      }
    ],
    "tag": "0M1GJSWZDA",
    "uses": [
      "0JPCHTXWG0"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/0M1GJSWZDA/",
  "links": [
    {
      "field": "defines",
      "target": "07GR3TNW4H"
    },
    {
      "field": "uses",
      "target": "0JPCHTXWG0"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/0M1GJSWZDA.md",
  "msc": [
    "26B25"
  ],
  "name": "Convex function on R^n",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/0M1/0M1GJSWZDA.md",
  "status": null,
  "tag": "0M1GJSWZDA",
  "uri": "m2://0M1GJSWZDA",
  "url": "https://math2.tamnd.com/wiki/convex-function-on-r-n-definition/",
  "writing": {
    "tag": "0M1GJSWZDA",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
