Shears using Matrix Methods Determine the equation of the image of the graph:
$$y=(x-1)^3 -2$$
after a shear of factor $1$ away from the $y$-axis, relative to the line $y=1$.

You can parameterize the graph $y=(x-1)^3-2$ with the variable $t$ like so:
$$
\left(\begin{array}{c}
t\\
(t-1)^3-2
\end{array}\right)
$$
You can then transform this vector by translating it downwards one unit, performing the shear, then translating it back up. Because this involves doing a translation, we add an extra $1$ on the end of the previous vector so that it is $3$-dimensional, and perform a shear transformation in the three dimensions.
$$
\left [ \begin{array}{a}
1&0&0\\
0&1&0
\end{array} \right ]
\left [ \begin{array}{a}
1&0&0\\
0&1&1\\
0&0&1
\end{array} \right ]
\left [ \begin{array}{a}
1&1&0\\
0&1&0\\
0&0&1
\end{array} \right ]
\left [ \begin{array}{a}
1&0&0\\
0&1&-1\\
0&0&1
\end{array} \right ]
\left[\begin{array}{c}
t&\\
(t-1)^3-2\\
1
\end{array}\right]
$$
$$=\left[\begin{array}{c}
(t-1)^3+t-3\\
(t-1)^3-2
\end{array}\right]$$
You now have a parametric equation for the resulting line in terms of a variable $t$ over the domain $\mathbb{R}$.
$$\left[\begin{array}{c}
x(t)\\
y(t)
\end{array}\right]=\left[\begin{array}{c}
(t-1)^3+t-3\\
(t-1)^3-2
\end{array}\right]$$

Note that in general the method above works, in this particular circumstance, you could probably skip doing the three linear transformations by observing that a shear of factor $1$ about $y=1$ is the same as doing a shear about $y=0$ and subtracting $1$ from $x$ afterwards.
Thus:
$$
\left [ \begin{array}{a}
1&0&0\\
0&1&0
\end{array} \right ]
\left [ \begin{array}{a}
1&1&-1\\
0&1&0\\
0&0&1
\end{array} \right ]
\left[\begin{array}{c}
t&\\
(t-1)^3-2\\
1
\end{array}\right]
$$
Gives you the same result. Since we're only dealing with one transformation now and we're ignoring the third component of the solution anyway, we can just do:
$$
\left [ \begin{array}{a}
1&1&-1\\
0&1&0
\end{array} \right ]
\left[\begin{array}{c}
t&\\
(t-1)^3-2\\
1
\end{array}\right]
$$
Suppose we have some arbitrary function $y(x)$ sheared by a factor $k$ about the line $y=c$. Then we would do:
$$
\left [ \begin{array}{a}
1&k&-kc\\
0&1&0
\end{array} \right ]
\left[\begin{array}{c}
t\\
y(t)\\
1
\end{array}\right]
$$
We'd then have a parametric equation for the resulting $\left(\begin{smallmatrix}x\\y\end{smallmatrix}\right)$ graph in terms of $t$.

In short, if you want to compose a translation with your linear transformations, invoke an extra dimension and use that. In this case, you may be able to tell immediately that this final matrix is the only transformation necessary. Pretend you're doing a normal shear, but compensate for the fact that it's actually off-axis by subtracting the appropriate amount from $x$.
