How to extract the Jacobian matrix from the given equation?

8 views (last 30 days)
I have a matrix equation in the form:
EY = J * EX * JT,
where EY and EX are the given matrices, and JT is a transpose matrix of unknown matrix J.
Is there a way to calculate a matrix J directly (i.e., not using the Monte Carlo method)?

Accepted Answer

Matt J
Matt J on 10 Jun 2021
Edited: Matt J on 10 Jun 2021
If EX and EY are positive definite, one solution is simply,
J=chol(EY).'/chol(EX).'
In general, there won't be a unique solution, however. As an example, if EX=EY=I, then the equation can be solved by choosing J as any orthogonal matrix.

More Answers (1)

GOL
GOL on 10 Jun 2021
It seems I found the solution ourselves; maybe others will find it useful (but only for 2x2 matrix).
% Calculates Jacobian matrix J from given EX and EY uncertainties
% EY = J*EX*J';
% fully symbolic solution doesn't work on my side...
% syms a b c d x11 x12 x21 x22 y11 y12 y21 y22;
% assign known numbers
x11 = EX(1,1);
x12 = EX(1,2);
x21 = EX(2,1);
x22 = EX(2,2);
y11 = EY(1,1);
y12 = EY(1,2);
y21 = EY(2,1);
y22 = EY(2,2);
% define symbolic variables
syms a b c d;
% detailed multiplication of EY = J*EX*J', where J = [a b; c d];
eqn1 = a*(a*x11 + b*x21) + b*(a*x12 + b*x22) == y11;
eqn2 = c*(a*x11 + b*x21) + d*(a*x12 + b*x22) == y12;
eqn3 = a*(c*x11 + d*x21) + b*(c*x12 + d*x22) == y21;
eqn4 = c*(c*x11 + d*x21) + d*(c*x12 + d*x22) == y22;
eqns = [eqn1 eqn2 eqn3 eqn4];
% and solve it numerically
S = solve(eqns,[a b c d],'IgnoreAnalyticConstraints',true);
% take existing solution from available 1..4
sol = 3;
% assign solution to Jacobian
J = zeros(2,2);
J(1,1) = S.a(sol);
J(1,2) = S.b(sol);
J(2,1) = S.c(sol);
J(2,2) = S.d(sol);
% expected result
EY
% calculated result
J*EX*J'
% found Jacobian
J

Products


Release

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!