Inverse matrix for linear equations