## Stumped by Mathematica – anyone?

I need to determine if a large set of matrices are linearly independent, i.e. linearly independent from each other (not linearly independent in their individual rows and columns). Anyone have any ideas on how to efficiently do this in Mathematica?

Advertisements

January 26, 2010 at 7:05 pm

My guess: set up the equation a1 * m1 + … = 0 and tell it to solve for the ai. If that doesn’t work, linearize the matrices into vectors first, then try again.

January 26, 2010 at 7:40 pm

Thanks. I know this sounds ridiculous, but I haven’t figured out how to tell it to do either, i.e. how does one tell it to solve for the ai? Regarding linearization, do you have to do it manually? I’m terrible at “guessing” what collection of words will work best in search and so I have struck out on these questions in the Documentation Center.

January 27, 2010 at 4:07 pm

M = { M_1, M_2, …); (* List of N x N matrices *)

V = Map[ Flatten, M]; (* List of vectors whose entries are those of the matrices *)

linearIndependenceQ = Not[ RowReduce[V][[-1]] == Table[0, {N}]]; (* Row reduces list of vectors; if they are linearly dependent, the bottom row will be all zeroes *)

January 27, 2010 at 8:54 pm

Anon: Thanks! That’s quite helpful!