Show $f(x_1,x_2) = \frac{1}{x_1x_2}$ is convex for $(x_1,x_2) \in \mathbb{R}^2_{++}$ From Problem 3.16(c) of Boyd & Vandenberghe's Convex Optimization:

Determine if $f(x_1,x_2) = \frac{1}{x_1x_2}$ is convex, quasiconvex,
concave, or quasiconcave on $\mathbb{R}^2_{++}$.

From this post Determining whether $\alpha$ sublevel sets are convex I tried to plot it with mesh in Matlab, and I think it is convex on $\mathbb{R}^2_{++}$. But I'm stuck trying to prove it with the definition. My current attempt:
We have for $(x_1, y_1) \in \mathbb{R}^2_{++}$ and $(x_2, y_2) \in \mathbb{R}^2_{++}$, i.e., $x_1, x_2, y_1, y_2 > 0$, and $0 \leq \theta \leq 1$,
\begin{align*}
        f\left(\theta(x_1,y_1) + (1-\theta)(x_2,y_2)\right) &= f\left(\theta x_1 + (1-\theta)x_2, \theta y_1 + (1-\theta)y_2\right) \\
        &= \frac{1}{(\theta x_1 + (1-\theta)x_2)(\theta y_1 + (1-\theta)y_2)} \\
        &= \frac{1}{\theta^2 x_1y_1 + \theta(1-\theta)(x_1y_2 + x_2y_1) + (1-\theta)^2x_2y_2} \\
        &< \frac{1}{\theta^2 x_1y_1 +  (1-\theta)^2x_2y_2} \\
\end{align*}
I know ultimately I need to show that $$\frac{1}{\theta^2 x_1y_1 +  (1-\theta)^2x_2y_2} \leq \frac{\theta}{x_1y_1} + \frac{1-\theta}{x_2y_2}$$ but I'm not sure how to proceed or whether my approach is wrong. I don't think partial fraction expansion strategy applies here because we have different variables. Any hints?
 A: To show that it is convex, it would be easier if you show that the Hessian of the function is positive semi-definite. In fact, the Hessian is
$$\begin{bmatrix} {2 \over x_1^3 x_2} & {1 \over x_1^2 x_2^2} \\ {1 \over x_1^2x_2^2} & {2 \over x_1 x_3^3}  \end{bmatrix}$$
The matrix and all of its principal submatrices are positive semi-definite, so it is convex, hence quasiconvex as well.
Or you can show PSD by showing $z^T H z \ge 0$, and we get
$$ {2 \over x_1^3 x_2}z_1^2 + {1 \over x_1^2 x_2^2}z_2z_1 + {1 \over x_1^2x_2^2}z_1z_2 +  {2 \over x_1 x_3^3}z_2^2 \ge 0$$
The above is non-negative since you can complete the square.
A: Besides using Hessian, there are several approaches:

*

*We have $\frac{1}{x_1x_2} = \mathrm{e}^{-\ln x_1 - \ln x_2}$. Recall that
if $g$ is convex, then $\mathrm{e}^g$ is also convex. Since $-\ln x_1 - \ln x_2$ is convex, $\mathrm{e}^{-\ln x_1 - \ln x_2}$ is convex. We are done.


*Proceeding along your approach
Let us prove that
$$\frac{1}{\theta^2 x_1y_1 + \theta(1-\theta)(x_1y_2 + x_2y_1) + (1-\theta)^2x_2y_2} \le  \frac{\theta}{x_1y_1} + \frac{1-\theta}{x_2y_2}.$$
We have
\begin{align}
&\theta^2 x_1y_1 + \theta(1-\theta)(x_1y_2 + x_2y_1) + (1-\theta)^2x_2y_2\\
=\ & \theta x_1y_1 + (1-\theta)x_2y_2 + \theta(1-\theta)(x_1y_2 + x_2y_1 - x_1y_1-x_2y_2)
\end{align}
and
$$(\theta x_1y_1 + (1-\theta)x_2y_2) \left(\frac{\theta}{x_1y_1} + \frac{1-\theta}{x_2y_2}\right)
= 1 + \theta(1-\theta)\left(\frac{x_2y_2}{x_1y_1} + \frac{x_1y_1}{x_2y_2} - 2\right).$$
Thus, it suffices to prove that
\begin{align}
1 &\le 1 + \theta(1-\theta)\left(\frac{x_2y_2}{x_1y_1} + \frac{x_1y_1}{x_2y_2} - 2\right)\\
&\qquad + \theta(1-\theta)(x_1y_2 + x_2y_1 - x_1y_1-x_2y_2)\left(\frac{\theta}{x_1y_1} + \frac{1-\theta}{x_2y_2}\right) .
\end{align}
It suffices to prove that
$$0 \le \left(\frac{x_2y_2}{x_1y_1} + \frac{x_1y_1}{x_2y_2} - 2\right)
+ (x_1y_2 + x_2y_1 - x_1y_1-x_2y_2)\left(\frac{\theta}{x_1y_1} + \frac{1-\theta}{x_2y_2}\right)$$
which is written as
\begin{align}
0&\le \left(\frac{x_2y_2}{x_1y_1} + \frac{x_1y_1}{x_2y_2} - 2 + (x_1y_2 + x_2y_1 - x_1y_1-x_2y_2)\frac{1}{x_1y_1}\right)\theta\\
&\qquad +\left(\frac{x_2y_2}{x_1y_1} + \frac{x_1y_1}{x_2y_2} - 2  + (x_1y_2 + x_2y_1 - x_1y_1-x_2y_2)\frac{1}{x_2y_2}\right)(1-\theta)\\
&= \left(\frac{x_1y_1}{x_2y_2} + \frac{y_2}{y_1} + \frac{x_2}{x_1} - 3\right)\theta + \left(\frac{x_2y_2}{x_1y_1}
+ \frac{x_1}{x_2} + \frac{y_1}{y_2} - 3\right)(1-\theta).
\end{align}
It is true by AM-GM. We are done.
A: (Same argument given elsewhere:)
We know that  $f$ is convex if and only if  its supergraph $\{(x', x_n)\ | x_n \ge f(x')\}$ is convex.  Now the epigraph equals
$$\{ (x_1, \ldots, x_{n-1}, x_n)\ |  \ x_1 \cdot \ldots \cdot x_n \ge 1\}$$
Convexity is really easy: take $x$, $y$ in $(0, \infty)^n$ with
$\prod x_i$, $\prod y_i \ge 1$. We have
$$\prod_{i=1}^n \frac{x_i + y_i}{2} \ge \prod_{i=1}^n \sqrt{x_i y_i} \ge \sqrt{1\cdot 1} = 1$$
Note that the function $(x_1, \ldots, x_n)\mapsto x_1\ldots x_n$ is not concave, but its superlevel sets are convex. So this function is quasi-concave.
