Suppose I have a matrix $A \in R^{m \times n}$. I would like to know the Hessian of $\min(0, A)^2$. I have computed the gradient which is $2 \min(0,A)$ (am I right ?) but I am stuck in finding the Hessian.
EDIT : After reflexion, I would say it is a diagonal matrix with $H(i,i)=1$ iif $A_i < 0$ (where $H$ is a square matrix of size $mn$ and we suppose that $A$ has been vectorized)