Adds a Matrix class.