<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255194</link>
    <title>MATLAB Central Newsreader - How to solve XA + B = 0?</title>
    <description>Feed for thread: How to solve XA + B = 0?</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 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.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 02 Jul 2009 16:35:16 -0400</pubDate>
      <title>How to solve XA + B = 0?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255194#662264</link>
      <author>Tao Shen</author>
      <description>Hello all,&lt;br&gt;
&lt;br&gt;
I need to solve a equation which is XA + B =0. It is a least squares &lt;br&gt;
problem.&lt;br&gt;
&lt;br&gt;
The X is a 2*N matrix, A is N*2, and B is 2*2. Because A is N*2, it seems we &lt;br&gt;
can't find its right inverse matrix but only left inverse matrix. However it &lt;br&gt;
is not useful in this case.&lt;br&gt;
&lt;br&gt;
Is there any method to solve this problem?&lt;br&gt;
&lt;br&gt;
Thanks in advance! </description>
    </item>
    <item>
      <pubDate>Thu, 02 Jul 2009 16:51:38 -0400</pubDate>
      <title>Re: How to solve XA + B = 0?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255194#662272</link>
      <author>Steven Lord</author>
      <description>&lt;br&gt;
&quot;Tao Shen&quot; &amp;lt;tshen@mathworks.com&amp;gt; wrote in message &lt;br&gt;
news:h2ink4$acj$1@fred.mathworks.com...&lt;br&gt;
&amp;gt; Hello all,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I need to solve a equation which is XA + B =0. It is a least squares &lt;br&gt;
&amp;gt; problem.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; The X is a 2*N matrix, A is N*2, and B is 2*2. Because A is N*2, it seems &lt;br&gt;
&amp;gt; we can't find its right inverse matrix but only left inverse matrix. &lt;br&gt;
&amp;gt; However it is not useful in this case.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Is there any method to solve this problem?&lt;br&gt;
&lt;br&gt;
Use MRDIVIDE (/).&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Steve Lord&lt;br&gt;
slord@mathworks.com </description>
    </item>
    <item>
      <pubDate>Thu, 02 Jul 2009 16:54:02 -0400</pubDate>
      <title>Re: How to solve XA + B = 0?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255194#662274</link>
      <author>Bruno Luong</author>
      <description>&quot;Tao Shen&quot; &amp;lt;tshen@mathworks.com&amp;gt; wrote in message &amp;lt;h2ink4$acj$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hello all,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I need to solve a equation which is XA + B =0. It is a least squares &lt;br&gt;
&amp;gt; problem.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; The X is a 2*N matrix, A is N*2, and B is 2*2. Because A is N*2, it seems we &lt;br&gt;
&amp;gt; can't find its right inverse matrix but only left inverse matrix. However it &lt;br&gt;
&amp;gt; is not useful in this case.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Is there any method to solve this problem?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks in advance! &lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
&quot;/&quot; (mrdivide) operator does just that.&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Thu, 02 Jul 2009 17:19:02 -0400</pubDate>
      <title>Re: How to solve XA + B = 0?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255194#662286</link>
      <author>Matt </author>
      <description>&quot;Tao Shen&quot; &amp;lt;tshen@mathworks.com&amp;gt; wrote in message &amp;lt;h2ink4$acj$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hello all,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I need to solve a equation which is XA + B =0. It is a least squares &lt;br&gt;
&amp;gt; problem.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; The X is a 2*N matrix, A is N*2, and B is 2*2. Because A is N*2, it seems we &lt;br&gt;
&amp;gt; can't find its right inverse matrix but only left inverse matrix. However it &lt;br&gt;
&amp;gt; is not useful in this case.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Is there any method to solve this problem?&lt;br&gt;
&lt;br&gt;
It's an under-determined system (4 equations in 2*N unknowns). You'll have to decide how  you'd like to distinguish among possibly many solutions.</description>
    </item>
    <item>
      <pubDate>Thu, 02 Jul 2009 18:08:02 -0400</pubDate>
      <title>Re: How to solve XA + B = 0?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255194#662304</link>
      <author>Bruno Luong</author>
      <description>&quot;Matt &quot; &amp;lt;xys@whatever.com&amp;gt; wrote in message &amp;lt;h2iq66$21p$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Tao Shen&quot; &amp;lt;tshen@mathworks.com&amp;gt; wrote in message &amp;lt;h2ink4$acj$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hello all,&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; I need to solve a equation which is XA + B =0. It is a least squares &lt;br&gt;
&amp;gt; &amp;gt; problem.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; The X is a 2*N matrix, A is N*2, and B is 2*2. Because A is N*2, it seems we &lt;br&gt;
&amp;gt; &amp;gt; can't find its right inverse matrix but only left inverse matrix. However it &lt;br&gt;
&amp;gt; &amp;gt; is not useful in this case.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Is there any method to solve this problem?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; It's an under-determined system (4 equations in 2*N unknowns). You'll have to decide how  you'd like to distinguish among possibly many solutions.&lt;br&gt;
&lt;br&gt;
A now Matt has pointed to this aspect, I wonder if OP can specified &quot;least square&quot; in his first post. If each individual row of X is minimum 2-norm solution, this is pseudo inverse solution (and using &quot;/&quot; is wrong way to go). &lt;br&gt;
&lt;br&gt;
I have no idea (yet) how to find the X with minimum (global) 2-norm.&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
    <item>
      <pubDate>Fri, 03 Jul 2009 16:55:03 -0400</pubDate>
      <title>Re: How to solve XA + B = 0?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255194#662533</link>
      <author>Tim Davis</author>
      <description>..&lt;br&gt;
&amp;gt; &amp;gt; &quot;Tao Shen&quot; &amp;lt;tshen@mathworks.com&amp;gt; wrote in message &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; I need to solve a equation which is XA + B =0. It is a least squares &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; problem.&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; The X is a 2*N matrix, A is N*2, and B is 2*2. Because A is N*2, it seems we &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; can't find its right inverse matrix but only left inverse matrix. However it &lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; is not useful in this case.&lt;br&gt;
&lt;br&gt;
Don't let that INV go past your eyes; to solve that system FACTORIZE&lt;br&gt;
(see my file on the file exchange by that name).&lt;br&gt;
&lt;br&gt;
&amp;gt; I have no idea (yet) how to find the X with minimum (global) 2-norm.&lt;br&gt;
&lt;br&gt;
You can use QR to get a min 2 norm solution of an underdetermined&lt;br&gt;
system, by factorizing A'.  That's what I do in the FACTORIZE package.&lt;br&gt;
x=A\b or b/A gives a basic solution to an underdetermined system,&lt;br&gt;
not a min 2norm solution.</description>
    </item>
    <item>
      <pubDate>Fri, 03 Jul 2009 17:20:02 -0400</pubDate>
      <title>Re: How to solve XA + B = 0?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/255194#662534</link>
      <author>Bruno Luong</author>
      <description>&quot;Tim Davis&quot; &amp;lt;davis@cise.ufl.edu&amp;gt; wrote in message &amp;lt;h2ld57$3eg$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; You can use QR to get a min 2 norm solution of an underdetermined&lt;br&gt;
&amp;gt; system, by factorizing A'.  That's what I do in the FACTORIZE package.&lt;br&gt;
&amp;gt; x=A\b or b/A gives a basic solution to an underdetermined system,&lt;br&gt;
&amp;gt; not a min 2norm solution.&lt;br&gt;
&lt;br&gt;
Sorry it seems there is a miss understanding here, if B is *matrix*, X (solution of is underdetermined  system) is the matrix, and I have no idea how to select X that minimize the *global* spectral norm:&lt;br&gt;
&lt;br&gt;
|X|_2 := max(X'*u)  for all u st |u|:=1&lt;br&gt;
A*x = b&lt;br&gt;
&lt;br&gt;
A: m x n; (m&amp;lt;n, A full rank)&lt;br&gt;
B: m x p, (p&amp;gt;1)&lt;br&gt;
X: n x p, (p&amp;gt;1)&lt;br&gt;
u: n x 1, |u| = 1&lt;br&gt;
&lt;br&gt;
I don't believe neither QR or even PINV could give the above. Or do I miss something?&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
  </channel>
</rss>

