Bonus material: non-differentiable \(f\)

Convex duality gets a little hairier when the convex function \(f\) is not differentiable, but with appropriate open-mindedness (set-valuedness) the above idea carries over. Here is the correspondence plot for the prototypical non-differentiable function: the absolute value.

Primal (top left), dual (top right) and their derivatives (middle bottom). The derivative and its inverse convert from primal to dual coordinates and vice versa.