Determine the matrix for shearing along a given line.

linear algebramatrices

Determine the matrix for shearing along the line $y=x$ in the xy-plane, with $k$ as proportional constant.

My attempt:

Shearing along a line, as I understand it, is where all points on the line is imaged on them selfs, all other points remain their perpendicular distance d from the line, but are shifted $k\cdot d$ parallel to the line. k is a constant and $k\cdot d$ is negative on one side and positive on the other side of the line.

I determined $A_1$ for shearin along the x-axis: $$A_1\hat{e_x}=\hat{e_x}$$$$A_1\hat{e_y}=k\hat{e_x}+\hat{e_y}$$
$$\Rightarrow A_1=\begin{pmatrix}1&k\\0&1\end{pmatrix}$$

Then determined $A_2$for rotating to $y=x$:

$$A_2\hat{e_x}=\frac{1}{\sqrt{2}}(\hat{e_x}+\hat{e_y})$$$$A_2\hat{e_y}=\frac{1}{\sqrt{2}}(-\hat{e_x}+\hat{e_y})$$
$$\Rightarrow A_2=\frac{1}{\sqrt{2}}\begin{pmatrix}1&-1\\1&1\end{pmatrix}$$

Thus shearing along y=x should be $A_2A_1\vec{x}=\vec{y}$
$$A=A_2A_1=\frac{1}{\sqrt{2}}\begin{pmatrix}1&k-1\\1&k+1\end{pmatrix}$$

This is not the answer in the book: $$A=\begin{pmatrix}1-k/2&k/2\\-k/2&1+k/2\end{pmatrix}$$

Where have I gone wrong?

Best Answer

Note that a transformation $T$ in a different basis is applied as $BTB^{-1}$ where $B$ is change of basis matrix. Here $T=A_1$, $B^{-1}=A_2$, $B=A_2^T$. Required transformation is $A_2^TA_1A_2$. First we go to rotated basis, apply shear transformation and then come back to original basis (to original coordinate system $x-y$).

Also $A_2$ is a rotation matrix. It should be normalized as $$A_2=\frac{1}{\sqrt{2}}\begin{pmatrix}1&-1\\1&1\end{pmatrix}$$

Related Question