Geometric transformations with matrix multiplication