### Level curves

In mathematics, a **level set** of a real-valued function of *n* real variables *f* is a set of the form

- $L\_c(f)\; =\; \backslash left\backslash \{\; (x\_1,\; \backslash cdots,\; x\_n)\; \backslash ,\; \backslash mid\; \backslash ,\; f(x\_1,\; \backslash cdots,\; x\_n)\; =\; c\; \backslash right\backslash \}~,$

that is, a set where the function takes on a given constant value *c*.

When the number of variables is two, a level set is generically a curve, called a **level curve**, **contour line**, or **isoline**. When *n* = 3, a level set is called a **level surface** (see also isosurface), and for higher values of *n* the level set is a **level hypersurface**.

A set of the form

- $L\_c^-(f)\; =\; \backslash left\backslash \{\; (x\_1,\; \backslash cdots,\; x\_n)\; \backslash ,\; \backslash mid\; \backslash ,\; f(x\_1,\; \backslash cdots,\; x\_n)\; \backslash leq\; c\; \backslash right\backslash \}$

is called a **sublevel set** of *f* (or, alternatively, a **lower level set** or **trench** of *f*).

- $L\_c^+(f)\; =\; \backslash left\backslash \{\; (x\_1,\; \backslash cdots,\; x\_n)\; \backslash ,\; \backslash mid\; \backslash ,\; f(x\_1,\; \backslash cdots,\; x\_n)\; \backslash geq\; c\; \backslash right\backslash \}$

is called a **superlevel set** of *f*.^{[1]}^{[2]}

A level set is a special case of a fiber.

## Properties

- The gradient of
*f*at a point is perpendicular to the level set of*f*at that point.

- The sublevel sets of a convex function are convex (the converse is however not generally true).