A transformation can be described arithmetically with matrices. Any transformation can be represented by a matrix. To apply the transformation, one needs simply to multiply or add (whatever the case may be) the transformation matrix by/to the preimage matrix. The result will be the matrix for the image. Example:
[[-1 0] * [[4 7 4 3]= [[-4 -7 -4 -3] [ 0 1]] [5 3 2 1]] [ 5 3 2 1]]The first matrix is the transformation matrix. The second is the preimage matrix. In the preimage and image matrices the top row are x's and the bottom are y's.