# Why is the set of subgradients a convex set?

I'm struggling to understand an example we were given. The problem description is:

Let $f$ be a convex function in $E^n$. Prove that the set of subgradients of $f$ in a given point form a ... convex set.

I have the solution, but don't really understand it. According to my intuition, the set of subgradients form a non-convex set of the points in areas marked $y$ in the following picture:

What am I missing here? Thanks.

-

In your picture, the subgradients are not the points in the region of the plane marked $y$, they are the slopes of the lines through $(x_0, f(x_0))$ in that region.