Derivative of a vector

Let

$p, v :$ real, positive $1\times n$ vectors,

$c^T:$ real, non - negative $n\times 1$ vector,

$I:$ the identity matrix.

Assume that the following relationship holds true: $$p(v) = v\cdot ( I - c^Tv)^{-1}$$

How can we compute the derivative: $$\dfrac{dp}{dv}(v)?$$


Solution 1:

Instead of row vectors, let's write the problem using column vectors (expressions involving row vectors just look strange to me).

Then we'll take the differential of $p$, and then rearrange it until we isolate the gradient: $$\eqalign{ p^T &= v^T(I-cv^T)^{-1} \cr p &= (I-vc^T)^{-1}\,v \cr\cr dp &= (I-vc^T)^{-1}dv - (I-vc^T)^{-1}\,d(-vc^T)\,(I-vc^T)^{-1}v \cr &= (I-vc^T)^{-1}dv + (I-vc^T)^{-1}\,dv\,c^Tp \cr &= (1+c^Tp)\,(I-vc^T)^{-1}\,dv \cr\cr \frac{\partial p}{\partial v} &= (1+c^Tp)\,(I-vc^T)^{-1} \cr }$$

Solution 2:

Disclaimer: This answer was downvoted with no explanation 18 months after being posted. Since it is correct and answers the question as formulated at the time, I guess one should consider such erratic downvotes as an inherent part of the math.SE experience. In any case... happy reading!

The gradient $\nabla p(v)$ of $p$ at $v$ such that $I-c^Tv$ is invertible is the linear function $L_v:\mathbb R^n\to\mathbb R^n$ defined, for every $w$ in $\mathbb R^n$, by $$L_v(w)=w\cdot(I-c^Tv)^{-1}+v\cdot(I-c^Tv)^{-1}\cdot c^Tw\cdot(I-c^Tv)^{-1}.$$ To prove this, try to reach a formula $$p(v+hw)=p(v)+hL_v(w)+o(\|h\|),$$ for some linear function $L_v$, when $h\to0$, $h\in\mathbb R$.

The linear function $L_v$ can be rewritten as $$ L_v(w)=w\cdot(I-c^Tv)^{-1}+p(v)\cdot c^Tw\cdot(I-c^Tv)^{-1}=\alpha\, w\cdot(I-c^Tv)^{-1}$$ where $\alpha$ denotes the scalar $$\alpha=1+p(v)c^T$$ hence the gradient $\nabla p(v)$ can be identified with the matrix $$M_v=\alpha\,(I-c^Tv)^{-1}=(1+p(v)c^T)\,(I-c^Tv)^{-1}$$ in the sense that, for every $w$, $$L_v(w)=w\cdot M_v$$