Why Matlab do not respect the exponential matrix property \exp^{YXY^{-1}}=Y\exp^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?
댓글 수: 0
채택된 답변
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
% symbolically
expm(sym(Y)*sym(X)*inv(sym(Y))) - sym(Y)*expm(sym(X))*inv(sym(Y))
추가 답변 (1개)
Walter Roberson
2021년 10월 5일
Let X and Y be scalar matrices.
syms X Y
lhs = exp(Y * X * inv(Y))
rhs = Y * exp(X * inv(Y))
eqn = lhs == rhs
solve(eqn, X)
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
eqn2 = lhs == rhs2
assume(X, 'real')
assume(Y, 'real')
simplify(eqn2)
댓글 수: 2
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))
rhs = Y * exp(X) * inv(Y)
eqn = lhs - rhs
Seqn = simplify(eqn)
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])
참고 항목
카테고리
Help Center 및 File Exchange에서 PID Controller Tuning에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!