0
$\begingroup$

Given the weight graph $G(V,E,w)$ where $w_{}$ is a function which assigns a weight to an edge in graph G, we define the adjacency matrix $A$ by $$A_{ij}=\begin{cases} w_{ij},&\text{if }(i,j) \in E, \\ 0 & \text{otherwise}.\end{cases}$$ The degree matrix of a weighted graph is a diagonal matrix $D$ such that $$D_{ii}=\sum_j A_{ij}.$$ Which is the derivative of $P=D^{-1}$ with respect to $A$? $$\frac{\partial P}{{\partial\ A}}=\frac{\partial(D^{-1})}{\partial\ A}$$

I was wondering if any one could help me to find out the answer.

  • 0
    You expect a 3d matrix, right? Note that $(D^{-1})_{ii} = 1/D_{ii} = 1/(\sum_j A_{ij})$. Isn't the answer trivial now?2017-01-11
  • 0
    If it is a 3d matrix, what is the partial derivative of P_{uv} entry with respect o A?2017-01-11
  • 0
    For $u \neq v$, don't we have $D_{uv}=P_{uv} = 0$?2017-01-11
  • 0
    Yes, we do not have.2017-01-11
  • 0
    In fact I want to know the answer for u=v. I was wondering if you could help me.2017-01-11
  • 0
    Sometimes I think that everyone doing matrix calculus needs to acknowledge they've scanned [the Matrix Cookbook](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=3274) first ;-)2017-01-16

1 Answers 1

3

Let $e$ be the vector whose components are all ones.

Then $$\eqalign{ b &= Ae \cr D &= \operatorname{Diag}(b) \cr P &= D^{-1} \cr dP &= -P\,dD\,P \cr }$$ Those matrices are all diagonal, so apply the diag() operator (which is the reverse of the Diag() operator) to obtain $$\eqalign{ dp &= -P^2\,db \cr &= -P^2\,dA\,e \cr }$$ Now vectorize both sides $$\eqalign{ dp &= -\operatorname{vec}(P^2\,dA\,e) \cr &= -(e^T\otimes P^2)\,\operatorname{vec}(dA) \cr &= -(e^T\otimes P^2)\,da \cr\cr \frac{\partial p}{\partial a} &= -\,e^T\otimes P^2 \cr\cr }$$ If you don't wish to vectorize, then you must use higher-order tensors to express the result.

Let $T$ be a 3rd-order tensor, and $F$ a 4th-order tensor, with components given by $$\eqalign{T_{ijk} &= \begin{cases} 1 &\text{if }(i=j=k) \\ 0 & \text{otherwise}\end{cases}\cr F_{ijkm} &= \delta_{ik}\,\delta_{jm} \cr }$$ Then picking up the previous thread just before vectorization $$\eqalign{ dp &= -P^2\,dA\,e \cr \cr dP &= T\,dp \cr &= -T\,P^2\,dA\,e \cr &= -T\,P^2\,F\,e^T:dA \cr \cr \frac{\partial P}{\partial A} &= -T\,P^2\,F\,e^T \cr }$$