Say we have some system of equations , where and each have components and has components. If we were given values for , we could imagine solving for , which lets us think of as an implicit function of .
As a matter of notation, let's express this implicit function as .
How do we compute the gradient and Hessian of the implicit function ?
To start, we can differentiate the system of equations to obtain
Then, with a little bit of algebra we can manipulate this to get an expression for
We can follow a similar process to get the Hessian, but it is more involved. Start by differentiating our gradient expression above
Here is a mathematica notebook verifying the correctness of these expressions for scalar and vector-valued functions.