Derivative of matrix in quadratic optimization problem

125 Views Asked by At

$$ g(x) =\min_y f(x, y) =\min_y x^TAx + 2x^TBy + y^TCy $$ where $x\in \mathbb R^{n\times 1}$, $y\in \mathbb R^{m\times 1}$, $A\in \mathbb R^{n\times n}$, $B\in \mathbb R^{n\times m}$, $C\in \mathbb R^{m\times m}$. How to compute the derivative: $\frac{d g}{d x}$?

2

There are 2 best solutions below

0
On BEST ANSWER

$ \def\a{\lambda} \def\B{BC^{-1}B^T} \def\o{{\tt1}}\def\p{\partial} \def\LR#1{\left(#1\right)} \def\op#1{\operatorname{#1}} \def\trace#1{\op{Tr}\LR{#1}} \def\qiq{\quad\implies\quad} \def\grad#1#2{\frac{\p #1}{\p #2}} \def\c#1{\color{red}{#1}} \def\CLR#1{\c{\LR{#1}}} \def\fracLR#1#2{\LR{\frac{#1}{#2}}} $Although not explicitly stated I'll assume that $A\:{\rm and}\:C$ are symmetric matrices.

Perform the inner minimize by calculating the gradient wrt $y$ and setting it to zero $$\eqalign{ \a &= y^TCy + 2(B^Tx)^Ty + x^TAx \qquad\qquad\qquad\qquad\qquad \\ d\a &= (2Cy + 2B^Tx)^Tdy + 0 \\ \grad{\a}{y} &= 2\LR{Cy + B^Tx} \:=\: 0 \\ w &= y_{opt} \,=\, -C^{-1}B^Tx \\ }$$ This produces an explicit expression for $g(x)$ $$\eqalign{ g(x) &= f(x,w) \\ &= x^TAx + 2x^TBw + w^TCw \\ &= x^TAx - 2x^TBC^{-1}B^Tx + \LR{C^{-1}B^Tx}^TC\LR{C^{-1}B^Tx} \\ &= x^T\LR{A-2\B+\B}x \\ &= x^T\LR{A-\B}x \\ }$$ whose gradient is a trivial calculation $$\eqalign{ \grad{g}{x} &= 2\LR{A-BC^{-1}B^T}x \qquad\qquad\qquad\qquad\qquad\qquad\quad \\ }$$

2
On

The envelope theorem should be helpful.