Thread Subject: How to solve XA + B = 0?

Subject: How to solve XA + B = 0?

From: Tao Shen

Date: 2 Jul, 2009 16:35:16

Message: 1 of 7

Hello all,

I need to solve a equation which is XA + B =0. It is a least squares
problem.

The X is a 2*N matrix, A is N*2, and B is 2*2. Because A is N*2, it seems we
can't find its right inverse matrix but only left inverse matrix. However it
is not useful in this case.

Is there any method to solve this problem?

Thanks in advance!

Subject: How to solve XA + B = 0?

From: Steven Lord

Date: 2 Jul, 2009 16:51:38

Message: 2 of 7


"Tao Shen" <tshen@mathworks.com> wrote in message
news:h2ink4$acj$1@fred.mathworks.com...
> Hello all,
>
> I need to solve a equation which is XA + B =0. It is a least squares
> problem.
>
> The X is a 2*N matrix, A is N*2, and B is 2*2. Because A is N*2, it seems
> we can't find its right inverse matrix but only left inverse matrix.
> However it is not useful in this case.
>
> Is there any method to solve this problem?

Use MRDIVIDE (/).

--
Steve Lord
slord@mathworks.com

Subject: How to solve XA + B = 0?

From: Bruno Luong

Date: 2 Jul, 2009 16:54:02

Message: 3 of 7

"Tao Shen" <tshen@mathworks.com> wrote in message <h2ink4$acj$1@fred.mathworks.com>...
> Hello all,
>
> I need to solve a equation which is XA + B =0. It is a least squares
> problem.
>
> The X is a 2*N matrix, A is N*2, and B is 2*2. Because A is N*2, it seems we
> can't find its right inverse matrix but only left inverse matrix. However it
> is not useful in this case.
>
> Is there any method to solve this problem?
>
> Thanks in advance!
>

"/" (mrdivide) operator does just that.

Bruno

Subject: How to solve XA + B = 0?

From: Matt

Date: 2 Jul, 2009 17:19:02

Message: 4 of 7

"Tao Shen" <tshen@mathworks.com> wrote in message <h2ink4$acj$1@fred.mathworks.com>...
> Hello all,
>
> I need to solve a equation which is XA + B =0. It is a least squares
> problem.
>
> The X is a 2*N matrix, A is N*2, and B is 2*2. Because A is N*2, it seems we
> can't find its right inverse matrix but only left inverse matrix. However it
> is not useful in this case.
>
> Is there any method to solve this problem?

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.

Subject: How to solve XA + B = 0?

From: Bruno Luong

Date: 2 Jul, 2009 18:08:02

Message: 5 of 7

"Matt " <xys@whatever.com> wrote in message <h2iq66$21p$1@fred.mathworks.com>...
> "Tao Shen" <tshen@mathworks.com> wrote in message <h2ink4$acj$1@fred.mathworks.com>...
> > Hello all,
> >
> > I need to solve a equation which is XA + B =0. It is a least squares
> > problem.
> >
> > The X is a 2*N matrix, A is N*2, and B is 2*2. Because A is N*2, it seems we
> > can't find its right inverse matrix but only left inverse matrix. However it
> > is not useful in this case.
> >
> > Is there any method to solve this problem?
>
> 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.

A now Matt has pointed to this aspect, I wonder if OP can specified "least square" in his first post. If each individual row of X is minimum 2-norm solution, this is pseudo inverse solution (and using "/" is wrong way to go).

I have no idea (yet) how to find the X with minimum (global) 2-norm.

Bruno

Subject: How to solve XA + B = 0?

From: Tim Davis

Date: 3 Jul, 2009 16:55:03

Message: 6 of 7

..
> > "Tao Shen" <tshen@mathworks.com> wrote in message
> > > I need to solve a equation which is XA + B =0. It is a least squares
> > > problem.
> > >
> > > The X is a 2*N matrix, A is N*2, and B is 2*2. Because A is N*2, it seems we
> > > can't find its right inverse matrix but only left inverse matrix. However it
> > > is not useful in this case.

Don't let that INV go past your eyes; to solve that system FACTORIZE
(see my file on the file exchange by that name).

> I have no idea (yet) how to find the X with minimum (global) 2-norm.

You can use QR to get a min 2 norm solution of an underdetermined
system, by factorizing A'. That's what I do in the FACTORIZE package.
x=A\b or b/A gives a basic solution to an underdetermined system,
not a min 2norm solution.

Subject: How to solve XA + B = 0?

From: Bruno Luong

Date: 3 Jul, 2009 17:20:02

Message: 7 of 7

"Tim Davis" <davis@cise.ufl.edu> wrote in message <h2ld57$3eg$1@fred.mathworks.com>...

>
> You can use QR to get a min 2 norm solution of an underdetermined
> system, by factorizing A'. That's what I do in the FACTORIZE package.
> x=A\b or b/A gives a basic solution to an underdetermined system,
> not a min 2norm solution.

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:

|X|_2 := max(X'*u) for all u st |u|:=1
A*x = b

A: m x n; (m<n, A full rank)
B: m x p, (p>1)
X: n x p, (p>1)
u: n x 1, |u| = 1

I don't believe neither QR or even PINV could give the above. Or do I miss something?

Bruno

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
2nd norm Sprinceana 7 Aug, 2009 15:38:57
min global Sprinceana 7 Aug, 2009 15:38:57
least squares Sprinceana 2 Jul, 2009 13:24:54
equation Sprinceana 2 Jul, 2009 13:24:49
solve Sprinceana 2 Jul, 2009 13:24:49
axb0 Sprinceana 2 Jul, 2009 13:24:49
rssFeed for this Thread

Contact us at files@mathworks.com