Setting these equal to zero and isolating terms with a and b to one side, we obtain a system of linear equations

\displaystyle \mathbb E[Y] \displaystyle = a + \mathbb E[X] b
\displaystyle \mathbb E[XY] \displaystyle = \mathbb E[X] a + \mathbb E[X^2] b
Multiplying the first equation by \mathbb E[X] and subtracting from the second equation gives

(\mathbb E[X^2] - \mathbb E[X]^2)b = \mathbb E[XY] - \mathbb E[X]\mathbb E[Y] \quad \implies \quad b = \frac{\textsf{Cov}(X,Y)}{\textsf{Var}(X)}.

Plugging this value back into the first equation to solve for a gives

a = \mathbb E[Y] - \frac{\textsf{Cov}(X,Y)}{\textsf{Var}(X)} \mathbb E[X].

We now compute the Hessian

H = \left(\begin{array}{cc} f_{aa} & f_{ab} \\ f_{ba} & f_{bb} \end{array}\right)

to make sure that this pair (a,b) critical point is a local minimum. The determinant of H at this value (a,b) is

-\textsf{Var}(X)

4\textsf{Var}(X)

\mathbb E[X]

\textsf{Cov}(X,Y)

The determinant of H at the critical point (a,b) is -Var(X).

To compute the determinant of the Hessian matrix, we need to calculate its individual elements. The Hessian matrix is given by:

H = | f_aa f_ab |
| f_ba f_bb |

Where f_aa is the second partial derivative of the function with respect to a twice, f_ab is the second partial derivative of the function with respect to a and b, f_ba is the second partial derivative of the function with respect to b and a, and f_bb is the second partial derivative of the function with respect to b twice.

In your case, the function is the determinant of H, which we need to compute at the critical point (a,b).

To calculate the individual elements, we can start with the partial derivatives.

The first partial derivative of the function with respect to a is:

f_a = -Var(X)

The first partial derivative of the function with respect to b is:

f_b = 4Var(X)

Next, we need to calculate the second partial derivatives.

The second partial derivative of the function with respect to a twice is:

f_aa = 0

The second partial derivative of the function with respect to a and b is the same as the second partial derivative of the function with respect to b and a, so we only need to calculate it once.

The second partial derivative of the function with respect to a and b is:

f_ab = E[X]

The second partial derivative of the function with respect to b twice is:

f_bb = 0

Now, we can construct the Hessian matrix with these values:

H = | 0 E[X] |
| E[X] 0 |

Finally, we can calculate the determinant of H:

det(H) = (0 * 0) - (E[X] * E[X])
= -E[X]^2

Therefore, the determinant of the Hessian matrix at the critical point (a,b) is -Var(X).