The code base for these matrix classes are provided by Brown University through the Coursera open course Programming the Matrix.
small linear algebra library based on Coursera course Programming the Matrix