Implement matrices in ruby.