```markdown
### Restriction of a Convex Function to a Line

- **Convexity Definition**:  
  A function \( f : \mathbb{R}^n \rightarrow \mathbb{R} \) is convex if and only if the function \( g : \mathbb{R} \rightarrow \mathbb{R} \), defined by  
  \[
  g(t) = f(x + tv), \quad \text{dom } g = \{ t \mid x + tv \in \text{dom } f \}
  \]
  is convex in \( t \) for any \( x \in \text{dom } f \), \( v \in \mathbb{R}^n \).

- **Checking Convexity**:  
  The convexity of \( f \) can be checked by examining the convexity of functions of one variable.

- **Example**:  
  Consider \( f : S^n \rightarrow \mathbb{R} \) with \( f(X) = \log \det X \), where \(\text{dom } X = S_{++}^n\).

  \[
  g(t) = \log \det(X + tV) = \log \det X + \log \det(I + tX^{-1/2}VX^{-1/2})
  \]
  \[
  = \log \det X + \sum_{i=1}^n \log(1 + t\lambda_i)
  \]
  where \( \lambda_i \) are the eigenvalues of \( X^{-1/2}VX^{-1/2} \).

- **Concavity**:  
  \( g \) is concave in \( t \) (for any choice of \( X \succ 0, V \)); hence \( f \) is concave.

---

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