solve a matrix rather than a matrix object