Convexity of the logarithmic barrier function of SOCP The logarithmic barrier function for second-order cone programming (SOCP) is usually
$$F(x) = \log \left( x_n^2 - x_1^2-\cdots - x_{n-1}^2 \right)$$
How to prove its convexity? The Hessian is too complicated to work with, and I couldn't find any convexity-preserving rules that can be applied here either.
 A: Let
$$f (\mathrm x) := \log \left( \mathrm x^\top \mathrm D \, \mathrm x \right)$$
where
$$\mathrm D = \mbox{diag} (-1,-1,\dots,-1,1)$$
Note that
$$\begin{aligned} f (\mathrm x + h \mathrm v) &= \log \left( (\mathrm x + h \mathrm v)^\top \mathrm D \, (\mathrm x + h \mathrm v) \right) \\ &= \log \left( \mathrm x^\top \mathrm D \, \mathrm x + 2 h \, \mathrm v^\top \mathrm D \, \mathrm x  + h^2 \, \mathrm v^\top \mathrm D \, \mathrm v \right) \\ &= \log \left( \mathrm x^\top \mathrm D \, \mathrm x \right) + \log \left( 1 + 2 h \, \frac{\mathrm v^\top \mathrm D \, \mathrm x}{\mathrm x^\top \mathrm D \, \mathrm x}  + h^2 \, \frac{\mathrm v^\top \mathrm D \, \mathrm v}{\mathrm x^\top \mathrm D \, \mathrm x} \right)\\ &= f (\mathrm x) + 2 h \, \frac{\mathrm v^\top \mathrm D \, \mathrm x}{\mathrm x^\top \mathrm D \, \mathrm x}  + h^2 \, \frac{\mathrm v^\top \mathrm D \, \mathrm v}{\mathrm x^\top \mathrm D \, \mathrm x} - \frac 12 \left( 2 h \, \frac{\mathrm v^\top \mathrm D \, \mathrm x}{\mathrm x^\top \mathrm D \, \mathrm x} \right)^2 + O (h^3)\end{aligned}$$
Hence, the 2nd order term is
$$h^2 \left( \frac{\mathrm v^\top \mathrm D \, \mathrm v}{\mathrm x^\top \mathrm D \, \mathrm x} - 2 \left( \frac{\mathrm v^\top \mathrm D \, \mathrm x}{\mathrm x^\top \mathrm D \, \mathrm x} \right)^2 \right) = \frac{h^2}{2} \, \mathrm v^\top \left( \color{blue}{\frac{2 \, \mathrm x^\top \mathrm D \, \mathrm x \mathrm D - 4 \, \mathrm D \, \mathrm x \mathrm x^\top \mathrm D}{\left( \mathrm x^\top \mathrm D \, \mathrm x \right)^2}} \right) \mathrm v$$
