Issue #2582 has been updated by Yuki Sonoda. Status changed from Open to Rejected It is because 1/2 == 0 -- in Ruby 1.8. You need to require 'mathn' to get a correct determinant for a matrix over integer. Or you can give the matrix as a matrix over float: Matrix[[2.0, 0.0, 1.0], [0.0, -2.0, 2.0], [1.0, 2.0, 3.0]].det #=> -18.0, or you can use Ruby 1.9: % ruby -rmatrix -ve 'p Matrix[[2, 0, 1], [0, -2, 2], [1, 2, 3]].det' ruby 1.9.1p375 (2009-12-05 revision 26021) [i386-darwin9.8.0] (-18/1) ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2582 ---------------------------------------- http://redmine.ruby-lang.org