A set C is convex if for any two points
\(x_1, x_2 \in C\), the line segment joining them is also in C.
Mathematically:
\( \theta x_1 + (1-\theta)x_2 \in C, \ \forall \theta \in [0,1] \).
A function \(f(x)\) is convex if: \( f(\theta x_1 + (1-\theta)x_2) \leq \theta f(x_1) + (1-\theta)f(x_2) \).
A convex optimization problem has:
Convex Example: \( f(x) = x^2 \) → Single global minimum at \(x=0\).
Non-Convex Example: \( f(x) = x^4 - 3x^2 + 2 \) → Multiple local minima.
Select function type and try gradient descent updates: