```markdown
### Examples on \( \mathbb{R}^n \) and \( \mathbb{R}^{m \times n} \)

- **Affine functions** are convex and concave; all norms are convex.

#### Examples on \( \mathbb{R}^n \)

- **Affine function**: \( f(x) = a^T x + b \)
- **Norms**: 
  - \( \|x\|_p = \left( \sum_{i=1}^n |x_i|^p \right)^{1/p} \) for \( p \geq 1 \)
  - \( \|x\|_\infty = \max_k |x_k| \)

#### Examples on \( \mathbb{R}^{m \times n} \) (\( m \times n \) matrices)

- **Affine function**:
  - \( f(X) = \text{Tr}(A^T X) + b = \sum_{i=1}^m \sum_{j=1}^n A_{ij} X_{ij} + b \)

- **Spectral (maximum singular value) norm**:
  - \( f(X) = \|X\|_2 = \sigma_{\max}(X) = (\lambda_{\max}(X^T X))^{1/2} \)

*Source: A. d'Aspremont. Convex Optimization M2.*
```