refactor Derivative/Determinant and Transformation/Invert to use stratgey pattern