0
$\begingroup$

I would like to compute in MATLAB, without resort to automatic differentiation), the gradient, and ideally also the Hessian, of the absolute value of a non-repeated eigenvalue of a non-symmetric matrix. If the problem is easier in the case of a row stochastic matrix, I'd be interested in that special case, but would like something for the general case if possible. The intention would be, among other possible uses, to evaluate the gradient and Hessian within a numerical nonlinear optimizer.

Thanks.

$\endgroup$

1 Answer 1

1
$\begingroup$

Let $M$ be an $n \times n$ matrix with characteristic polynomial $P(\lambda) = \det(\lambda I - M)$. The partial derivative of this with respect to entry $m_{ij}$ is $-$ the $(j,i)$ entry of the classical adjoint of $\lambda I - M$. Since $P(\lambda) = 0$ for an eigenvalue $\lambda$, we should have $$\dfrac{\partial \lambda}{\partial m_{ij}} = \dfrac{\text{Adj}(\lambda I - M^T)_{ij}}{P'(\lambda)} $$ And then $$\dfrac{\partial |\lambda|}{\partial m_{ij}} = \dfrac{1}{|\lambda|} \text{Re}\left(\overline{\lambda} \dfrac{\partial \lambda}{\partial m_{ij}}\right)$$

$\endgroup$
1
  • $\begingroup$ Thanks. When the matrix whose gradient is being calculated is singular,the adjoint calculation looks a little tricky from a numerical stability standpoint, whether using det or prod(eig) for the minor calculations, and perhaps some of the minors nearly singular, and thus potentially subject to significant percentage error in the corresponding gradient error. Do you have any guidance on the Hessian? I fear that could be even more numerically unstable, and getting the correct sign, within tolerance about zero, of the minimum eigenvalue of the Hessian could be critical. $\endgroup$ May 15, 2015 at 0:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .