0
$\begingroup$

Let $\mathbf a, \mathbf x$ $\in$ $\mathbb R^n$, consider the function $f(\mathbf x)=\mathbf a^T\mathbf x$ and $g(\mathbf x)=(\mathbf a^T\mathbf x)^2$.

(a) Find $∇f(\mathbf x)$ and the Hessian $H_f(\mathbf x)$.

Using the comment below,

$f(x)=a^Tx=\sum_{i=1}^na_ix_i$

$\frac{\partial f}{\partial x_j}{(x)}=a_j$

Then,

$∇f(x) = $ \begin{bmatrix} \frac{\partial f}{\partial x_1}(x) \\ \frac{\partial f}{\partial x_2}(x) \\ \vdots \\ \frac{\partial f}{\partial x_n} (x) \end{bmatrix}

= \begin{bmatrix} a_1 \\ a_2 \\ \vdots \\ a_n \end{bmatrix}}

$H_f(x)= [∇f(x)]'=0$

(b) Show that $g(\mathbf x)$ is a quadratic form.

The quadratic form: $f(x)={x^TQx}=\sum_{i=1}^n q_{ii}x_i^2+ \sum_{1\leq i\neq j\leq n} q_{ij}x_ix_j$

I am having a difficulty understanding the 2 sums, I don't quite see the intuition behind it. But I understand

$f(x)=x^TQx$ and this does not equal to

$g(x)=(a^Tx)^2=(a^Tx)(a^Tx)=\sum_{i=1}^na_ix_i\sum_{i=1}^na_ix_i$

Perhaps, I don't know how to manipulate

$\sum_{i=1}^na_ix_i\sum_{i=1}^na_ix_i$ for it to look like

$\sum_{i=1}^n q_{ii}x_i^2+ \sum_{1\leq i\neq j\leq n} q_{ij}x_ix_j$

(c) Find $∇g(\mathbf x)$ and $H_g(\mathbf x)$ using part (b).

$\endgroup$
2
$\begingroup$

$a^T$ means transpose of the vector $a$. \begin{align} f(x) &= a^Tx \\ &= \sum_{i=1}^n a_i x_i \end{align}

$$\frac{\partial f(x)}{\partial x_j}=a_j$$

From there, hopefully you can write down $\nabla f$.

(b) $$(a^Tx)(a^Tx)=(x^Ta)(a^Tx)=x^T(aa^T)x$$

Identifying the corresponding $Q$ hopefully should be manageable.

$\endgroup$
  • $\begingroup$ Thank you for the help. I believe that I have now correctly solved part (a). I am now stuck on (b) and wrote my confusion for (b). I would appreciate if you could give another hint and thank you in advance. $\endgroup$ – thisisme Jan 15 '18 at 1:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.