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:
intersection of two complex matrices

Subject: intersection of two complex matrices

From: Frank

Date: 23 Nov, 2010 10:01:04

Message: 1 of 6

Hi all,

I have a question about the common subspaces of two complex matrices and hope that you can help.
 
I have two complex matrices, A and B both with size K by (K-1).
How can I obtain the intersection subspace of them?
In other words, I want to obtain a complex matrix R with size K by C satisfying the following:
For all x, there is a y, such that Rx=Ay and similarly, for all z, there is a w such that Rz = Bw.
Furthermore, if both A and B have full rank, can we say that C is at least (K-2) or somethings like that?

Thanks a lot.

Frank

Subject: intersection of two complex matrices

From: Bruno Luong

Date: 23 Nov, 2010 13:04:03

Message: 2 of 6

"Frank " <allinone_2003@yahoo.com.hk> wrote in message <icg3d0$41j$1@fred.mathworks.com>...
> Hi all,
>
> I have a question about the common subspaces of two complex matrices and hope that you can help.
>
> I have two complex matrices, A and B both with size K by (K-1).
> How can I obtain the intersection subspace of them?
> In other words, I want to obtain a complex matrix R with size K by C satisfying the following:
> For all x, there is a y, such that Rx=Ay and similarly, for all z, there is a w such that Rz = Bw.
> Furthermore, if both A and B have full rank, can we say that C is at least (K-2) or somethings like that?

Take QA/QB respectively orthonormal basis of A and B (using orth()), then use
null on

Q = [QA QB]

The nullspace of N=null([QA QB]) has k columns, it's the dimension of span<A> intersect span B

has two parts
NA=N(size(QA,2),:)
NB=N(size(QA,2)+1:end,:)

and
QA*NA+QB*NB = 0

i.e. span<QA*NA> is the span <QB*B>

QA*NA = A*(A\QA)*NA
QB*NB = B*(A\QB)*NB

If {y} = (A\QA)*NA and {w} = (A\QB)*NB is what you are looking for.

Bruno

Subject: intersection of two complex matrices

From: Frank

Date: 24 Nov, 2010 02:43:05

Message: 3 of 6

Thanks a lot.

Can you please specify the formula of finding R?

Frank


"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <icge43$kc6$1@fred.mathworks.com>...
> "Frank " <allinone_2003@yahoo.com.hk> wrote in message <icg3d0$41j$1@fred.mathworks.com>...
> > Hi all,
> >
> > I have a question about the common subspaces of two complex matrices and hope that you can help.
> >
> > I have two complex matrices, A and B both with size K by (K-1).
> > How can I obtain the intersection subspace of them?
> > In other words, I want to obtain a complex matrix R with size K by C satisfying the following:
> > For all x, there is a y, such that Rx=Ay and similarly, for all z, there is a w such that Rz = Bw.
> > Furthermore, if both A and B have full rank, can we say that C is at least (K-2) or somethings like that?
>
> Take QA/QB respectively orthonormal basis of A and B (using orth()), then use
> null on
>
> Q = [QA QB]
>
> The nullspace of N=null([QA QB]) has k columns, it's the dimension of span<A> intersect span B
>
> has two parts
> NA=N(size(QA,2),:)
> NB=N(size(QA,2)+1:end,:)
>
> and
> QA*NA+QB*NB = 0
>
> i.e. span<QA*NA> is the span <QB*B>
>
> QA*NA = A*(A\QA)*NA
> QB*NB = B*(A\QB)*NB
>
> If {y} = (A\QA)*NA and {w} = (A\QB)*NB is what you are looking for.
>
> Bruno

Subject: intersection of two complex matrices

From: Bruno Luong

Date: 24 Nov, 2010 07:33:04

Message: 4 of 6

"Frank " <allinone_2003@yahoo.com.hk> wrote in message <ichu3p$csl$1@fred.mathworks.com>...
> Thanks a lot.
>
> Can you please specify the formula of finding R?
>

Sure:

% Data
A=rand(4,3)+1i*rand(4,3);
B=rand(4,3)+1i*rand(4,3);

% Engine
QA=orth(A);
QB=orth(B)
N=null([QA QB]);
NA=N(1:size(QA,2),:);
NB=N(size(QA,2)+1:end,:);
R = QA*NA;
c = size(R,2); % rank of span<A> intersects span<B>

% Check with random x
x = rand(c,1);
y = +(A\QA)*NA*x
w = -(B\QB)*NB*x

R*x
A*y
B*w

% Bruno

Subject: intersection of two complex matrices

From: Bruno Luong

Date: 24 Nov, 2010 07:57:05

Message: 5 of 6

"Frank " <allinone_2003@yahoo.com.hk> wrote in message <icg3d0$41j$1@fred.mathworks.com>...

> Furthermore, if both A and B have full rank, can we say that C is at least (K-2) or somethings like that?

Well known equality:
rank(A union B) = rand(A) + rank(B) - rank(A intersect B)

We know
K-1 <= rank (A union B) <= K (eq1)

Since rank(A intersect B) =rand(A) + rank(B) - rank (A union B) ) (eq2)
Plug (eq1) into (eq2):

2(K-1)-K <= rank(A intersect B) <= 2(K-1)-(K-1)
K-2 <= rank(A intersect B) <= (K-1)

CQFD

Bruno

Subject: intersection of two complex matrices

From: Bruno Luong

Date: 24 Nov, 2010 17:41:03

Message: 6 of 6

A small modification:
> y = +(A\QA)*NA*x
> w = -(B\QB)*NB*x

It is better computational wise to do this:
y = +A\(QA*NA*x)
w = -B\(QB*NB*x)

Bruno

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