```Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: intersection of two complex matrices
Date: Tue, 23 Nov 2010 13:04:03 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 33
Message-ID: <icge43\$kc6\$1@fred.mathworks.com>
References: <icg3d0\$41j\$1@fred.mathworks.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1290517443 20870 172.30.248.38 (23 Nov 2010 13:04:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 23 Nov 2010 13:04:03 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:689296

"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
```