A function on a convex set is convex when
for all and .
If is once differentiable, this is equivalent to monotonicity of its gradient:
Equivalently, every tangent hyperplane supports the graph:
If is twice differentiable, convexity is equivalent to the Hessian matrix being positive semidefinite throughout .
For
the Hessian is
A real symmetric two-by-two matrix is positive semidefinite exactly when its two diagonal entries and its determinant are nonnegative. Thus
The largest convexity domain is therefore
For , its boundary is the hyperbola in the first quadrant and the domain lies above it. For , it is the closed first quadrant. This is the convexity domain of x cubed plus y cubed plus Axy.