What are Affine Transformations? What are Affine Tranformations? Do they apply just to points or to other shapes as well? What does it mean that they can be "composed"?
An Affine Transform is a Linear Transform + a Translation Vector.

$$
\begin{bmatrix}x'&amp; y'\end{bmatrix}
=
\begin{bmatrix}x&amp; y\end{bmatrix}
\cdot
\begin{bmatrix}a&amp; b \\ c&amp;d\end{bmatrix}
+
\begin{bmatrix}e&amp; f\end{bmatrix}
$$

It can be applied to individual points or to lines or even Bezier curves. For lines, it preserves the property that parallel lines remain parallel. For Bezier curves, it preserves the convex-hull property of the control points.

Multiplied-out, it produces 2 equations for yielding a "transformed" coordinate pair $(x', y')$ from the original pair $(x, y)$ and a list of constants $(a, b, c, d, e, f)$.
$$
    x' =  a\cdot x + c\cdot y + e \\
    y' =  b\cdot x + d\cdot y + f
$$

Conveniently, the Linear transform and the Translation vector can be put together into a 3D matrix which can operate over 2D homogeneous coordinates.

$$
\begin{bmatrix}x'&amp; y'&amp;1\end{bmatrix}
=
\begin{bmatrix}x&amp; y&amp;1\end{bmatrix}
\cdot
\begin{bmatrix}a&amp; b &amp;0\\ c&amp;d&amp;0 \\ e&amp;f&amp;1\end{bmatrix}
$$

Which yields the same 2 equations above.

Very conveniently, the matrices themselves can be multiplied together to produce a third matrix (of constants) which performs the same transformation as the original 2 would perform in sequence. Put simply, the matrix multiplications are associative.

$$
\begin{matrix}
\begin{bmatrix}x''&amp; y''&amp;1\end{bmatrix}
&amp; = &amp;
\left(
\begin{bmatrix}x&amp; y&amp;1\end{bmatrix}
\cdot
\begin{bmatrix}a&amp; b &amp;0\\ c&amp;d&amp;0 \\ e&amp;f&amp;1\end{bmatrix}\right)
\cdot
\begin{bmatrix}g&amp; h &amp;0\\ i&amp;j&amp;0 \\ k&amp;m&amp;1\end{bmatrix}
\\
&amp; = &amp;
\begin{bmatrix}a \cdot x + c \cdot y+e &amp; b \cdot x + d \cdot y+f &amp;1 \end{bmatrix}
\cdot
\begin{bmatrix}g&amp; h &amp;0\\ i&amp;j&amp;0 \\ k&amp;m&amp;1\end{bmatrix}
\\
&amp;=&amp;
\begin{bmatrix}g(a \cdot x + c \cdot y+e) + i( b \cdot x + d \cdot y+f) + k 
\\
h(a \cdot x + c \cdot y+e) + j( b \cdot x + d \cdot y+f) + m
\\1 \end{bmatrix}^T
\\
&amp;=&amp;
\begin{bmatrix}x&amp; y&amp;1\end{bmatrix} \cdot
\left(
\begin{bmatrix}a&amp; b &amp;0\\ c&amp;d&amp;0 \\ e&amp;f&amp;1\end{bmatrix}
\cdot
\begin{bmatrix}g&amp; h &amp;0\\ i&amp;j&amp;0 \\ k&amp;m&amp;1\end{bmatrix}
\right)
\\
&amp;=&amp;
\begin{bmatrix}x&amp; y&amp;1\end{bmatrix} \cdot
\begin{bmatrix}ag+bi&amp; ah+bj &amp;0\\ cg+di&amp;ch+dj&amp;0 \\ eg+fi+k&amp;eh+fj+m&amp;1\end{bmatrix}
\end{matrix}
$$

Alternatively you can consider a few basic transform types and compose any more complex transform by combining these (multiplying them together).

Identity transform



$$\begin{bmatrix}
    1 &amp; 0 &amp; 0 \\
    0 &amp; 1 &amp; 0 \\
    0 &amp; 0 &amp; 1
\end{bmatrix}$$

Scaling



$$\begin{bmatrix}
    S_x &amp; 0 &amp; 0 \\
    0  &amp; S_y &amp; 0 \\
    0 &amp; 0 &amp; 1 \\
\end{bmatrix}$$

*Note: a reflection can be performed with scaling parameters $(S_x, S_y) = (-1,1)$ or $(1,-1)$.

Translation



$$\begin{bmatrix}
    1 &amp; 0 &amp; 0 \\
    0 &amp; 1 &amp; 0 \\
    T_x &amp; T_y &amp; 1
\end{bmatrix}$$

Skew x by y



$$\begin{bmatrix}
    1  &amp; Q_x &amp; 0 \\
    0 &amp; 1 &amp; 0 \\
    0 &amp; 0 &amp; 1
\end{bmatrix}$$

Skew y by x



$$\begin{bmatrix}
    1  &amp; 0 &amp; 0 \\
    Q_y &amp; 1 &amp; 0 \\
    0 &amp; 0 &amp; 1
\end{bmatrix}$$

Rotation



$$\begin{bmatrix}
    \cos\theta &amp; -sin\theta &amp; 0\\
    \sin\theta &amp; \cos\theta &amp; 0\\
    0  &amp;  0 &amp;  1
\end{bmatrix}
$$

[Note I've shown the form of Matrix here which accepts a row vector on the left. The transpose of these matrices will work with a column vector on the right.]

A matrix composed purely from scaling, rotation, and translation can be decomposed back into these three components.