How to find 2x2 transformation matrix