Prove that the function $$ f(X) = \operatorname{trace}(X^{−1}) $$ is convex on the domain $S^n_{++}$.
I was given the hint to try using line restriction. So I am trying to prove that $$ g(t) = f(x+ty) $$ is convex for all x $\epsilon $ $ S^{n}_{++} $ and y $\epsilon$ $ R^n $ such that $ \{ t :x+ty \ \epsilon \ S^{n}_{++} \} $. I have tried calculating the hessian matrix but I am getting confused on how to take the gradient of a matrix and the trace function.