Solve this matrix equation and find T
4 views (last 30 days)
Show older comments
I would like to find a matrix T that satisfies this equation
T^-1*F*T = G
where F and G are known matrices.
In particular,
G = [0 2 0;-1 1 0;-2 2 0]
and
F = [0 -1 0; 2 1 0; 0 1 0]
Thanks!
0 Comments
Answers (1)
John D'Errico
on 28 Jan 2020
Homework, right? Why not admit it?
Note that the solution, if one exists, is not unique, since IF T does exist to solve the problem, then it is also true that for any scalar k, we also have k*T as a fully valid solution.
If T exists, such that T^-1*F*T = G, then we can write the problem in this form:
F*T = T*G
Now solve it using kron and null. The trick is to "unwind" the matrix T into a vector. Use kron to implicitly do that.
G = [0 2 0;-1 1 0;-2 2 0];
F = [0 -1 0; 2 1 0; 0 1 0];
sol = null(kron(eye(3),F) - kron(G',eye(3)));
T = reshape(sol(:,1),[3,3])
T =
-0.44989 0.17925 1.1936e-16
0.17925 0.72053 -4.7178e-17
0.44989 -0.10133 -0.038959
I picked the first column of sol, but that choice was arbitrary. I could have used any linear combination of the columns of sol. Regardless, did it work?
inv(T)*F*T
ans =
3.8858e-16 2 9.5242e-19
-1 1 2.6559e-16
-2 2 5.3118e-16
norm(inv(T)*F*T - G)
ans =
1.0165e-14
So, ignoring the stuff that is on the order of eps, T does as required.
0 Comments
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!