Let $f$ be a multivariate function $f:\mathbb{R}^n \rightarrow \mathbb{R}$.
In order to check its convexity in the $\mathbb{R}^n$ domain, we can check whether its Hessian is semidefinite positive: $$ \mathbf{z}\mathbf{H}\mathbf{z}^T \geq 0 \quad \forall \mathbf{z} \in \mathbb{R}^n $$
But I al only interested in a given region. For instance, I want to check convexity for reals between 0 and 1. How should I adapt the above equation?
My guess is that I should check it for $\mathbf{z}$ that are in that region of interest, but I don't find any reference confirming that.
For instance, I have
$$
f(x, y) = (1-x)(1-y)
$$

whose Hessian is: $$ H = \begin{bmatrix} 0 & 1 \\ 1 & 0 \\ \end{bmatrix} $$
And then: $$ \mathbf{z}^T \mathbf{H} \mathbf{z} = 2z_1z_2 \geq 0 \quad \forall z_1, z_2 \in [0,1] $$
Thus, I would say that this function is convex. But I'm confused because, in the plot, I rather see that it is convex in some directions and concave in others.
the $z$'s are directions, and they have nothing to do with points on Domain!
– Red shoes Jun 05 '17 at 08:55