What is a convex set, what is a convex function, and what does the bowl shape of a convex problem mean for finding a minimum?

Linear algebra and optimisation, Convexity
Level L1 Beginner. Length Short. Nature Th Theoretical.

What's being asked

Whether you know the geometric definitions of a convex set and a convex function and why convexity prevents local traps.

Key idea

A set is convex if the straight line segment joining any two points inside it never leaves the set. A function on a convex set is convex if the straight line (chord) between any two points on its graph lies on or above the graph, creating a bowl shape with no suboptimal local dips.

Steps

  1. Define a convex set: pick any two points x and y in the set; every weighted average θx+(1−θ)y (with 0≤θ≤1) along the straight line between them stays inside the set — visually, a shape with no dents or holes, like a disk or a solid box.
  2. Define a convex function: its input domain is a convex set, and the graph curves upward like a bowl, meaning the chord joining any two points on the graph never dips below the curve: f(θx+(1−θ)y)≤θf(x)+(1−θ)f(y).
  3. State the optimisation consequence: because a bowl cannot have separate higher valleys, any local minimum you reach is guaranteed to be as low as the global minimum — gradient descent cannot get trapped in a fake dip (the formal proof comes at the next level).

Common mistakes

How long your answer should be

3–4 sentences.

Read this

Previous in Linear algebra and optimisation: What does it mean for a symmetric matrix A to be positive definite rather than positive semidefinite, and what shape does x⊤Ax have in each case?
Next in Linear algebra and optimisation: What is a saddle point on a loss surface, and intuitively why are saddle points far more common than local minima in high-dimensional neural networks?