[Math] Convex and concave functions of three variables

convex optimizationconvex-analysismultivariable-calculusoptimization

How can I test the function for three variables if it is convex or concave

Consider
$$f(x,y,z)=xz-xyz$$ whete x,y and z $\in (- \infty,\infty) $

A function ƒ is convex or concave if the Hessian
matrix of ƒ $H(f)$ is positive definite or negative definite respectively for all values of x, y and z.

then we get the Hessian matrix of ƒ as following,

$H(f)=\left(
\begin{array}{ccc}
0 & -z & 1-y \\
-z & 0 & -x \\
1-y & -x & 0 \\
\end{array}
\right)$

since the determinate of $H(f)$
$$D(H(f))=2 x z – 2 x y z$$

since all critical points of $f(x,y,z)$ are $\{(0, 1, z), (0, y, 0), (x, 1, 0)\}$

In this test I can not determine whether the function is positive definite or negative definite.

Is there another test or correction of the method?

Can I use this theory
enter image description here

where $f:\mathbb{R}^3\rightarrow\mathbb{R} $

Suppose we want to compute the characteristic polynomial of the matrix $H(f)$

$H(f)-\lambda I=\left(
\begin{array}{ccc}
-\lambda & -z & 1-y \\
-z & -\lambda & -x \\
1-y & -x & -\lambda \\
\end{array}
\right)$

We now compute the determinant of $H(f)-\lambda I$

$$-\lambda ^3+\lambda +\lambda x^2-2 x y z+2 x z+\lambda
y^2-2 \lambda y+\lambda z^2$$
enter image description here

From the 2nd derivative test. The Hessian matrix of $f$ which has negative determinant

Is $f$ neither concave nor convex?

Best Answer

While I appreciate Kajelad's thoroughness, there's a much simpler way to look at this if you are simply trying to confirm whether the function is convex or concave or neither. Again, the Hessian is $$H=\begin{bmatrix} 0 & -z & 1-y \\ -z & 0 & -x \\ 1-y & -x & 0 \end{bmatrix}$$ The diagonal has all zero values. That means the sum of the eigenvalues, which is equal to the trace of the matrix, is also zero. So we have only two choices:

  1. All of the eigenvalues are zero---i.e., the entire matrix is zero.
  2. There is at least one positive eigenvalue and one negative eigenvalue.

Option 1 is true only when $x=z=0$ and $y=1$. Everywhere else, we have option 2. Therefore, the Hessian is indefinite almost everywhere, and the function is neither convex nor concave.

Related Question