Convex sets in $\mathbb R^n$: Do they have a particular form ? Does the gradient of a linear convex function $f$ exist on such a set ?
Suppose that $S$ is a convex set in $\mathbb R$. Then $S$ is an interval and a linear function $f$ on $S$ is differentiable on $S$ (right?)
Suppose now that we have a convex set $S$ in $\mathbb R^n$ where $n \ge 2$. Is a linear function $f$ on $S$ partially differentiable anywhere on $S$ (gradient exist) ?. Does $S$ has a partcular form ? I mean is $S$ neccesarily some ball $B(x, r)$ or a set $(a_1, b_1) \times \ldots \times (a_n, b_n)$ ?
The definition of derivatives on the boundary of a domain is not completely agreed upon.
My preferred definition of differentiability of a function $f\colon A \to \mathbb R$ with $A\subset \mathbb R^n$ in any point $x_0\in A$ is the following. We say that $f$ is differentiable in $x_0$ if there exists a linear map $L$ such that $$ \lim_{x\to x_0} \frac{f(x) - f(x_0) - L(x-x_0)}{|x-x_0|} = 0. $$ Of course with this definition a linear function is differentiable anywhere (just take $L=f$) in its domain.
Notice however that the gradient might not be defined because it is not guaranteed that $L$ is unique. As an example take the domain $A = [0,1] \times \{0\} \subset \mathbb R^2$ where, of course, the dependence of $L$ with respect to $y$ is not relevant at all.
Other definitions require the function to be extended on an open set containing its domain. Also in this case there is no problem to extend a linear function on the whole space, hence differentiability is guaranteed.