MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Intersection of 2 subspaces

  • To: mathgroup at smc.vnet.net
  • Subject: [mg21689] Re: [mg21681] Intersection of 2 subspaces
  • From: Maris Tõnso <maris at tpu.ee>
  • Date: Sat, 22 Jan 2000 02:52:47 -0500 (EST)
  • References: <200001210900.EAA06601@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi!

I have studied the problem of finding intersection of two subspaces for my
own work and I have find two solutions, sufficient for me.

The first algorithm, based on de Morgas theorem:

IntersectionSpace[ sp1_?MatrixQ, sp2_?MatrixQ ] :=
With[ {
    compsp = Join[ NullSpace@ sp1, NullSpace@ sp2 ]},
    If[ compsp === {},
        IdentityMatrix[ Length@ coords ],
        NullSpace[ compsp ]
    ] (* End If *)
] (* End With *)

And the second way:

IntersectionSpace[  sp1_?MatrixQ, sp2_?MatrixQ ] :=
With[ { sol = NullSpace@ Transpose@ Join[ sp1, sp2 ] },
    If[ sol === {}, {},
        Simplify[
            Take[ #, Length at sp1 ]& /@ sol.sp1
       ]
    ] (* End If *)
] (* End With *)


Regards,
Maris

.......................................................
Maris Tonso                 Institute of Cybernetics
maris at tpu.ee                Tallinn
http://www.tpu.ee/~maris    Estonia
.......................................................



RENAULT Fabien wrote:

> Here is my problem :
> In a vectorial space of dimension n, I have 2 different subspaces defined
> by a set of vectors. I need to find the subspace intersection of those 2
> subspaces that is to say find the vectors directors that define the
> subspace intersection.
>
> For example if n=4
> If my first subspace is defined by the vectors (0,0,0,1) and (0,0,1,0)
> If my second subspace is defined by the vectors (1,0,0,0) and (0,0,1,1)
>
> Then the answer would be the subspace intersection defined by the vector
> (0,0,1,1).
>
> If someone could tell me where to find such a function or how to build an
> efficient algorithm that could handle much higher values of n (up to
> 25-30) that would be a great help for me.
>
> Thanks




  • Prev by Date: Corrupted notebook
  • Next by Date: Re: Fast Fourier Transforms
  • Previous by thread: Intersection of 2 subspaces
  • Next by thread: Re: Intersection of 2 subspaces