Convex Sets
A line segment between and is all points with .
Convex Set
A convex set contains line segment between any two points in the set, that is, if , then for all .
Link to original
Example of Convex Sets
- Line Segments: for some
- Line: for some
- Halfspaces: for some and .
- Balls of Radius : We use the Euclidean norm / distance as is equal to the length of the line segment between points and .
Convex combination of the points : Any point of the form with
Convex hull is a set which is a convex set of all points that can be obtained as convex combinations of the .

Proof
Convex Functions
A function is convex if:
- is a convex set
- for all and
We call a function concave if is convex.
A function is strictly convex if is convex and for all , and .

Example Functions
Given is the set of positive reals.
Convex
- affine: on , for any
- exponential: , for any
- powers: on , for any or
- powers of absolute value: on , for
- …
First-order condition
is differentiable if is open and the gradient exist at each .
1st-order condition: differentiable with convex domain is convex iff for all , i.e. first-order approximation of is a global under-estimator

Second-order condition
is twice differentiable if is open and the Hessian , exist at each .
2nd-order conditions: for twice differentiable with convex domain is convex iff for all i.e. the Hessian is positive semi-definite (all of the eigenvalues are non-negative)
There is a special case when :
- A twice continuously differentiable function with is convex if is a convex set and for all .
Operations Preserving Convexity
Methods for establishing convexity of a function
- Verify the definition.
- For twice differentiable functions, show .
- Show that is obtained from simple convex functions by operations that preserve convexity.
Nonnegative weighted sums of convex functions are convex, i.e. if and are convex functions and , then is a convex function.
Composition with an affine function, i.e. if is a convex function and , , then given by: is a convex function.
Pointwise maximum of convex functions are convex, i.e. if and are convex functions, then is a convex function.
Pointwise supremum, i.e. if is convex in for each fixed then is a convex function.
Note: a maximum of a set must be an element of the set, a supremum need not be.
Convex optimisation
Only in Typst!
slide 24 general optimisation
slide 25 optimal / locally optimal points
slides 26-27 implicit constraints
slides 28-29 convex optimisation
slides 30-32 local and global optima
slides 33 linear programming problems
slides 34 quad
slides 35-36 least squares regression





