What a Shear Changes
A shear changes one coordinate of each point in proportion to the other coordinate, while leaving that other coordinate fixed. In a horizontal shear, the height stays the same and the horizontal displacement depends on height. In a vertical shear, the horizontal position stays the same and the vertical displacement depends on horizontal position. The parameter \(k\in\mathbb{R}\) controls the amount and direction of the shear: \(k=0\) makes no change, while changing the sign of \(k\) reverses the direction of the displacement.
Let \(\mathbf{x}=\begin{bmatrix}x\\y\end{bmatrix}\in\mathbb{R}^2\). A horizontal shear with parameter \(k\) sends \((x,y)\) to \((x+ky,y)\); a vertical shear with parameter \(k\) sends \((x,y)\) to \((x,y+kx)\). The coordinate descriptions specify the effect on every point. To find the standard matrices, it is enough to determine what each transformation does to the standard basis vectors \(\mathbf{e}_1=\begin{bmatrix}1\\0\end{bmatrix}\) and \(\mathbf{e}_2=\begin{bmatrix}0\\1\end{bmatrix}\).
Building the Standard Matrices
For a horizontal shear, \(\mathbf{e}_1\) has height zero, so it does not move. The vector \(\mathbf{e}_2\) has height one, so it moves horizontally by \(k\). For a vertical shear, \(\mathbf{e}_1\) moves vertically by \(k\), while \(\mathbf{e}_2\) does not move. The columns of a standard matrix are the images of \(\mathbf{e}_1\) and \(\mathbf{e}_2\), in that order.
These matrices produce the coordinate formulas directly: multiplying \(\mathbf{H}_k\) by \(\begin{bmatrix}x\\y\end{bmatrix}\) gives \(\begin{bmatrix}x+ky\\y\end{bmatrix}\), while multiplying \(\mathbf{V}_k\) by that vector gives \(\begin{bmatrix}x\\kx+y\end{bmatrix}\). The distinction between the two matrices is not merely a matter of naming: the entry \(k\) is in the first row for a horizontal shear and in the second row for a vertical shear.
Proof. By the definition of the maps, \(H_k(\mathbf{e}_1)=\begin{bmatrix}1\\0\end{bmatrix}\) and \(H_k(\mathbf{e}_2)=\begin{bmatrix}k\\1\end{bmatrix}\). Since \(\mathbf{e}_1,\mathbf{e}_2\) are the standard basis, every \(\mathbf{x}=\begin{bmatrix}x\\y\end{bmatrix}\) can be written as \(x\mathbf{e}_1+y\mathbf{e}_2\). The coordinate formula gives \(H_k(\mathbf{x})=\begin{bmatrix}x+ky\\y\end{bmatrix}=xH_k(\mathbf{e}_1)+yH_k(\mathbf{e}_2)=\begin{bmatrix}1&k\\0&1\end{bmatrix}\mathbf{x}\). For \(V_k\), its basis-vector images are \(V_k(\mathbf{e}_1)=\begin{bmatrix}1\\k\end{bmatrix}\) and \(V_k(\mathbf{e}_2)=\begin{bmatrix}0\\1\end{bmatrix}\). Thus \(V_k(\mathbf{x})=\begin{bmatrix}x\\kx+y\end{bmatrix}=xV_k(\mathbf{e}_1)+yV_k(\mathbf{e}_2)=\begin{bmatrix}1&0\\k&1\end{bmatrix}\mathbf{x}\). These equations establish the stated standard matrices. \(\square\)
Computing Images of Vectors
Once the matrix is built, applying a shear is a matrix-vector multiplication. The coordinate formula is a useful independent check: for a horizontal shear, add \(ky\) to the original \(x\)-coordinate and keep \(y\); for a vertical shear, keep \(x\) and add \(kx\) to \(y\).
Worked Example: A Horizontal Shear
Apply the horizontal shear with parameter \(k=2\) to \(\mathbf{x}=\begin{bmatrix}3\\-1\end{bmatrix}\).
The matrix is \(\mathbf{H}_2=\begin{bmatrix}1&2\\0&1\end{bmatrix}\). Multiplying gives
Check: the original height is \(-1\), so the horizontal displacement is \(2(-1)=-2\). The new horizontal coordinate is \(3-2=1\), and the height remains \(-1\), agreeing with the matrix product.
Worked Example: A Vertical Shear
Apply the vertical shear with parameter \(k=-3\) to \(\mathbf{x}=\begin{bmatrix}-2\\4\end{bmatrix}\).
Here \(\mathbf{V}_{-3}=\begin{bmatrix}1&0\\-3&1\end{bmatrix}\), so
Check: the horizontal coordinate remains \(-2\). The vertical displacement is \(k x=(-3)(-2)=6\), so the new vertical coordinate is \(4+6=10\), as computed.
Images of Lines Through the Origin
A line through the origin is described by a nonzero direction vector \(\mathbf{u}=\begin{bmatrix}a\\b\end{bmatrix}\): it consists of all vectors \(t\mathbf{u}\) as \(t\) ranges over \(\mathbb{R}\). The image of a set under a map means the set of all outputs obtained from its elements. Because a shear is linear, a line's image can be found by applying the shear to its direction vector. The resulting direction vector cannot be zero: a horizontal shear sends \((a,b)\) to \((a+kb,b)\), which can be zero only if \(b=0\) and \(a=0\); a vertical shear sends \((a,b)\) to \((a,b+ka)\), which can be zero only if \(a=0\) and \(b=0\). Both would contradict that \(\mathbf{u}\ne\mathbf{0}\).
Proof. Every vector in \(L\) has the form \(t\mathbf{u}\). For the horizontal shear, direct substitution gives \(H_k(t\mathbf{u})=H_k(ta,tb)=(ta+ktb,tb)=t(a+kb,b)\). As \(t\) ranges over \(\mathbb{R}\), these outputs are exactly the vectors listed for \(H_k(L)\). The vector \((a+kb,b)\) is nonzero: if it were zero, then \(b=0\) and \(a+kb=a=0\), contradicting \(\mathbf{u}\ne\mathbf{0}\). Its scalar multiples therefore form a line through the origin. For the vertical shear, \(V_k(t\mathbf{u})=V_k(ta,tb)=(ta,tb+kta)=t(a,b+ka)\). These outputs are exactly the vectors listed for \(V_k(L)\). If \((a,b+ka)=(0,0)\), then \(a=0\), which makes \(b+ka=b=0\), again contradicting \(\mathbf{u}\ne\mathbf{0}\). Its scalar multiples also form a line through the origin. \(\square\)
For a nonvertical line written as \(y=mx\), a direction vector is \(\begin{bmatrix}1\\m\end{bmatrix}\). Under \(H_k\), that direction becomes \(\begin{bmatrix}1+km\\m\end{bmatrix}\). If \(1+km\ne0\), the image line has slope \(m/(1+km)\). If \(1+km=0\), the first coordinate of the direction is zero and its second coordinate is nonzero, so the image is the vertical line \(x=0\). Under \(V_k\), the direction becomes \(\begin{bmatrix}1\\m+k\end{bmatrix}\), so the image has slope \(m+k\). A vertical line has direction \(\begin{bmatrix}0\\1\end{bmatrix}\): a horizontal shear sends it to direction \(\begin{bmatrix}k\\1\end{bmatrix}\), while a vertical shear leaves that direction unchanged.
Worked Example: Shearing a Line Through the Origin
Find the image under the horizontal shear with parameter \(k=2\) of the line \(y=3x\), and verify the result using a point on the line.
A direction vector for \(y=3x\) is \(\mathbf{u}=\begin{bmatrix}1\\3\end{bmatrix}\). Apply the shear matrix to that direction:
Therefore the image line has direction \(\begin{bmatrix}7\\3\end{bmatrix}\), so its slope is \(3/7\) and its equation is \(y=\tfrac{3}{7}x\). The same slope follows from the formula \(m/(1+km)=3/(1+2\cdot3)=3/7\).
Check: the point \(\begin{bmatrix}1\\3\end{bmatrix}\) lies on the original line. Its image is \(\begin{bmatrix}7\\3\end{bmatrix}\), which satisfies \(y=\tfrac{3}{7}x\), since \(3=\tfrac{3}{7}\cdot7\). More generally, an original point \(\begin{bmatrix}t\\3t\end{bmatrix}\) maps to \(\begin{bmatrix}7t\\3t\end{bmatrix}\), which satisfies the same image-line equation for every \(t\in\mathbb{R}\).
Common Pitfall: Putting the Shear in the Wrong Row
A frequent error is to use the vertical-shear matrix for a horizontal shear, or vice versa. For example, if \(k=2\), the incorrect matrix \(\begin{bmatrix}1&0\\2&1\end{bmatrix}\) is sometimes used for a horizontal shear. Applied to \(\mathbf{e}_2\), it gives \(\begin{bmatrix}0\\1\end{bmatrix}\), so it leaves \(\mathbf{e}_2\) fixed; that is not the required horizontal effect, which moves \(\mathbf{e}_2\) to \(\begin{bmatrix}2\\1\end{bmatrix}\).
The correction is to build the columns from the basis-vector images in order. For a horizontal shear with \(k=2\), \(H_2(\mathbf{e}_1)=\begin{bmatrix}1\\0\end{bmatrix}\) and \(H_2(\mathbf{e}_2)=\begin{bmatrix}2\\1\end{bmatrix}\), so the correct matrix is \(\mathbf{H}_2=\begin{bmatrix}1&2\\0&1\end{bmatrix}\). Its columns give the required images, and its product with \(\begin{bmatrix}x\\y\end{bmatrix}\) is \(\begin{bmatrix}x+2y\\y\end{bmatrix}\). The quickest check is to test both standard basis vectors before using a proposed matrix.
Similarly, for \(V_2\), the images are \(V_2(\mathbf{e}_1)=\begin{bmatrix}1\\2\end{bmatrix}\) and \(V_2(\mathbf{e}_2)=\begin{bmatrix}0\\1\end{bmatrix}\), giving \(\mathbf{V}_2=\begin{bmatrix}1&0\\2&1\end{bmatrix}\). Keeping the coordinate effect, basis-vector images, and matrix columns aligned prevents this row-placement error.
Check Your Understanding
For each question, use the coordinate effect or the standard matrix, and check your calculations against the defining formulas.
- Write the standard matrix for a horizontal shear with parameter \(k=-2\), and state the images of \(\mathbf{e}_1\) and \(\mathbf{e}_2\).
- Find the image of \(\begin{bmatrix}2\\-3\end{bmatrix}\) under the vertical shear with parameter \(k=4\).
- Under the horizontal shear with parameter \(k=1\), what is the image line of \(y=2x\)?
- Under the horizontal shear with parameter \(k=-1\), what is the image of the line \(y=x\)?
- Explain why the image of a line through the origin under a vertical shear is still a line through the origin.