transform matrxi