See #18: Calculate the inverse of a matrix. Also, fix a bug on adjoint.