Reformulate a matrix equation

Greetings everyone. I have a question: I have 3 matrices which contain numeral values, all of them are of the same order. The matrices are A,J and S.
The equation of is J = inv(S) * A * S;
Is there any way possible for me to solve this for S? i.e. J and A are known but S is unknown, can I do anything to obtain S from J and A? Thank you in advance.
Regards, M. Ayoub
*Edit: S is unknown, when I said it contains numeral values I meant that that unknowns are of numeral type (i.e. not string or char, etc...).
*Edit: all of the matrices are square matrices.

1 comentario

Roger Stafford
Roger Stafford el 24 de Nov. de 2017
If it is assumed that an inverse exists for S, then your equation implies that S*J-A*S = 0. For n x n matrices, this is consequently n^2 linear equations in n^2 unknown S values. However, I think you will find that unless J and A bear a very special relation to one another, the associated n^2 x n^2 matrix of J and A coefficients has rank n^2, and this latter equation will have only the trivial solution S = 0. S would therefore possess no inverse. Consequently, in the general case there is no solution to your equation. That is, of course, not a fault of Matlab. It is a general mathematical property.

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 23 de Nov. de 2017

0 votos

If J = inv(S)*A*S then J*inv(S) = inv(S)*A*S*inv(S) so J*inv(S) = inv(S) * A. Then S*J*inv(S) = S*inv(S) * A, so S*J*inv(S) = A and so
A = S*J*inv(S)
Your question assumes that S is invertable, so as long as you have the numeric values for S and J and S is invertable then you can calculate A.
Note: sometimes people ask this question when the matrices are not square. That case cannot usually be solved.

8 comentarios

Mohammad Ayoub
Mohammad Ayoub el 23 de Nov. de 2017
They’re actually all square. I’ll put that in my question thank you. As for your answer, I got it. But my main concern here is to calculate S. Is there any way possible? I tried
S = syms(‘S’, [4 4]) %A and J are of order 4
solve(S*J == A*S,S)
But it gives me weird outputs...
M
M el 23 de Nov. de 2017
I think this is not that simple, as the question was to calculate S, with known matrices A and J.
But you can use nonlinear matrix solver to find the value of S.
Mohammad Ayoub
Mohammad Ayoub el 23 de Nov. de 2017
Is there a way to solve nonlinear matrix equations using MATLAB?
M
M el 23 de Nov. de 2017
One possible way is to solve fsolve.
Walter Roberson
Walter Roberson el 23 de Nov. de 2017
Ah, unfortunately the solve(S*J==A*S,S) formulation gives S as all zero, which is a solution when written in that form...)
Walter Roberson
Walter Roberson el 23 de Nov. de 2017
On the test random data I used, vpasolve(J == inv(S)*A*S) said there was no solution.
Mohammad Ayoub
Mohammad Ayoub el 24 de Nov. de 2017
Oh well. I guess I can’t achieve that using MATLAB. Thank you very much! Much appreciated
Walter Roberson
Walter Roberson el 24 de Nov. de 2017
It might have worked on other data.

Iniciar sesión para comentar.

Categorías

Más información sobre Mathematics en Centro de ayuda y File Exchange.

Preguntada:

el 23 de Nov. de 2017

Comentada:

el 24 de Nov. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by