<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.nl/matlabcentral/newsreader/view_thread/295993</link>
    <title>MATLAB Central Newsreader - finding a matrix used in matrix transformation</title>
    <description>Feed for thread: finding a matrix used in matrix transformation</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2013 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.nl/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Tue, 09 Nov 2010 17:46:05 +0000</pubDate>
      <title>finding a matrix used in matrix transformation</title>
      <link>http://www.mathworks.nl/matlabcentral/newsreader/view_thread/295993#794546</link>
      <author>pushkarini </author>
      <description>Hi&lt;br&gt;
I have known matrices A and B (both square of size n say) such that&lt;br&gt;
B = inv(M)*A*M&lt;br&gt;
so that M*B = A*M&lt;br&gt;
I need to find M&lt;br&gt;
I can solve a system of n^2 equations in n^2 unknowns to find M, but is there an easier matlab command or another trick to do this? &lt;br&gt;
&lt;br&gt;
thanks</description>
    </item>
    <item>
      <pubDate>Tue, 09 Nov 2010 17:58:04 +0000</pubDate>
      <title>Re: finding a matrix used in matrix transformation</title>
      <link>http://www.mathworks.nl/matlabcentral/newsreader/view_thread/295993#794549</link>
      <author>James Tursa</author>
      <description>"pushkarini " &amp;lt;pushkarini.a@gmail.com&amp;gt; wrote in message &amp;lt;ibc1cs$61o$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi&lt;br&gt;
&amp;gt; I have known matrices A and B (both square of size n say) such that&lt;br&gt;
&amp;gt; B = inv(M)*A*M&lt;br&gt;
&amp;gt; so that M*B = A*M&lt;br&gt;
&amp;gt; I need to find M&lt;br&gt;
&amp;gt; I can solve a system of n^2 equations in n^2 unknowns to find M, but is there an easier matlab command or another trick to do this? &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; thanks&lt;br&gt;
&lt;br&gt;
You might have a look at this related problem:&lt;br&gt;
&lt;br&gt;
&lt;a href="http://www.mathworks.com/matlabcentral/fileexchange/19614-ab-kba"&gt;http://www.mathworks.com/matlabcentral/fileexchange/19614-ab-kba&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
James Tursa</description>
    </item>
    <item>
      <pubDate>Tue, 09 Nov 2010 18:06:04 +0000</pubDate>
      <title>Re: finding a matrix used in matrix transformation</title>
      <link>http://www.mathworks.nl/matlabcentral/newsreader/view_thread/295993#794552</link>
      <author>Matt J </author>
      <description>"pushkarini " &amp;lt;pushkarini.a@gmail.com&amp;gt; wrote in message &amp;lt;ibc1cs$61o$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi&lt;br&gt;
&amp;gt; I have known matrices A and B (both square of size n say) such that&lt;br&gt;
&amp;gt; B = inv(M)*A*M&lt;br&gt;
&amp;gt; so that M*B = A*M&lt;br&gt;
=====&lt;br&gt;
&lt;br&gt;
Do you know for a fact that a nonsingular solution M exists?&lt;br&gt;
&lt;br&gt;
Let m=M(:). and&lt;br&gt;
Q=(kron(B.', speye(n)) - kron(speye(n),A))&lt;br&gt;
&lt;br&gt;
Then the equation M*B-A*M is equivalent to&lt;br&gt;
&lt;br&gt;
Q*m=0&lt;br&gt;
&lt;br&gt;
So, if Q is nonsingular, the only solution is m=0, corresponding to M=zeros(n)&lt;br&gt;
which is singular. This is why I asked if you know for a fact that a nonsingular solution M exists.&lt;br&gt;
&lt;br&gt;
If you're sure that Q is singular, then you should be able to recover m as an eigenvector of Q with eigenvalue 0. See "doc eig"</description>
    </item>
    <item>
      <pubDate>Tue, 09 Nov 2010 18:42:03 +0000</pubDate>
      <title>Re: finding a matrix used in matrix transformation</title>
      <link>http://www.mathworks.nl/matlabcentral/newsreader/view_thread/295993#794565</link>
      <author>Bruno Luong</author>
      <description>"Matt J " &amp;lt;mattjacREMOVE@THISieee.spam&amp;gt; wrote in message &amp;lt;ibc2ic$mjm$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&lt;br&gt;
&amp;gt; If you're sure that Q is singular, then you should be able to recover m as an eigenvector of Q with eigenvalue 0. See "doc eig"&lt;br&gt;
&lt;br&gt;
Or simply using NULL which gives a basis of the null space (at the accuracy of the floating point).&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Tue, 09 Nov 2010 19:40:04 +0000</pubDate>
      <title>Re: finding a matrix used in matrix transformation</title>
      <link>http://www.mathworks.nl/matlabcentral/newsreader/view_thread/295993#794589</link>
      <author>Roger Stafford</author>
      <description>"pushkarini " &amp;lt;pushkarini.a@gmail.com&amp;gt; wrote in message &amp;lt;ibc1cs$61o$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi&lt;br&gt;
&amp;gt; I have known matrices A and B (both square of size n say) such that&lt;br&gt;
&amp;gt; B = inv(M)*A*M&lt;br&gt;
&amp;gt; so that M*B = A*M&lt;br&gt;
&amp;gt; I need to find M&lt;br&gt;
&amp;gt; I can solve a system of n^2 equations in n^2 unknowns to find M, but is there an easier matlab command or another trick to do this? &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; thanks&lt;br&gt;
- - - - - - - - - -&lt;br&gt;
&amp;nbsp;&amp;nbsp;The requirement that an invertible matrix M exists such that B = inv(M)*A*M is an equivalence relation and A and B are called 'similar' matrices if it holds between them.  It has been shown that matrices are similar if and only if their Jordan normal forms are the same up to possible rearrangement of the Jordan blocks.  There is a good paper on this subject by Kahan at:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&lt;a href="http://www.eecs.berkeley.edu/~wkahan/MathH110/jordan.pdf"&gt;http://www.eecs.berkeley.edu/~wkahan/MathH110/jordan.pdf&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;Presumably the way to find the M you seek would be to convert by similarity transform both A and B to their respective Jordan normal forms.  If these are alike up to rearrangement of their Jordan blocks, then combining all of these transformations and permutations would give you the necessary M matrix.  If not, then no such M can exist.  &lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;Unfortunately I don't know enough about the subject to tell you how to find the Jordan normal form using matlab, but reading the above paper might give you some ideas.  From a numerical analysis point of view finding the Jordan normal form is known to be numerically unstable in that small errors can make large differences in the result.  However I suspect this probably reflects the inherent difficulty of solving the problem you pose.&lt;br&gt;
&lt;br&gt;
Roger Stafford</description>
    </item>
    <item>
      <pubDate>Tue, 09 Nov 2010 22:04:04 +0000</pubDate>
      <title>Re: finding a matrix used in matrix transformation</title>
      <link>http://www.mathworks.nl/matlabcentral/newsreader/view_thread/295993#794636</link>
      <author>Roger Stafford</author>
      <description>"Roger Stafford" &amp;lt;ellieandrogerxyzzy@mindspring.com.invalid&amp;gt; wrote in message &amp;lt;ibc82k$ui$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; "pushkarini " &amp;lt;pushkarini.a@gmail.com&amp;gt; wrote in message &amp;lt;ibc1cs$61o$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hi&lt;br&gt;
&amp;gt; &amp;gt; I have known matrices A and B (both square of size n say) such that&lt;br&gt;
&amp;gt; &amp;gt; B = inv(M)*A*M&lt;br&gt;
&amp;gt; &amp;gt; so that M*B = A*M&lt;br&gt;
&amp;gt; &amp;gt; I need to find M&lt;br&gt;
&amp;gt; &amp;gt; I can solve a system of n^2 equations in n^2 unknowns to find M, but is there an easier matlab command or another trick to do this? &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; thanks&lt;br&gt;
&amp;gt; - - - - - - - - - -&lt;br&gt;
&amp;gt;   The requirement that an invertible matrix M exists such that B = inv(M)*A*M is an equivalence relation and A and B are called 'similar' matrices if it holds between them.  It has been shown that matrices are similar if and only if their Jordan normal forms are the same up to possible rearrangement of the Jordan blocks.  There is a good paper on this subject by Kahan at:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  &lt;a href="http://www.eecs.berkeley.edu/~wkahan/MathH110/jordan.pdf"&gt;http://www.eecs.berkeley.edu/~wkahan/MathH110/jordan.pdf&lt;/a&gt;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;   Presumably the way to find the M you seek would be to convert by similarity transform both A and B to their respective Jordan normal forms.  If these are alike up to rearrangement of their Jordan blocks, then combining all of these transformations and permutations would give you the necessary M matrix.  If not, then no such M can exist.  &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;   Unfortunately I don't know enough about the subject to tell you how to find the Jordan normal form using matlab, but reading the above paper might give you some ideas.  From a numerical analysis point of view finding the Jordan normal form is known to be numerically unstable in that small errors can make large differences in the result.  However I suspect this probably reflects the inherent difficulty of solving the problem you pose.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Roger Stafford&lt;br&gt;
- - - - - - - - - -&lt;br&gt;
&amp;nbsp;&amp;nbsp;I just found out that the Symbolic Toolbox has a function, 'jordan', which will find the Jordan normal form, either symbolically or numerically, of any square matrix and the corresponding similarity transform.  Therefore this, together with my previous remarks, should solve your problem.&lt;br&gt;
&lt;br&gt;
Roger Stafford</description>
    </item>
    <item>
      <pubDate>Tue, 09 Nov 2010 23:02:04 +0000</pubDate>
      <title>Re: finding a matrix used in matrix transformation</title>
      <link>http://www.mathworks.nl/matlabcentral/newsreader/view_thread/295993#794653</link>
      <author>Matt J </author>
      <description>"Bruno Luong" &amp;lt;b.luong@fogale.findmycountry&amp;gt; wrote in message &amp;lt;ibc4lr$cjv$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; "Matt J " &amp;lt;mattjacREMOVE@THISieee.spam&amp;gt; wrote in message &amp;lt;ibc2ic$mjm$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; If you're sure that Q is singular, then you should be able to recover m as an eigenvector of Q with eigenvalue 0. See "doc eig"&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Or simply using NULL which gives a basis of the null space (at the accuracy of the floating point).&lt;br&gt;
========&lt;br&gt;
&lt;br&gt;
This seems to work, as tested below. Unfortunately, though, null() won't work for sparse Q, so it tends to be quite slow to apply it to full Q&lt;br&gt;
&lt;br&gt;
n=15;&lt;br&gt;
&lt;br&gt;
%simulated data&lt;br&gt;
Mtrue=rand(n);&lt;br&gt;
A=rand(n);&lt;br&gt;
B=inv(Mtrue)*A*Mtrue;&lt;br&gt;
&lt;br&gt;
%Engine&lt;br&gt;
Q=full( kron(B.', speye(n)) - kron(speye(n),A) );&lt;br&gt;
&lt;br&gt;
N=null(Q);&lt;br&gt;
&lt;br&gt;
d=size(N,2);&lt;br&gt;
dets=zeros(1,d);&lt;br&gt;
for ii=1:d&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;M=reshape(N(:,ii),n,n);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;dets(ii)=abs(det(M));&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;br&gt;
end&lt;br&gt;
&lt;br&gt;
[~,j]=max(dets);&lt;br&gt;
&lt;br&gt;
M=reshape(N(:,ii),n,n);</description>
    </item>
    <item>
      <pubDate>Tue, 09 Nov 2010 23:20:04 +0000</pubDate>
      <title>Re: finding a matrix used in matrix transformation</title>
      <link>http://www.mathworks.nl/matlabcentral/newsreader/view_thread/295993#794658</link>
      <author>Bruno Luong</author>
      <description>"Matt J " &amp;lt;mattjacREMOVE@THISieee.spam&amp;gt; wrote in message &amp;lt;ibcjtb$1nt$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; "Bruno Luong" &amp;lt;b.luong@fogale.findmycountry&amp;gt; wrote in message &amp;lt;ibc4lr$cjv$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; "Matt J " &amp;lt;mattjacREMOVE@THISieee.spam&amp;gt; wrote in message &amp;lt;ibc2ic$mjm$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; If you're sure that Q is singular, then you should be able to recover m as an eigenvector of Q with eigenvalue 0. See "doc eig"&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Or simply using NULL which gives a basis of the null space (at the accuracy of the floating point).&lt;br&gt;
&amp;gt; ========&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; This seems to work, as tested below. Unfortunately, though, null() won't work for sparse Q, so it tends to be quite slow to apply it to full Q&lt;br&gt;
&lt;br&gt;
That's why I have submitted a null for sparse matrix in FEX. That requires recent Matlab version thought.&lt;br&gt;
&lt;br&gt;
I'm still thinking about Roger's Jordan form which should be provides a solution of the eqt&lt;br&gt;
&lt;br&gt;
B = inv(M)*A*M&lt;br&gt;
&lt;br&gt;
which is not obvious to get from&lt;br&gt;
&lt;br&gt;
the solutions of &lt;br&gt;
&lt;br&gt;
M*B = A*M, (provides by the kron/null for example)&lt;br&gt;
&amp;nbsp;&lt;br&gt;
I can't find a simple example where Jordan method gives a more focus solution space. Does someone can build of such example?&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Wed, 10 Nov 2010 03:30:10 +0000</pubDate>
      <title>Re: finding a matrix used in matrix transformation</title>
      <link>http://www.mathworks.nl/matlabcentral/newsreader/view_thread/295993#794696</link>
      <author>Roger Stafford</author>
      <description>"Bruno Luong" &amp;lt;b.luong@fogale.findmycountry&amp;gt; wrote in message &amp;lt;ibckv4$8q2$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; ........&lt;br&gt;
&amp;gt; I'm still thinking about Roger's Jordan form which should be provides a solution of the eqt&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; B = inv(M)*A*M&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; which is not obvious to get from&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; the solutions of &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; M*B = A*M, (provides by the kron/null for example)&lt;br&gt;
&amp;gt;  &lt;br&gt;
&amp;gt; I can't find a simple example where Jordan method gives a more focus solution space. Does someone can build of such example?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Bruno&lt;br&gt;
- - - - - - - -&lt;br&gt;
&amp;nbsp;&amp;nbsp;I would see it proceeding as follows:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;[V1,J1] = jordan(A);&lt;br&gt;
&amp;nbsp;[V2,J2] = jordan(B);&lt;br&gt;
&lt;br&gt;
If J1 and J2 are alike except for a rearrangement of Jordan blocks, let P be the permutation matrix that makes J1 and J2 match blocks, so that J2 = inv(P)*J1*P.  Then setting&lt;br&gt;
&lt;br&gt;
&amp;nbsp;M = V1*P*inv(V2);&lt;br&gt;
&lt;br&gt;
gives the required M.  That is because&lt;br&gt;
&lt;br&gt;
&amp;nbsp;inv(M)*A*M = (V2*inv(P)*inv(V1)) * A * (V1*P*inv(V2)) =&lt;br&gt;
&amp;nbsp;V2*inv(P)*J1*P*inv(V2) = V2*J2*inv(V2) = B.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;The step that takes additional work is finding the necessary permutation that makes J1 and J2 match.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;I do worry about the sensitivity of 'jordan' to small rounding errors.  It could conceivably cause J1 and J2 to have different Jordan blocks when they ought to be alike.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;To give the "kron/null" method and this one a thorough test one could construct a Jordan normal form matrix with a set of a number of Jordan blocks which all have, say, equal eigenvalues.  (Perhaps these could even be all zero.)  Then with two random but invertible matrices do similarity transforms on the normal matrix to produce A and B.  Then try out the kron/null and the above methods to see if either has troubles.&lt;br&gt;
&lt;br&gt;
Roger Stafford</description>
    </item>
    <item>
      <pubDate>Wed, 10 Nov 2010 07:27:07 +0000</pubDate>
      <title>Re: finding a matrix used in matrix transformation</title>
      <link>http://www.mathworks.nl/matlabcentral/newsreader/view_thread/295993#794733</link>
      <author>Bruno Luong</author>
      <description>Roger,&lt;br&gt;
&lt;br&gt;
Some preliminary facts:&lt;br&gt;
&lt;br&gt;
Let&lt;br&gt;
problem 1, B = inv(M)*A*M&lt;br&gt;
problem 2, M*B = A*M&lt;br&gt;
&lt;br&gt;
Any solution of problem 1 is solution of problem 2. So space-solution of problem 2 contains space solution of problem 1.&lt;br&gt;
&lt;br&gt;
I don't have symbolic toolbox so I can't check Jordan method. However if I generate A and B such as required, then I check the Kron/Null and it gives not 1-dimensional space solution but n-dimensional space-solution (this should be provable by Kronecker property, but right now I just observe this fact).&lt;br&gt;
&lt;br&gt;
What I wonder is this: &lt;br&gt;
&lt;br&gt;
In the problem 1, we look for the Jordan-transformation matrix M (from A to B) that is not singular. But could the KRON/NULL basis contains somehow singular matrices, yet by combining them we get  non-singular solution? If yes I would like to see an example.&lt;br&gt;
&lt;br&gt;
Here is the code I use to check Kron/Null&lt;br&gt;
&lt;br&gt;
% Generate matrices&lt;br&gt;
J1 = [1 1 0; 0 1 0; 0 0 2];&lt;br&gt;
I = eye(3);&lt;br&gt;
P = I(:,[2 3 1]);&lt;br&gt;
J2 = inv(P)*J1*P;&lt;br&gt;
V1 = ceil(99*rand(3,3));&lt;br&gt;
V2 = ceil(99*rand(3,3));&lt;br&gt;
&lt;br&gt;
A = V1*J1*inv(V1)&lt;br&gt;
B = V2*J2*inv(V2)&lt;br&gt;
% Jordan transformation&lt;br&gt;
M = V1*P*inv(V2);&lt;br&gt;
&lt;br&gt;
fprintf('Jordan check\n');&lt;br&gt;
fprintf(' M*B:\n');&lt;br&gt;
disp(M*B)&lt;br&gt;
fprintf(' A*M:\n');&lt;br&gt;
disp(A*M)&lt;br&gt;
&lt;br&gt;
%% Kron/Null&lt;br&gt;
I = eye(size(A));&lt;br&gt;
Q = kron(B.',I)-kron(I,A);&lt;br&gt;
N = null(Q);&lt;br&gt;
% Try to recover M from N&lt;br&gt;
x = N\M(:);&lt;br&gt;
Mrecov = reshape(N*x,size(A));&lt;br&gt;
errorn = norm(Mrecov-M)/norm(M);&lt;br&gt;
if errorn &amp;lt; 1e-10&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fprintf('OK: We can recover Jordan solution\n')&lt;br&gt;
end&lt;br&gt;
% Check if each basis matrix is the solution&lt;br&gt;
for k=1:size(N,2)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fprintf('Kron/NULL solution #%d check\n', k);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;M = reshape(N(:,1),[3 3]);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if rank(M) &amp;lt; length(A)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fprintf('Kron/NULL method only solve the M*B=A*M\n');&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fprintf('Kron/NULL method solve the harder problem B=inv(M)*A*M\n');&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fprintf(' M*B:\n');&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;disp(M*B)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fprintf(' A*M:\n');&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;disp(A*M)&lt;br&gt;
end&lt;br&gt;
&lt;br&gt;
% Bruno</description>
    </item>
    <item>
      <pubDate>Wed, 10 Nov 2010 08:31:03 +0000</pubDate>
      <title>Re: finding a matrix used in matrix transformation</title>
      <link>http://www.mathworks.nl/matlabcentral/newsreader/view_thread/295993#794744</link>
      <author>pushkarini </author>
      <description>Thanks a lot fo your quick reply! &lt;br&gt;
&lt;br&gt;
The method using kron command works. the one using jordan matrices gives me the error&lt;br&gt;
Error: Similarity matrix too large [mljordan], also it took a loong time to solve</description>
    </item>
    <item>
      <pubDate>Wed, 10 Nov 2010 15:20:05 +0000</pubDate>
      <title>Re: finding a matrix used in matrix transformation</title>
      <link>http://www.mathworks.nl/matlabcentral/newsreader/view_thread/295993#794877</link>
      <author>Matt J </author>
      <description>"Bruno Luong" &amp;lt;b.luong@fogale.findmycountry&amp;gt; wrote in message &amp;lt;ibdhgb$k7j$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; What I wonder is this: &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; In the problem 1, we look for the Jordan-transformation matrix M (from A to B) that is not singular. But could the KRON/NULL basis contains somehow singular matrices, yet by combining them we get  non-singular solution? If yes I would like to see an example.&lt;br&gt;
======&lt;br&gt;
&lt;br&gt;
You mean if the KRON/NULL basis contains *only* singular matrices? That would indeed be a problem.&lt;br&gt;
&lt;br&gt;
To verify this, I guess you would want to solve a max-min squares problem. In particular, if M(:,:,i) are KRON/NULL basis matrices, then you want to find &lt;br&gt;
coefficients c(i) and &lt;br&gt;
an n x 1 unit vector u satisfying&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;norm( sum_i c(i)*M(:,:,i)*u)&amp;gt;0&lt;br&gt;
&lt;br&gt;
which you might do by solving&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;max( min (  norm( sum_i c(i)*M(:,:,i)*u)^2  ))&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;s.t. norm(u)^2=1&lt;br&gt;
&lt;br&gt;
where the max is over the c(i) and the min is over u.&lt;br&gt;
&lt;br&gt;
This stretches my optimization know-how, but I guess you could might be able to do  it iteratively by alternatingly maximizing over c and minimizing over u, both of which are simple computations....</description>
    </item>
    <item>
      <pubDate>Wed, 10 Nov 2010 15:34:04 +0000</pubDate>
      <title>Re: finding a matrix used in matrix transformation</title>
      <link>http://www.mathworks.nl/matlabcentral/newsreader/view_thread/295993#794884</link>
      <author>Matt J </author>
      <description>"Matt J " &amp;lt;mattjacREMOVE@THISieee.spam&amp;gt; wrote in message &amp;lt;ibed75$jiu$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; To verify this, I guess you would want to solve a max-min squares problem. In particular, if M(:,:,i) are KRON/NULL basis matrices, then you want to find &lt;br&gt;
&amp;gt; coefficients c(i) and &lt;br&gt;
&amp;gt; an n x 1 unit vector u satisfying&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;   norm( sum_i c(i)*M(:,:,i)*u)&amp;gt;0&lt;br&gt;
=====&lt;br&gt;
&lt;br&gt;
Sorry, this should have read, find c(i) such that&lt;br&gt;
&lt;br&gt;
min_u norm(sum_i c(i)*M(:,:,i)*u)/norm(u) &amp;gt;0</description>
    </item>
    <item>
      <pubDate>Wed, 10 Nov 2010 15:46:04 +0000</pubDate>
      <title>Re: finding a matrix used in matrix transformation</title>
      <link>http://www.mathworks.nl/matlabcentral/newsreader/view_thread/295993#794887</link>
      <author>Bruno Luong</author>
      <description>"Matt J " &amp;lt;mattjacREMOVE@THISieee.spam&amp;gt; wrote in message &lt;br&gt;
&amp;gt; You mean if the KRON/NULL basis contains *only* singular matrices? That would indeed be a problem.&lt;br&gt;
&lt;br&gt;
Matt,&lt;br&gt;
&lt;br&gt;
My question is not really how to derive a non-singular M from the null space vectors N. I'm not there yet!!&lt;br&gt;
&lt;br&gt;
My question is simpler: can it happens? Since this is what could be a drawback where Jordan approach does not suffer. To me it is not clear the motivation of Roger recommends for Jordan's transformation.&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Wed, 10 Nov 2010 15:53:04 +0000</pubDate>
      <title>Re: finding a matrix used in matrix transformation</title>
      <link>http://www.mathworks.nl/matlabcentral/newsreader/view_thread/295993#794890</link>
      <author>Matt J </author>
      <description>"Bruno Luong" &amp;lt;b.luong@fogale.findmycountry&amp;gt; wrote in message &amp;lt;ibdhgb$k7j$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;But could the KRON/NULL basis contains somehow singular matrices, yet by combining them we get  non-singular solution? If yes I would like to see an example.&lt;br&gt;
======&lt;br&gt;
&lt;br&gt;
The simplest example is probably when A=B=Mtrue=eye(n).&lt;br&gt;
&lt;br&gt;
In that case the Kron-derived matrix is Q=zeros(n^2) &lt;br&gt;
and null(Q)=eye(n^2). &lt;br&gt;
&lt;br&gt;
In this case, each and every null matrix M derived from reshaping a column of null(Q)&lt;br&gt;
is singular.&lt;br&gt;
&lt;br&gt;
Observe also that, in addition to M=eye(n), every possible nxn nonsingular matrix M is in the span of null(Q), and is a valid solution to problem 1.</description>
    </item>
    <item>
      <pubDate>Wed, 10 Nov 2010 16:01:06 +0000</pubDate>
      <title>Re: finding a matrix used in matrix transformation</title>
      <link>http://www.mathworks.nl/matlabcentral/newsreader/view_thread/295993#794894</link>
      <author>Bruno Luong</author>
      <description>&lt;br&gt;
&amp;gt; The simplest example is probably when A=B=Mtrue=eye(n).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; In that case the Kron-derived matrix is Q=zeros(n^2) &lt;br&gt;
&amp;gt; and null(Q)=eye(n^2). &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; In this case, each and every null matrix M derived from reshaping a column of null(Q)&lt;br&gt;
&amp;gt; is singular.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Observe also that, in addition to M=eye(n), every possible nxn nonsingular matrix M is in the span of null(Q), and is a valid solution to problem 1.&lt;br&gt;
&lt;br&gt;
OK. That works. Now the question is what Jordan method gives in this case?&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Wed, 10 Nov 2010 16:36:03 +0000</pubDate>
      <title>Re: finding a matrix used in matrix transformation</title>
      <link>http://www.mathworks.nl/matlabcentral/newsreader/view_thread/295993#794906</link>
      <author>pushkarini </author>
      <description>Hi&lt;br&gt;
The kron command works for a matrix A and another one B (which i derived from A using some column and row operations.) &lt;br&gt;
Next, I used orth(A) command to get an orthonormal basis for A. I then did:&lt;br&gt;
B = orth(A)&lt;br&gt;
and tried to find an M such that M*B = A*M, and after using the method involving kron got some value for M. But, when I used this M to compute my B back (using B = inv(M)*A*M), I did not get my B back. Why is this so? Then, I thought, it is probably not possible to convert A into orth(A) using such a method in the first place? I guess, adding proper 'lengths' to the row vectors of the orthonormal basis will solve the problem? &lt;br&gt;
I am doing all this to convert my matrix A which I start with to a normal matrix (ie. whose eigenvectors are perpendicular to eachother).</description>
    </item>
    <item>
      <pubDate>Wed, 10 Nov 2010 17:08:05 +0000</pubDate>
      <title>Re: finding a matrix used in matrix transformation</title>
      <link>http://www.mathworks.nl/matlabcentral/newsreader/view_thread/295993#794919</link>
      <author>Matt J </author>
      <description>"Bruno Luong" &amp;lt;b.luong@fogale.findmycountry&amp;gt; wrote in message &amp;lt;ibefk2$2hn$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; OK. That works. Now the question is what Jordan method gives in this case?&lt;br&gt;
=====&lt;br&gt;
&lt;br&gt;
It will give you some non-singular matrix M. Which one depends on which of the infinite possible Jordan decompositions of A=eye(n) and B=eye(n) you decide to use.</description>
    </item>
    <item>
      <pubDate>Wed, 10 Nov 2010 17:36:05 +0000</pubDate>
      <title>Re: finding a matrix used in matrix transformation</title>
      <link>http://www.mathworks.nl/matlabcentral/newsreader/view_thread/295993#794929</link>
      <author>Matt J </author>
      <description>"pushkarini " &amp;lt;pushkarini.a@gmail.com&amp;gt; wrote in message &amp;lt;ibehlj$ijd$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&lt;br&gt;
Then, I thought, it is probably not possible to convert A into orth(A) using such a method in the first place? &lt;br&gt;
==============&lt;br&gt;
&lt;br&gt;
Correct. The transformation B=inv(M)*A*M will cause B to have the same eigenvalues as A. But orth(A) in general will not have the same eigenvalues as A.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
I guess, adding proper 'lengths' to the row vectors of the orthonormal basis will solve the problem? &lt;br&gt;
============&lt;br&gt;
&lt;br&gt;
I don't know what this means, but it sounds doubtful.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&amp;gt; I am doing all this to convert my matrix A which I start with to a normal matrix (ie. whose eigenvectors are perpendicular to eachother).&lt;br&gt;
====================&lt;br&gt;
&lt;br&gt;
Always a good idea to say what you really want in the first place!!!&lt;br&gt;
&lt;br&gt;
Assuming A has a full set of n eigenvalues, you can do the following&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&lt;br&gt;
%Engine&lt;br&gt;
[V,D]=eig(A);&lt;br&gt;
iV=inv(V);&lt;br&gt;
&lt;br&gt;
M=(V*V')^(.5);&lt;br&gt;
&lt;br&gt;
B=inv(M)*A*M;</description>
    </item>
    <item>
      <pubDate>Wed, 10 Nov 2010 18:22:03 +0000</pubDate>
      <title>Re: finding a matrix used in matrix transformation</title>
      <link>http://www.mathworks.nl/matlabcentral/newsreader/view_thread/295993#794949</link>
      <author>Bruno Luong</author>
      <description>&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;   max( min (  norm( sum_i c(i)*M(:,:,i)*u)^2  ))&lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
Note that the above criteria (minimum singular value) is not helpful since max -&amp;gt; Inf if c=s*c' for s-&amp;gt; inf given c' any arbitrary coefficients such that sum_i c'(i)*M(:,:,i) is non singular.&lt;br&gt;
&lt;br&gt;
It is better to minimize some quantity related to condition number or stretch of the spectrum. &lt;br&gt;
&lt;br&gt;
But anyway the problem of optimizing eigen/singular values is slightly OT.&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Wed, 10 Nov 2010 18:42:04 +0000</pubDate>
      <title>Re: finding a matrix used in matrix transformation</title>
      <link>http://www.mathworks.nl/matlabcentral/newsreader/view_thread/295993#794952</link>
      <author>Matt J </author>
      <description>"Bruno Luong" &amp;lt;b.luong@fogale.findmycountry&amp;gt; wrote in message &amp;lt;ibensb$8r6$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt;   max( min (  norm( sum_i c(i)*M(:,:,i)*u)^2  ))&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Note that the above criteria (minimum singular value) is not helpful since max -&amp;gt; Inf if c=s*c' for s-&amp;gt; inf given c' any arbitrary coefficients such that sum_i c'(i)*M(:,:,i) is non singular.&lt;br&gt;
======&lt;br&gt;
&lt;br&gt;
I proably meant to have norm(c) bounded to 1 as well as norm(u). &lt;br&gt;
&lt;br&gt;
In any case, if you're going to solve this iteratively, it won't matterif max -&amp;gt; Inf. As soon as you reach an iteration where  &lt;br&gt;
&lt;br&gt;
M=sum_i c(i)*Mbasis(:,:,i) &lt;br&gt;
&lt;br&gt;
is non-singular, you would terminate the algorithm, with M as your solution.</description>
    </item>
    <item>
      <pubDate>Wed, 10 Nov 2010 19:39:04 +0000</pubDate>
      <title>Re: finding a matrix used in matrix transformation</title>
      <link>http://www.mathworks.nl/matlabcentral/newsreader/view_thread/295993#794972</link>
      <author>Bruno Luong</author>
      <description>"Matt J " &amp;lt;mattjacREMOVE@THISieee.spam&amp;gt; wrote in message &amp;lt;ibep1s$pob$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; "Bruno Luong" &amp;lt;b.luong@fogale.findmycountry&amp;gt; wrote in message &amp;lt;ibensb$8r6$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt;   max( min (  norm( sum_i c(i)*M(:,:,i)*u)^2  ))&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Note that the above criteria (minimum singular value) is not helpful since max -&amp;gt; Inf if c=s*c' for s-&amp;gt; inf given c' any arbitrary coefficients such that sum_i c'(i)*M(:,:,i) is non singular.&lt;br&gt;
&amp;gt; ======&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I proably meant to have norm(c) bounded to 1 as well as norm(u). &lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
Yes. norm(c)=1 is equivalent to Frobenious norm of transition matrix = 1, which is bounded by the spectral norm (both norms are equivalent). So by maximizing the smallest singular-value with |c|=1, it's close to the problem of minimizing the condition number without imposing constraint on c.&lt;br&gt;
&lt;br&gt;
&amp;gt; In any case, if you're going to solve this iteratively, it won't matterif max -&amp;gt; Inf. As soon as you reach an iteration where  &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; M=sum_i c(i)*Mbasis(:,:,i) &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; is non-singular, you would terminate the algorithm, with M as your solution.&lt;br&gt;
&lt;br&gt;
Nope, that's not satisfying justification IMO.&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
  </channel>
</rss>
