To work with rows rather than columns, transpose the matrix, and then: Method 0: the columns are linearly independent if the matrix is invertible.
lii=: 1:@%. ::0: Method 1: the columns are linearly independent if the determinant is non-zero: lid=: 0: ~: [: -/ .* (|: +/ .* ])^:(>/@$) Moreover, use rational numbers depending on how confident you are about the precision of the values. e.g. lid % >: +/~ i.30 NB. ye olde Hilbert matrix 0 lid % >: +/~ i.30x 1 ----- Original Message ----- From: Raul Miller <[EMAIL PROTECTED]> Date: Friday, September 7, 2007 6:50 Subject: [Jgeneral] linear independence? To: General forum <[email protected]> > What's a good way to determine whether the rows of a > matrix are linearly independent? > > I was thinking that %:@%:^:_ would provide meaningful > information, but: > > %:@%:^:_ p:i.3 3 > 1 1 1 > 1 1 1 > 1 1 1 > > I do not believe that the rows of p:i.3 3 linearly > dependent on each other. Am I wrong? If so, > how can this be demonstrated? ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
