Convex Function 8B45Fc
1. **Problem Statement:** Define a convex function.
2. **Definition:** A function $f: \mathbb{R}^n \to \mathbb{R}$ is called convex if for all $x, y \in \mathbb{R}^n$ and for all $t \in [0,1]$, the following inequality holds:
$$
f(tx + (1-t)y) \leq t f(x) + (1-t) f(y)
$$
This means the function lies below or on the straight line segment connecting $f(x)$ and $f(y)$.
3. **Important properties:**
- If $f$ is twice differentiable, then $f$ is convex if and only if its Hessian matrix $H_f(x)$ is positive semidefinite for all $x$.
- For single-variable functions, convexity means $f''(x) \geq 0$ for all $x$ in the domain.
4. **Explanation:** Intuitively, a convex function curves upwards or is a straight line, never bending downwards.
5. **Example:** The function $f(x) = x^2$ is convex because its second derivative $f''(x) = 2 \geq 0$.
**Final answer:** A convex function is one where the line segment between any two points on the graph lies above or on the graph itself, formally defined by the inequality above.