The methods I suggested work for square and non-square (tall, not wide) matrices.
lii=: 1:@%. ::0: lii p: i.5 3 1 lii p: i.3 5 0 lii i.5 3 0 lii i.3 5 0 I agree that SVP is the way to go if numerical stability is a concern. ----- Original Message ----- From: John Randall <[EMAIL PROTECTED]> Date: Friday, September 7, 2007 9:05 Subject: Re: [Jgeneral] linear independence? To: General forum <[email protected]> > Roger Hui wrote: > > 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: ~: [: -/ .* (|: +/ .* ])^:(>/@$) > > I agree that this is the best way to go with square > matrices. The rref > method I suggested (which mimics pencil and paper methods) is a > good start > for nonsquare matrices. It can probably done better than > my suggested > code. > > However, the question of finding the rank of a matrix is difficult > numerically. The method usually suggested is singular value > decomposition, but there has been a lot of work on methods for special > matrices. See, for example > > <http://www.neiu.edu/~zzeng/Papers/rankrev.pdf> ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
