Why Matlab do not respect the exponential matrix property \exp^{YXY^​{-1}}=Y\ex​p^XY^{-1}?

조회 수: 1 (최근 30일)
Given two square matrices X, Y, with Y invertible, it holds that
,
but when coding it seems not.
For example, given the two matrices
>> X = [1 1 1; 1 1 1; 1 1 1];
>> Y = [1 1 1; 0 1 1; 0 0 1];
Y is invertible as it is full rank.
Defining its inverse as
>> IY = inv(Y)
IY =
1 -1 0
0 1 -1
0 0 1
it is numerically correct.
When checking for the above property a get
>> exp(Y*X*IY)
ans =
20.0855 1.0000 1.0000
7.3891 1.0000 1.0000
2.7183 1.0000 1.0000
>> Y*exp(X)*IY
ans =
8.1548 0 0
5.4366 0 0
2.7183 0 0
Clearly the property does not hold.
What am I missing?

채택된 답변

Paul
Paul 2021년 10월 6일
The identity holds for the matrix exponential, which is implemented with expm(), not exp() (which is the element-wise exponential function)
X = [1 1 1; 1 1 1; 1 1 1];
Y = [1 1 1; 0 1 1; 0 0 1];
% numerically
expm(Y*X/Y) - Y*expm(X)/Y
ans = 3×3
1.0e+-13 * 0.5684 0.0711 -0.1066 0.3375 0.0355 -0.0711 0.1599 0.0178 -0.0266
% symbolically
expm(sym(Y)*sym(X)*inv(sym(Y))) - sym(Y)*expm(sym(X))*inv(sym(Y))
ans = 

추가 답변 (1개)

Walter Roberson
Walter Roberson 2021년 10월 5일
Let X and Y be scalar matrices.
syms X Y
lhs = exp(Y * X * inv(Y))
lhs = 
rhs = Y * exp(X * inv(Y))
rhs = 
eqn = lhs == rhs
eqn = 
solve(eqn, X)
ans = 
So your proposed equation only holds if X has that particular relationship to Y.
I would suggest to you that your relationship is incorrect.
rhs2 = exp(X * inv(Y))^Y
rhs2 = 
eqn2 = lhs == rhs2
eqn2 = 
assume(X, 'real')
assume(Y, 'real')
simplify(eqn2)
ans = 
symtrue
  댓글 수: 2
Alberto Cavarzeran
Alberto Cavarzeran 2021년 10월 5일
Actually in my identity I have
rhs = Y * exp(X) * inv(Y)
and not
rhs = Y * exp(X * inv(Y))
so in the scalar case lhs = rhs is immediately verified.
Walter Roberson
Walter Roberson 2021년 10월 5일
Are you sure it is an identity?
syms X [3 3] real
syms Y [3 3] real
lhs = exp(Y * X * inv(Y))
lhs = 
rhs = Y * exp(X) * inv(Y)
rhs = 
eqn = lhs - rhs
eqn = 
Seqn = simplify(eqn)
Seqn = 
x = [1 1 1; 1 1 1; 1 1 1];
y = [1 1 1; 0 1 1; 0 0 1];
subs(Seqn, [X,Y], [x, y])
ans = 

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 PID Controller Tuning에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by