Find an affine transformation that maps a certain line and circle to another certain line and circle We are given lines $p_1: y = -2$, $p_2: x = 2$ and circles $K_1: x^2 + y^2 = 1$, $K_2: (x + 2)^2 + y^2 = 4$ in $\mathbb{R}^2$. We need to find an affine transformation which maps $p_1$ to $p_2$ and $K_1$ to $K_2$. We also need to prove whether there is only one such affine transformation or more of them.
I've tried composing all kinds of rotations, reflections and dilations but none of those transformations which I tried fulfill both requirements. Any help would be much appreciated.
 A: Some comments have already looked at how to find some suitable transformations, in terms of a composition of elementary operations. I'll instead focus on the uniqueness question. For some problems you might employ specific facts to rule out additional solutions. Sometimes counting degrees of freedom can help. But in many ways starting with the fully generic case can be the most straight-forward approach.
Prep work
But before I go into that, a bit of prep work. (I'll be using the prime symbol to indicate a second set of variables, not to denote derivatives.) When do two equations
\begin{align*}ax+by&=c\\a'x+b'y&=c'\end{align*}
describe the same set of points, the same line? When are they satisfied for exactly the same set of $(x,y)$? That's the case if one equation is a multiple of the other, or possibly exactly the same. In most cases you could write that condition as
$$\frac a{a'}=\frac b{b'}=\frac c{c'}$$
which works fine as long as none of the numbers are zero. If you have a zero in one equation you need a zero in the corresponding spot of the other equation. One option is to redefine notation. In the context of this answer here, $\tfrac00$ is a valid expression and satisfies all equations, while a single zero (such as $\tfrac03$ or $\tfrac70$) satisfies no equations. Note that $\tfrac 00$ satisfying all equations breaks transitivity of the equality, so you need to check each pair of fractions for equality in that case. Showing that two things are “equal” to $\tfrac00$ doesn't mean they are equal to one another.
Formally more correct you would cross-multiply each such equation. So from
$\frac a{a'}=\frac b{b'}$ you'd get $ab'=ba'$ or equivalently $ab'-ba'=0$. And again in the presence of zeros transitivity isn't implied so you need to look at all pairs and you'd get
$$ab'-ba'=ac'-ca'=bc'-cb'=0\;.$$
Just as a cross reference: If you are into linear algebra, you might also write this as
$$\operatorname{rank}\begin{pmatrix}a&b&c\\a'&b'&c'\end{pmatrix}<2$$
but the equations are probably more useful.
Note that you probably want to disallow all the coefficients being zero. $0x+0y=0$ doesn't really describe a line. My phrasing with “a single zero satisfies no equation” dealt with this, but in the other representations that's an extra non-degeneracy constraint to keep in mind.
Generic affine transformation
A fully generic affine transformation can be described as a map $(x,y)\mapsto(x',y')$ with
\begin{align*}x'&=ax+by+c\\y'&=dx+ey+f\end{align*}
or as a vector and matrix expression
$$\begin{pmatrix}x'\\y'\end{pmatrix}=\begin{pmatrix}a&b\\d&e\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix}+\begin{pmatrix}c\\f\end{pmatrix}$$
or using homogeneous coordinates
$$\begin{pmatrix}x'\\y'\\1\end{pmatrix}=\begin{pmatrix}a&b&c\\d&e&f\\0&0&1\end{pmatrix}\begin{pmatrix}x\\y\\1\end{pmatrix}$$
but the first notation is actually quite sufficient for the task at hand. Now we need to find suitable $a,b,c,d,e,f$.
Lines
Let's plug the image point into your line $p_2$.
\begin{align*}
p_2&&1x' + 0y' &= 2 \\
&&1(ax+by+c) + 0(cx+dy+e) &= 2 \\
&&ax + by &= 2-c \\
p_1&&0x + 1y &= -2
\end{align*}
As the last equation I have put the original line. Now we want both these equations to have the same set of points. Geometrically speaking you want a point to lie on the original line $p_1$ if and only if its image lies on the image line $p_2$.
Comparing the coefficients you can find
$$\frac a0=\frac b1=\frac{2-c}{-2}$$
(with semantics for divison by zero as discussed above). From this you can read
\begin{align*}a&=0\\2+2b-c&=0\end{align*}
Circles
Now on to your circles.
\begin{align*}
K_2 && (x'+2)^2 + y'^2 &= 4 \\
&& (ax + by + c + 2)^2 + (dx + ey + f)^2 &= 4 \\
&& (a^2+d^2)x^2 + (b^2+e^2)y^2 + 2(ab+de)xy\, +\quad\\
&& +\,2(a(c+2)+df)x + 2(b(c+2)+ef)y &= 4 - (c+2)^2 - f^2 \\
K_1 && 1x^2 + 1y^2 + 0xy + 0x + 0y &= 1
\end{align*}
from which you get
$$
\frac{a^2+d^2}1 = \frac{b^2+e^2}1 = \frac{ab+de}0\,=\\
=\,\frac{2(a(c+2)+df)}0 = \frac{2(b(c+2)+ef)}0 = \frac{4 - (c+2)^2 - f^2}1
$$
using the fraction notation. Note that you actually have $\binom 62=15$ pairs of fractions here, so the above notation is actually shorthand for $15$ equations, some of which would imply the others. More on that in a moment.
Circle-preserving transformations
Let's take a quick step back and ignore the details of your specific circle $K_2$ for a slight detour. The fact that it was a circle means that the coefficient in front of $x^2$ had to be the same as for $y^2$ and also the one for $xy$ has to be zero. Which means that any circle-preserving affine transformation has to satisfy $a^2+d^2=b^2+e^2$ and $ab+de=0$. If you think of $(a,d)$ and $(b,e)$ as vectors, this means that they have equal length (Pythagoras) and are orthogonal (dot product). So either you have $b=-d$ and $e=a$ or you have $b=d$ and $e=-a$. These give you the orientation-preserving and orientation-reversing similarity transformations, respectively. If you had known this up front, you might have discussed these two cases and avoided two of the variables in the process.
Solving the equations
Looking again at your specific situation, the equations from the fractions could be simplified to
$$
a^2+d^2 = b^2+e^2 = 4 - (c+2)^2 - f^2 \neq 0 \\
ab+de = a(c+2)+df = b(c+2)+ef = 0
$$
If you apply the $a=0$ which you got from the line, then you get $e=0$ from the reasoning above about circle-preserving transformations and this simplifies to
$$
d^2 = b^2 = 4 - (c+2)^2 - f^2 \neq 0 \\
df = b(c+2) = 0
$$
If $df=0$ then either $d$ or $f$ has to be zero. But $d^2\neq0$ imlies $d\neq0$ so we get $f=0$. Similarly since $b\neq0$ you have $c+2=0$ i.e. $c=-2$. Which makes the first line $d^2=b^2=4$. The $2+2b-c=0$ from the equations of the line now simplifies to $b=-2$. So at this point we have
$$\begin{pmatrix}a&b&c\\d&e&f\\0&0&1\end{pmatrix}=
\begin{pmatrix}0&-2&-2\\\pm2&0&0\\0&0&1\end{pmatrix}$$
and I'd recommend you try both the $d=+2$ and $d=-2$ case to check whether both of these indeed satisfy all the conditions.
Of course each of these transformations could be decomposed into various sequences of elementary operations. That doesn't change the fact that it's still the same combined transformation in the end. So the sign for $d$ is the only way to get a truly different transformation here.
