An old bug from ruby 1.6 is still unfixed in the ruby 1.8 preview.

irb(main):001:0> require 'matrix'
true
irb(main):002:0> Matrix[[2, 7], [3, 4]].det
-6
irb(main):003:0> require 'mathn'
true
irb(main):004:0> Matrix[[2, 7], [3, 4]].det
-13
irb(main):005:0> 

matrix.rb needs mathn to work correctly.  The problem is that the algorithm
for the determinant uses Gaussian elimination and assumes '/' has its 
mathematical meaning rather than its C-like meaning (the mathematical meaning
is provided by mathn).  I see two simple fixes.  One is to always require
mathn.rb when matrix.rb is required.  The other is to provide an alternative
algorithm for the determinant when a matrix contains Integer entries.  The
first is simpler and cleaner, but might break some code.

Regards, oinkoink
(Bret Jolly -- Jou Lii Bair)
http://www.rexx.com/~oinkoink/