Consider a number: $n_1n_2n_3n_4n_5n_6n_7$. Letting $X$ be the point $(n_1, − n_7)$, $Y$ the point $(−n_2, n_6)$ and $Z$ the point $(n_3, n_4 − n_5)$. If these three points are collinear, replace $Z$ with $(1 + n_3, n_4 − n_5)$.
Find an affine transformation that maps the origin to $X$, the point (1, 0) to $Y$ and (0, 1) to $Z$.
Is the map direct or indirect? Is it an isometry? If so, why?
You have an affine map, which you can formulate easily using homogeneous coordinates:
$$\begin{pmatrix}x'\\y'\\1\end{pmatrix}= \begin{pmatrix}a&b&c\\d&e&f\\0&0&1\end{pmatrix}\cdot \begin{pmatrix}x\\y\\1\end{pmatrix}$$
Or in equations: $x'=ax+by+c$ and $y'=dx+ey+f$. Now given three points and their images, you have six pairs of coordinates, leading to six equations for the six unknowns. But you probably better stick to $3\times3$ matrix notation.
$$\begin{pmatrix}n_1&-n_2&n_3\\-n_7&n_6&n_4-n_5\\1&1&1\end{pmatrix}= \begin{pmatrix}a&b&c\\d&e&f\\0&0&1\end{pmatrix}\cdot \begin{pmatrix}0&1&0\\0&0&1\\1&1&1\end{pmatrix}$$
You can take the inverse of the matrix on the right to obtain
$$ \begin{pmatrix}a&b&c\\d&e&f\\0&0&1\end{pmatrix}= \begin{pmatrix}n_1&-n_2&n_3\\-n_7&n_6&n_4-n_5\\1&1&1\end{pmatrix}\cdot \begin{pmatrix}-1&-1&1\\1&0&0\\0&1&0\end{pmatrix}= \begin{pmatrix}-n_1-n_2&-n_1+n_3&n_1\\n_6+n_7&n_4-n_5+n_7&-n_7 \\0&0&1\end{pmatrix} $$
Does this map preserve orientation? Compute its determinant, check the sign. Identity matrix has determinant 1 and preserves orientation. So positive sign is orientation-preserving, negative sign is orientation-reversing.
Is this map an isometry? If so, $a=e$ and $b=-d$ and $a^2+b^2=1$ for orientation-preserving case. $a=-e$ and $b=d$ for reversing. Think about them as $\sin$ and $\cos$ in a rotation (or reflection) matrix.
Do all of this for the alternate position of $Z$ as well. The points are collinear if the determinant of the matrix is zero.