Re: Re: Determining Linear dependent vectors
- To: mathgroup at smc.vnet.net
- Subject: [mg66282] Re: [mg66272] Re: [mg66248] Determining Linear dependent vectors
- From: pratikd at wolfram.com
- Date: Sat, 6 May 2006 23:50:52 -0400 (EDT)
- References: <200605060555.BAA22190@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
> Here is a set of vectors in the rows. > > vectors = {{1, 0, 3, 2, 0}, {0, 1, 2, 0, 3}, {1, 1, 5, 2, 3}, {2, -1, 4, > 4, -3}, {1, 2, 7, 2, 6}}; > > Here is the null space of the transpose of vectors. > > nmat = NullSpace[Transpose@vectors] > {{-1, -2, 0, 0, 1}, {-2, 1, 0, 1, 0}, {-1, -1, 1, 0, 0}} > > Multiplying the null space vectors times vectors gives all zeros. > > nmat.vectors > {{0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}} > > We have three dependent vectors and we can solve for them in terms of the > first two independent vectors. Label the vectors {v1,v2,v3,v4,v5}. Then > > Thread[nmat.{v1, v2, v3, v4, v5} == {0, 0, 0}] > Solve[%, {v3, v4, v5}] > {-v1 - 2 v2 + v5 == 0, -2 v1 + v2 + v4 == 0, -v1 - v2 + v3 == 0} > {{v5 -> v1 + 2 v2, v4 -> 2 v1 - v2, v3 -> v1 + v2}} > > David Park > djmp at earthlink.net > http://home.earthlink.net/~djmp/ > > > > From: Saurabh [mailto:saurabh911 at gmail.com] To: mathgroup at smc.vnet.net > To: mathgroup at smc.vnet.net > > > Am looking for methods to determine linearly dependent vectors out of a > given set. Any pointers appreciated. > > Thanks, > > Hello Sauabh One another possible approach is to look at the Mac number see below. I have seen this before on the group before so this is not completely original, can't seem to find the link on archives, I am using Mac in my query so that should explain it :). Basically the mac number will tell you on a scale of 0 to 1 how dependent your vectors are, 1 being strong dependence and vice versa. Here is my attempt anyway, In[46]:= Clear[mac,vec2,vec1] mac[vec1_,vec2_]=Dot[vec1,vec2]^2/(Dot[vec1,vec1] Dot[vec2,vec2]); mac[{1,2,4},{2,4,8}]//N Out[48]= 1. Hope this helps Pratik Wolfram Research,Inc Tech Support
- References:
- Re: Determining Linear dependent vectors
- From: "David Park" <djmp@earthlink.net>
- Re: Determining Linear dependent vectors