assume the matrix supplied is always invertible