0
$\begingroup$

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?
$\endgroup$
1
  • 1
    $\begingroup$ the Hessian is $A+A^T$ $\endgroup$ Commented Jan 24, 2023 at 17:21

1 Answer 1

2
$\begingroup$

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$.

$\endgroup$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.