First commit, some "matrix" utility functions