In CG you rarely need to compute the inverse of an arbitrary 4x4 matrix. It is more likely that your 4x4 matrix was constructed by concatenating a number of transformation matrices alá M = Rx(a) *...