Express geometric transformation as matrix