Read this lesson as text

Introduction to Convexity

Optimization · Axiom Academy

LESSON Introduction to Convexity Understanding the fundamental concept that makes optimization problems tractable 1. Convex Sets: The Line Segment Property A set is convex if for any two points in the set, the entire line segment connecting them is also contained in the set. This simple geometric property is the foundation of convexity. 2. Convex Functions: The Bowl Shape A function is convex if its graph always lies below the line segment connecting any two points on it. Visually, convex functions have a "bowl" or "U" shape - they curve upward. 3. Why Convexity Matters: Local = Global The most important property of convex functions: any local minimum is also a global minimum . This means optimization algorithms won't get stuck in local minima! 4. Testing for Convexity: Second Derivative Test For twice-differentiable functions, we can test convexity using the second derivative. A function is convex if and only if its second derivative is non-negative everywhere. 5. Examples of Convex and Non-Convex Functions Let's see some common functions and whether they are convex or not. Understanding these examples will help you recognize convexity in practice. f(x) = x 2 - Quadratic with positive coefficient f(x) = e x - Exponential function f(x) = -log(x) for x > 0 - Negative logarithm f(x) = -x 2 - Concave (flipped bowl) f(x) = sin(x) - Oscillating function f(x) = x 3 - Has inflection point

This is the written version of the interactive lesson above. See the full Optimization course.