Re: Intersection over an index

*To*: mathgroup at smc.vnet.net*Subject*: [mg128414] Re: Intersection over an index*From*: Daniel <dosadchy at its.jnj.com>*Date*: Thu, 18 Oct 2012 02:34:06 -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

In this case you forgot to apply EigenVectors, but the problem of deciding whether two eigenvectors are the same is a bit more complex, because: 1. Mathematica does not normalize the eigenvectors. 2. If you normalize them, they can still differ in sign, and also due to numerical errors (for inexact numbers). 3. If not all eigenvalues are distinct, the eigenvectors that correspond to the same eigenvalues are "mixed" - in this case you might want to check whether eigenvector from one matrix can be represented as a linear combination of eigenvectors with the same eigenvalue from the second matrix. Assuming all eigenvalues are distinct, you could compare eigenvectors v1 and v2 like this: (1-Abs[Normalize[v1].Normalize[v2]]) < epsilon epsilon - some small number > 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? >