# Matlab - Equality between 2 Fisher matrices constructed in a different way

I want to know if, on a Fisher matrix, the projection operation (with a Jacobian matrix) commutes with a matricial inversion operation.

The 2 ways to build these 2 matrices are:

1) First method:

1.1) I have an initial Fisher matrix F_ij of size 3x3. I apply a projection on this matrix with a Jacobian J_ij of size 3x3, according to the formula:

1.2) I thus have a new matrix of Fisher 3x3 "M_1" which one qualifies as "projected", that is to say that the old parameters were replaced by new parameters (resulting from the Jacobian)

2) Second method:

2.1) I directly invert the initial 3x3 Fisher matrix and thus I obtain a 3x3 covariance matrix. I then make a projection on this covariance matrix.

2.2) I re-reverse to get a new 3x3 Fisher matrix "M_2"

The goal is to know if in the 2 methods, if the 2 matrices "M_1" and "M_2" are equal.

that thus amounts to knowing if the operation of projection and the inversion of matrix commute.

It should also be specified that my initial Fisher matrix is ​​symmetric and is composed of block sub-matrices (not necessarily square).

I looked for my side and I may have a track with the complement of Schur complement: but I can not conclude.

If someone could prove that there is no equality between the 2 matrices "M_1" and "M_2", under what conditions on the Jacobian could I have an equality between both matrices ?

Below is a symbolic calculus Matlab script where I try to conclude, maybe it will help someone.

clear;
clc;

% Big_1 Fisher :
FISH_Big_1_SYM = sym('sp_', [3,3], 'real');
% Force symmetry for Big_1
FISH_Big_1_SYM = tril(FISH_Big_1_SYM.') + triu(FISH_Big_1_SYM,1);

% Big_2 Fisher :
FISH_Big_2_SYM = sym('sp_', [3,3], 'real');
% Force symmetry for Big_2
FISH_Big_2_SYM = tril(FISH_Big_2_SYM.') + triu(FISH_Big_2_SYM,1);

% Jacobian 1
J_1_SYM = sym('j_', [3,3], 'real');
% Jacobian 2
J_2_SYM = sym('j_', [3,3], 'real');

%%%%%%%% Method 1 : projection before %%%%%%%%%

% Projection
FISH_proj_1_SYM = J_1_SYM'*FISH_Big_1_SYM*J_1_SYM;

%%%%%%%% Method 2 : projection after %%%%%%%%%
% Invert Fisher_2
COV_Big_2_SYM = inv(FISH_Big_2_SYM);
% Projection
COV_proj_2_SYM = J_2_SYM'*COV_Big_2_SYM*J_2_SYM;
FISH_proj_2_SYM = inv(COV_proj_2_SYM);

% Test equality between 2 matrices
isequal(FISH_proj_1_SYM,FISH_proj_2_SYM)


UPDATE :

The execution gives me in a very short time what I suspected: the 2 matrices are not equal.

For example, if I compare the elements (1,1) of the 2 matrices:

>> FISH_proj_1_SYM(1,1)

ans =

j_1_1*(j_1_1*sp_1_1 + j_2_1*sp_1_2 + j_3_1*sp_1_3) + j_2_1*(j_1_1*sp_1_2 + j_2_1*sp_2_2 + j_3_1*sp_2_3) + j_3_1*(j_1_1*sp_1_3 + j_2_1*sp_2_3 + j_3_1*sp_3_3)


and

>> FISH_proj_2_SYM(1,1)

ans =

(sp_3_3*j_1_2^2*j_2_3^2 - 2*sp_2_3*j_1_2^2*j_2_3*j_3_3 + sp_2_2*j_1_2^2*j_3_3^2 - 2*sp_3_3*j_1_2*j_1_3*j_2_2*j_2_3 + 2*sp_2_3*j_1_2*j_1_3*j_2_2*j_3_3 + 2*sp_2_3*j_1_2*j_1_3*j_2_3*j_3_2 - 2*sp_2_2*j_1_2*j_1_3*j_3_2*j_3_3 + 2*sp_1_3*j_1_2*j_2_2*j_2_3*j_3_3 - 2*sp_1_2*j_1_2*j_2_2*j_3_3^2 - 2*sp_1_3*j_1_2*j_2_3^2*j_3_2 + 2*sp_1_2*j_1_2*j_2_3*j_3_2*j_3_3 + sp_3_3*j_1_3^2*j_2_2^2 - 2*sp_2_3*j_1_3^2*j_2_2*j_3_2 + sp_2_2*j_1_3^2*j_3_2^2 - 2*sp_1_3*j_1_3*j_2_2^2*j_3_3 + 2*sp_1_3*j_1_3*j_2_2*j_2_3*j_3_2 + 2*sp_1_2*j_1_3*j_2_2*j_3_2*j_3_3 - 2*sp_1_2*j_1_3*j_2_3*j_3_2^2 + sp_1_1*j_2_2^2*j_3_3^2 - 2*sp_1_1*j_2_2*j_2_3*j_3_2*j_3_3 + sp_1_1*j_2_3^2*j_3_2^2)/(j_1_1^2*j_2_2^2*j_3_3^2 - 2*j_1_1^2*j_2_2*j_2_3*j_3_2*j_3_3 + j_1_1^2*j_2_3^2*j_3_2^2 - 2*j_1_1*j_1_2*j_2_1*j_2_2*j_3_3^2 + 2*j_1_1*j_1_2*j_2_1*j_2_3*j_3_2*j_3_3 + 2*j_1_1*j_1_2*j_2_2*j_2_3*j_3_1*j_3_3 - 2*j_1_1*j_1_2*j_2_3^2*j_3_1*j_3_2 + 2*j_1_1*j_1_3*j_2_1*j_2_2*j_3_2*j_3_3 - 2*j_1_1*j_1_3*j_2_1*j_2_3*j_3_2^2 - 2*j_1_1*j_1_3*j_2_2^2*j_3_1*j_3_3 + 2*j_1_1*j_1_3*j_2_2*j_2_3*j_3_1*j_3_2 + j_1_2^2*j_2_1^2*j_3_3^2 - 2*j_1_2^2*j_2_1*j_2_3*j_3_1*j_3_3 + j_1_2^2*j_2_3^2*j_3_1^2 - 2*j_1_2*j_1_3*j_2_1^2*j_3_2*j_3_3 + 2*j_1_2*j_1_3*j_2_1*j_2_2*j_3_1*j_3_3 + 2*j_1_2*j_1_3*j_2_1*j_2_3*j_3_1*j_3_2 - 2*j_1_2*j_1_3*j_2_2*j_2_3*j_3_1^2 + j_1_3^2*j_2_1^2*j_3_2^2 - 2*j_1_3^2*j_2_1*j_2_2*j_3_1*j_3_2 + j_1_3^2*j_2_2^2*j_3_1^2)


You can see the difference between these 2 elements.

Now, I must therefore find the conditions on the Jacobian so that the 2 Fisher matrices are equal. I am thinking in particular of the many null terms in my Jacobian:

actually I have a Jacobian (3x3) looking like this type of matrix:

Jacobian =

h 2*h*Omega1 0
0 h 2*h*Omega2
0 0 1


with h, Omega1 and Omega2 parameters to estimate. As you can see, there are quite a few null terms.

What would be the way to find from the above code the terms which should be zero on the Jacobian to have equality between the 2 matrices? : Must we have a tridiagonal Jacobian, Must we have matrix blocks in Jacobian ? I don't know for the moment.

ps: I simpilifé with 3x3 matrices but in reality the matrices are bigger: I had to take a simple example to illustrate my problem.