Let $X := \mathbb R^d$, $\lambda^d$ be the $d$-dimensional Lebesgue measure on $X$, and $f:X \to \mathbb R$ convex. Then [there is](https://math.stackexchange.com/questions/4483452/is-it-true-that-if-f-mathbb-rd-to-mathbb-r-is-continuous-then-the-differ) a Borel set $N \subset X$ such that $\lambda^d (N) = 0$ and $f$ is differentiable on $A := X \setminus N$. Clearly, $A$ is Borel measurable. It follows that the gradient $\nabla f: A \to X$ of $f$ is well-defined.


* If $f$ is differentiable on $X$, [then](https://math.stackexchange.com/questions/4482935/if-all-partial-derivatives-exist-at-each-point-of-a-then-f-in-mathcal-c1) $A = X$ and $f \in \mathcal C\_1 (X)$.
* Clearly, the Borel $\sigma$-algebra $\mathcal B(A)$ is a subset of the Borel $\sigma$-algebra $\mathcal B(X)$, i.e., $\mathcal B(A) \subset \mathcal B(X)$.


**My question:** Is the map $\nabla f$ measurable?



Let $f$ be convex and $A$ a Borel subset of $\mathbb R^d$ on which $f$ is differentiable. Is the gradient $\nabla f: A \to \mathbb R^d$ measurable?
Yes, since a convex function $f:\mathbb{R}^d\rightarrow\mathbb{R}$ is locally Lipschitz (see e.g. Theorem 6.3.1, pp. 236-239 of the book by L. C. Evans and R. F. Gariepy, *Measure Theory and Fine Properties of Functions*, CRC Press, 1992).


Recall that, as you wrote it yourself in the particular case of convex functions and more generally by Rademacher's theorem, if $g:\mathbb{R}^d\rightarrow\mathbb{R}$ is locally Lipschitz then $g$ is differentiable $\lambda^d$-almost everywhere. Moreover, in that case the distributional partial derivatives of $g$ are in $L^\infty\_{loc}(\mathbb{R}^d,\lambda^d)$ and can be identified $\lambda^d$-almost everywhere (say, on a Borel subset $A\subset\mathbb{R}^d$ with $\lambda^d(\mathbb{R}^d\smallsetminus A)=0$ as you defined it) with the classical partial derivatives of $g$ (for the details of all statements above for locally Lipschitz functions, see e.g. Theorem 5 in subsection 4.2.3, pp. 131-132 and Theorems 6.2.1, 6.2.2, pp. 235 of Evans-Gariepy), hence these partial derivatives are in $L^\infty\_{loc}(A,\lambda^d)$ and therefore are (Borel) measurable.


