Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: Intersection over an index

  • To: mathgroup at smc.vnet.net
  • Subject: [mg128424] Re: Intersection over an index
  • From: Geoffrey Eisenbarth <geoffrey.eisenbarth at gmail.com>
  • Date: Thu, 18 Oct 2012 02:37:27 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <20121017001211.0C48B685E@smc.vnet.net>

Thanks for your response! I believe using Apply[] worked better for me, but
I appreciate your response and this community.

On Tue, Oct 16, 2012 at 10:01 PM, Bob Hanlon <hanlonr357 at gmail.com> wrote:

> intersectM[m1_?MatrixQ, m2_?MatrixQ] :=
>   Select[m2, MemberQ[m1, #] &];
>
> intersectEV[m : {__?MatrixQ}] := Module[
>   {ev = Eigenvectors /@ m},
>   Fold[intersectM[#1, #2] &, First[ev], Rest[ev]]]
>
> A[1] = {{-1, -3, 1}, {0, -3, 0}, {-1, -1, -1}};
>
> Eigenvectors[A[1]]
>
> {{1, 1, 1}, {-I, 0, 1}, {I, 0, 1}}
>
> A[2] = {{-2, -1, 1}, {0, -1, 0}, {-1, 1, -2}};
>
> Eigenvectors[A[2]]
>
> {{-I, 0, 1}, {I, 0, 1}, {0, 1, 1}}
>
> A[3] = {{-2, -1, -1}, {0, -1, 0}, {1, -1, -2}};
>
> Eigenvectors[A[3]]
>
> {{I, 0, 1}, {-I, 0, 1}, {0, -1, 1}}
>
> A[4] = {{-2, -1, 1}, {0, -1, 0}, {1, -1, -2}};
>
> Eigenvectors[A[4]]
>
> {{-1, 0, 1}, {1, 0, 1}, {0, 0, 0}}
>
> The first three have common eigenvectors
>
> intersectEV[Table[A[k], {k, 3}]]
>
> {{I, 0, 1}, {-I, 0, 1}}
>
> Adding the fourth does not
>
> intersectEV[Table[A[k], {k, 4}]]
>
> {}
>
>
> Bob Hanlon
>
>
> On Tue, Oct 16, 2012 at 8:12 PM, Geoffrey Eisenbarth
> <geoffrey.eisenbarth at gmail.com> wrote:
> > Given a set of n many matrices A[k], I'd like to find any common
> eigenvectors. Using
> >
> > Intersection[Table[Eigenvalues[A[k]],{k,1,n}] doesn't seem to work. For
> instance:
> >
> > A[1] = {{-1, -3, 1}, {0, -3, 0}, {-1, -1, -1}};
> > A[2] = {{-2, -1, 1}, {0, -1, 0}, {-1, 1, -2}};
> > Intersection[Table[A[p], {p, 1, 2}]]
> >
> > gives me
> > {{{-2, -1, 1}, {0, -1, 0}, {-1, 1, -2}}, {{-1, -3, 1}, {0, -3,
> >    0}, {-1, -1, -1}}}
> >
> >
> > Any suggestions?
> >
>


  • Prev by Date: Mathematica code for Kepler's radial velocity equation?
  • Next by Date: Re: Intersection over an index
  • Previous by thread: Re: Intersection over an index
  • Next by thread: Re: Intersection over an index