This article is part 3 in the series about transformation matrices:

2D Shearing

In 2D, we can skew points towards the x-axis by making x=x+sy. If s>0, then points will skew towards the positive x-axis; if s<0, points will move towards the negative x-axis.

The transformation matrix that skews points towards the x-axis is:

(1)Hx(s)=[1s01]

Towards the y-axis is:

(2)Hy(s)=[10s1]

For example, a vector v multiplied by (1) results in:

v=Hx(s)v=[1s01][vxvy]=[vx+svyvy]

3D Shearing

The notation Hxy indicates that the x and y coordinates are shifted by the other coordinate, z, i.e.:

x=x+szy=y+tzz=z

The shearing matrices in 3D are:

(3)Hxy(s,t)=[10s01t001]
(4)Hxz(s,t)=[1s00100t1]
(5)Hyz(s,t)=[100s10t01]

For example, a vector v multiplied by (3) results in:

v=Hxy(s,t)v=[10s01t001][vxvyvz]=[vx+svzvy+tvzvz]