If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

# The Hessian matrix

The Hessian matrix is a way of organizing all the second partial derivative information of a multivariable function. Created by Grant Sanderson.

## Want to join the conversation?

• How do you write the Hessian matrix notation by hand? Surely Boldface H is only used in printed form?

I mean, that's the case with vectors. Written by hand, you draw an arrow over the letter.

And does the Hessian matrix have anything to do with the symbol "Ĥ"? They look similar. (I found this symbol in Schrödinger's Equations, as in Ĥ|ɸ> = i ∂/∂t |ɸ>.)
• There are numerous ways to denote the Hessian, but the most common form (when writing) is just to use a capital 'H' followed by the function (say, 'f') for which the second partial derivatives are being taken. For example, H(f).
It is not necessary to bold, but it does help.
The fact that it is capitalised helps in identifying the fact that it is a matrix.

Furthermore, the 'Ĥ' in Schrödinger's Equation in Quantum Mechanics is known as the Hamiltonian, which is different from the Hessian.

Hope that clears things up.
• Is the Hessian just the Jacobian of the gradient function?
• That sounds right, I believe that is another legitimate way of interpreting the Hessian.
• I thought that constants become 0 when taking the derivate, the same way for instance a "4" would go away when taking a derivative. Why is that not the case here?
(1 vote)
• If you had f(x) = x + 4, then f'(x) = d/dx[x + 4] = d/dx[x] + d/dx[4] = 1 + 0 = 1 - - - - the 4 "went away"
But
if you have f(x) = 4x, then f'(x) = d/dx[4x] = 4 d/dx[x] = (4)(1) = 4 - - - - here the 4 stays, why?

So if I had f(x,y) = e^x + sin(y), and wanted ∂f/∂x[f(x,y)], we would have
∂f/∂x[f(x,y)] = ∂f/∂x[e^x] + ∂f/∂x[sin(y)] = e^x + 0 = e^x, and the sin(y) "goes away"
But,
If you have f(x,y) = (e^x)(sin(y)) and want ∂f/∂x[f(x,y)], we can think of the sin(y) as a constant and remove it from the differential operator just like we did the 4 above . . . .
∂f/∂x[f(x,y)] = ∂f/∂x[(e^x)(sin(y)] = sin(y)∂f/∂x[e^x} = sin(y)e^x or (e^x)(sin(y)).

When dealing with variables that are being multiplied by a constant, we can take the constant out of the differential operator. In this case, sin(y) is a constant because in this example we are differentiating with respect to x

I hope that helped.
Stefen
• In the video, where he is giving d^2f/dydx, he says in explanation that this is first in respect to x (which he puts second), then in respect to y (which he puts first). And the he does opposite for d^2f/dxdy.

Here is the interpretation I got from google, as well as ChatGPT: "The notation "d^2F/dydx" typically refers to taking the derivative of F with respect to y first and then taking the derivative of the result with respect to x."

Which is correct, the video or the web?
(1 vote)
• The video is correct. Khan Academy 1, internet 0.
Of course, if the function is continuous, then by Clairaut's Theorem it doesn't matter which order you differentiate. But if order matters, then you read the differentials in the denominator from right to left (backwards). For example, d^3F/dydxdz, you would differentiate with respect to z first, then x, and finally y. You work nested derivatives from the inside out.