Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Matrix decomposition in vectors

Subject: Matrix decomposition in vectors

From: Umair Mansoor

Date: 26 Jan, 2009 15:28:02

Message: 1 of 6

Can someone tell me how can I decompose a matrix in vectors, like, a 2x2 matrix in to the product of a 2x1 and 1x2 vectors?

Subject: Matrix decomposition in vectors

From: John D'Errico

Date: 26 Jan, 2009 16:11:04

Message: 2 of 6

"Umair Mansoor" <umairbinmansoor@hotmail.com> wrote in message <glkkq2$8i2$1@fred.mathworks.com>...
> Can someone tell me how can I decompose a matrix in vectors, like, a 2x2 matrix in to the product of a 2x1 and 1x2 vectors?

In general, this is impossible, unless the 2x2 matrix
is singular. For higher dimensioned matrices, the
matrix must be rank 1 to be decomposed in this way.

So is your 2x2 matrix singular? I.e., is it a rank 1 matrix?

John

Subject: Matrix decomposition in vectors

From: someone

Date: 26 Jan, 2009 16:18:02

Message: 3 of 6

"Umair Mansoor" <umairbinmansoor@hotmail.com> wrote in message <glkkq2$8i2$1@fred.mathworks.com>...
> Can someone tell me how can I decompose a matrix in vectors, like, a 2x2 matrix in to the product of a 2x1 and 1x2 vectors?

A = [1 2 3 ; 4 5 6]

x1 = A(1,:)
x2 = A(2,:)
% etc.

y1 = A(:,1)
y2 = A(:,2)
% etc.

Subject: Matrix decomposition in vectors

From: Roger Stafford

Date: 26 Jan, 2009 17:51:01

Message: 4 of 6

"Umair Mansoor" <umairbinmansoor@hotmail.com> wrote in message <glkkq2$8i2$1@fred.mathworks.com>...
> Can someone tell me how can I decompose a matrix in vectors, like, a 2x2 matrix in to the product of a 2x1 and 1x2 vectors?

  To decompose any matrix in the way you propose, use the singular value decomposition function, 'svd'. If there is only one non-zero singular value, then that gives you a solution. If there are more than one, no solution is possible.

  If the matrix is A, do

 [U,S,V] = svd(A);

Suppose the only non-zero value in S is S(1,1). Then you have

 A = U*S*V' = (U(:,1)*S(1,1)) * (V(:,1)')

which gives you a solution and shows you that the choice is only arbitrary up to a multiplicative constant. Otherwise no solution is possible.

Roger Stafford

Subject: Matrix decomposition in vectors

From: Umair Mansoor

Date: 27 Jan, 2009 16:57:01

Message: 5 of 6

"John D'Errico" <woodchips@rochester.rr.com> wrote in message <glknao$qv$1@fred.mathworks.com>...
> "Umair Mansoor" <umairbinmansoor@hotmail.com> wrote in message <glkkq2$8i2$1@fred.mathworks.com>...
> > Can someone tell me how can I decompose a matrix in vectors, like, a 2x2 matrix in to the product of a 2x1 and 1x2 vectors?
>
> In general, this is impossible, unless the 2x2 matrix
> is singular. For higher dimensioned matrices, the
> matrix must be rank 1 to be decomposed in this way.
>
> So is your 2x2 matrix singular? I.e., is it a rank 1 matrix?
>
> John

I just know that its symmetric

Subject: Matrix decomposition in vectors

From: John D'Errico

Date: 27 Jan, 2009 17:55:03

Message: 6 of 6

"Umair Mansoor" <umairbinmansoor@hotmail.com> wrote in message <glnect$80d$1@fred.mathworks.com>...
> "John D'Errico" <woodchips@rochester.rr.com> wrote in message <glknao$qv$1@fred.mathworks.com>...
> > "Umair Mansoor" <umairbinmansoor@hotmail.com> wrote in message <glkkq2$8i2$1@fred.mathworks.com>...
> > > Can someone tell me how can I decompose a matrix in vectors, like, a 2x2 matrix in to the product of a 2x1 and 1x2 vectors?
> >
> > In general, this is impossible, unless the 2x2 matrix
> > is singular. For higher dimensioned matrices, the
> > matrix must be rank 1 to be decomposed in this way.
> >
> > So is your 2x2 matrix singular? I.e., is it a rank 1 matrix?
> >
> > John
>
> I just know that its symmetric

If that is all you know, then it is impossible
in general. It is not that we cannot find
such a pair of vectors. Rather, there do not
exist a pair of vectors such that this is true
for a general 2x2 symmetric matrix.

John

Tags for this Thread

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.

Contact us