# (Determinant of) Hessian in local coordinates

Let $f\colon M\to \mathbb{R}$ be a smooth function on a manifold $M$ with a critical point $p$. We define its Hessian at $p$ via $H(u, v)=(UVf)(p)$ where $u, v\in T_pM$ and $U$ and $V$ are vector fields with $U_p=u, V_p=v$. I wonder if there is any way of computing the the matrix of Hessian other than using local coordinates. To make my question more concrete how do you go about computing the Hessian matrix of a real valued function defined on, say, a sphere?

My other question is about the determinant of the Hessian. Hessian is a bilinear map and its matrices in different coordinates are congruent (not similar, in general). So, how can one make sense of the determinant of Hessian in a well-defined way? All I can say is that a distinguished inner product should be required on the tangent space at the critical point to make the determinant well defined. Any thoughts on this would be appreciated.

The Hessian is well-defined and symmetric at critical points of $f$, i.e. when $df(p)=0$. In this case, it is a symmetric bilinear form on $T_pM$ and can be defined by $$(\nabla^2 f)[X, Y]= \partial_X \partial_Y f(p)$$ To do this, you need to extend the vector $Y$ to a vector field on the neighborhood of $p$, but it turns out that the expression does not depend on this choice.
Do define it in general, you need a connection $\nabla$ on the tangent space (if you have a Riemannian manifold, you usually take the Levi-Civita connection). Then the Hessian is defined by $$(\nabla^2 f)[X, Y] = \nabla_X df(Y) - df(\nabla_X Y)$$ This will give a symmetric tensor on your manifold, the Hessian.
/edit: In your case of the sphere, you could use that the Levi-Civita connection is given by $$\nabla_X Y = D_X Y - \langle X, Y \rangle,$$ with $D_X$ the usual directional derivative on $\mathbb{R}^n$.