- Summary
- I am looking for help about the manipulation in a formula of the inversion of matrixes from a 4D array and the interpretation of a factor which is actually a matrix of 100x100 size in this formula.

I have a 4D array of dimension ##100\text{x}100\text{x}3\text{x}3##.

##F_{ij} = \sum_{XY}\,\int\,\dfrac{V_{0}\,\text{d}^3 k}{(2\pi)^{3}}\,\bigg(\dfrac{\partial P_{\text{obs,X}}}{\partial p_{i}}\bigg)\,(C^{-1})_{XY}\,\bigg(\dfrac{\partial P_{\text{obs,Y}}}{\partial p_{j}}\bigg)\quad(1) ##

##X## and ##Y## vary between ##1,2,3##.

The derivatives ##\bigg(\dfrac{\partial P_{\text{obs,X}}}{\partial p_{i}}\bigg)## and ##\bigg(\dfrac{\partial P_{\text{obs,X}}}{\partial p_{j}}\bigg)## are discrete arrays of dimension ##100\text{x}100##.

1)

For the moment, what I do is to compute a 2D array of matrix ##3\text{x}3## (so a 2D array of ##10000## elements with a matrix ##3\text{x}3## for each element of this 2D array).

To compute th final value ##F_{ij}##, I do a summation on ##X## and ##Y## (i.e on ##X,Y=1,2,3##) of the 2D final grid ##100\text{x}100## and integrate it.

2)

3) I suppose that the 2 following operations are not commutative :

If someone could help me to interpret correctly the equation ##(1)##, especially the term ##(C^{-1})_{XY}##, in order to do the right computations.

Regards

**I am working with `Python Numpy.**This 4D array is used since I want to manipulate 2D array of dimensions ##100\text{x}100## for the following equation (it allows to compute the ##(i,j)## element ##F_{ij}## of Fisher matrix) :##F_{ij} = \sum_{XY}\,\int\,\dfrac{V_{0}\,\text{d}^3 k}{(2\pi)^{3}}\,\bigg(\dfrac{\partial P_{\text{obs,X}}}{\partial p_{i}}\bigg)\,(C^{-1})_{XY}\,\bigg(\dfrac{\partial P_{\text{obs,Y}}}{\partial p_{j}}\bigg)\quad(1) ##

##X## and ##Y## vary between ##1,2,3##.

The derivatives ##\bigg(\dfrac{\partial P_{\text{obs,X}}}{\partial p_{i}}\bigg)## and ##\bigg(\dfrac{\partial P_{\text{obs,X}}}{\partial p_{j}}\bigg)## are discrete arrays of dimension ##100\text{x}100##.

**First I compute a "Covariance matrix" ##C## of dimension ##100\text{x}100## for each ##X## and ##Y##. So I have a 4D array for ##C##.**1)

**Now, I have an issue about the interpretation of the term ##(C^{-1})_{XY}##.**For the moment, what I do is to compute a 2D array of matrix ##3\text{x}3## (so a 2D array of ##10000## elements with a matrix ##3\text{x}3## for each element of this 2D array).

**Then, after this, I invert the ##10000## matrixes ##3\text{x}3## and I multiply by a direct dot product of ##C^{-1}## with the derivatives in parenthesis.**To compute th final value ##F_{ij}##, I do a summation on ##X## and ##Y## (i.e on ##X,Y=1,2,3##) of the 2D final grid ##100\text{x}100## and integrate it.

2)

**I don't know if things of this formula are well carried out. Indeed, inverting ##10000## matrixes ##3\text{x}3## is not the same thing than inverting 9 matrixes of size ##100\text{x}100##, is it ?**

In all cases, I thing I have to consider the matrix ##(C^{-1})_{XY}## like a matrix of ##100\text{x}100## dimensions.

Indeed, I think ##(C^{-1})## should be a ##100\text{x}100## matrix.

But on the other side, in my code, I perform the inversion of ##10000## ##3\text{x}3## matrixes and once this computation is done, I take the 9 matrixes of ##100\text{x}100## dimension.

Is my method right ?In all cases, I thing I have to consider the matrix ##(C^{-1})_{XY}## like a matrix of ##100\text{x}100## dimensions.

Indeed, I think ##(C^{-1})## should be a ##100\text{x}100## matrix.

But on the other side, in my code, I perform the inversion of ##10000## ##3\text{x}3## matrixes and once this computation is done, I take the 9 matrixes of ##100\text{x}100## dimension.

Is my method right ?

3) I suppose that the 2 following operations are not commutative :

**invert ##10000## matrixes of ##3\text{x}3## and using 9 matrixes of ##100\text{x}100## from this inversion OR invert directly 9 matrixes of ##100\text{x}100##**

It seems that I make confusions between inverting matrix and reconstruct or use again this inversion with a 4D array.It seems that I make confusions between inverting matrix and reconstruct or use again this inversion with a 4D array.

If someone could help me to interpret correctly the equation ##(1)##, especially the term ##(C^{-1})_{XY}##, in order to do the right computations.

Regards