Matrix Transformations

Scaling


The graph below shows four vectors which are all being multiplied by the matrix on the left. Drag the slider to change the scaling factor and note the changes to the matrix and the vectors. Selecting the "Apply to image" option will cause this matrix transformation to be applied to an image.



1.00 0.00
0.00 1.00

This matrix multiplied by each vector would give:






Translation


The graph below shows four vectors which are all having the values in the left hand matrix added to them. Drag the horizontal slider to change the X translation and the vertical slider to change the Y translation, observing the changes to the matrix and the vectors. Selecting the "Apply to image" option will cause this matrix transformation to be applied to an image.



0.00
0.00

This matrix added to each vector would give:






Rotation


The graph below shows four vectors which are being rotated by the matrix on the left. Drag the black and white point to change the angle of rotation, observing the changes to the matrix and the vectors. Selecting the "Apply to image" option will cause this matrix transformation to be applied to an image.



cos(0.00) -sin(0.00)
sin(0.00) cos(0.00)
=
0.00 0.00
0.00 0.00

This matrix multiplied by each vector would give:






Shearing


The graph below shows four vectors which are all being multiplied by the matrix on the left. Drag the slider to change the shearing factor and note the changes to the matrix and the vectors. Selecting the "Apply to image" option will cause this matrix transformation to be applied to an image.



1.00 0.00
0.00 1.00

This matrix multiplied by each vector would give: