NMatrix is Sciruby's numerical matrix core that supports dense and sparse matrices on JRuby using Apache Commons Math. It allows creation and printing of matrices in Ruby and chaining of Java methods for optimization. Benchmarks show significant speed improvements when performing operations like copying a large matrix from one array to another compared to MRI Ruby. Memory management is improved through techniques like avoiding overcopying and type guessing. Mixed models for statistical analysis have also been ported to work with JRuby. Basic linear algebra operations like matrix multiplication, addition and subtraction are demonstrated.