Matrix form of a double sum

1.1k Views Asked by At

I am working on the multivariate case of the Fokker-Plank equation, and I would like to know if it is possible to write the following double summation as product of vectors and matrices only.

$$\sum_{i=1}^n\sum_{j=1}^n\sigma_{i,j}\frac{\partial^2f}{\partial x_i \partial x_j}$$

2

There are 2 best solutions below

1
On

If you write the matrix $A$ such that $$A_{i,j}=\sigma_{i,j} \frac{\partial^2 f}{\partial x_i \partial x_j}$$

and $e$ the all-one matrix.

then $$\sum_{i=1}^n \sum_{j=1}^n\sigma_{i,j} \frac{\partial^2 f}{\partial x_i \partial x_j}=e^TAe$$

Edit:

Frobenius inner product might be of interest to you.

Let $S_{i,j}=\sigma_{i,j}$ and $F_{i,j}=\frac{\partial^2 f}{\partial x_i \partial x_j}$, then the quantity of interest is $\operatorname{Trace}(\bar{S}^TF)=\operatorname{vec}(S)^T\operatorname{vec}(S)$

0
On

Define the matrix $\sigma$ with components $\sigma_{ij}$ and the matrix $D^2f$ with components $\frac{\partial^2 f}{\partial x_i \partial x_j}$, then your double sum can also be written as a trace: $$ Tr( \sigma \cdot D^2f) $$