```markdown
### Examples

#### Quadratic Function
- **Function:** \( f(x) = (1/2)x^T P x + q^T x + r \) (with \( P \in S^n \))
- **Gradient:** \( \nabla f(x) = P x + q \)
- **Hessian:** \( \nabla^2 f(x) = P \)
- **Convexity:** Convex if \( P \succeq 0 \)

#### Least-Squares Objective
- **Function:** \( f(x) = \|Ax - b\|_2^2 \)
- **Gradient:** \( \nabla f(x) = 2A^T(Ax - b) \)
- **Hessian:** \( \nabla^2 f(x) = 2A^T A \)
- **Convexity:** Convex (for any \( A \))

#### Quadratic-over-Linear
- **Function:** \( f(x, y) = x^2/y \)
- **Hessian:** 
  \[
  \nabla^2 f(x, y) = \frac{2}{y^3} \begin{bmatrix} y & -x \\ -x & x \end{bmatrix}^T \succeq 0
  \]
- **Convexity:** Convex for \( y > 0 \)

#### Graph
- A 3D plot illustrating the function \( f(x, y) \) over a range of \( x \) and \( y \).

---

*A. d’Aspremont. Convex Optimization M2.*  
Page 11/67
```
