Raul Miller wrote:
> What's a good way to determine whether the rows of a
> matrix are linearly independent?
>
This is a tricky problem in general, since it depends on values being
exactly zero.  The preferred numerical method is singular value
decomposition (which can be done in LAPACK).

For simple cases, you can reduce the matrix to row reduced echelon
form and see if the last row is nonzero.

Reduced row echelon form is given by gauss_jordan in linear.ijs, so you
can say something like

require '~system/packages/math/linear.ijs'
lindep=:*./@ (0={:) @ gauss_jordan
linind=:-.@ lindep

   linind i. 3 3
0
   linind i. 2 4
1


Best wishes,

John



----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to