Hessian Matrix of $x\mapsto x^TAx$

351 Views Asked by At

Let $n\in\mathbb{N}$. When it comes to calculating the Hessian matrix of a function $f:\mathbb{R}^n\to\mathbb{R}$, I just calculate $\frac{\partial^2f}{x_ix_j}$ for all $1\leq i,j\leq n$. Unfortunately, I am stuck when it comes to calculating the Hessian Matrix of $f\left(x\right)=x^TAx$ for a general $A\in\mathbb{R}^{n\times n}$.

Questions

  1. What other methods for calculating the Hessian matrix exist?
  2. How can the Hessian of $f\left(x\right)=x^TAx$ be conveniently calculated?
1

There are 1 best solutions below

0
On BEST ANSWER

If you write $x^\top A x$ as $\sum_{u=1}^n \sum_{v=1}^n a_{u, v} x_u x_v$, you can then find the mixed partial derivative $\frac{\partial^2}{\partial x_i \partial x_j}$ term by term in the usual manner.

You will find that when $i \ne j$ you obtain $a_{i,j} + a_{j, i}$ (from differentiating $a_{i, j} x_i x_j + a_{j, i} x_j x_i$, while the other terms contribute nothing). Similarly, when $i=j$, you obtain $2a_{i, i}$ (from differentiating $a_{i, i} x_i^2$).

If you arrange all the partial derivatives into a matrix, you find that the Hessian is $A+A^\top$.