How is the similarity of two shapes formally defined? Suppose we have an open shape $S$ of a n dimensional euclidean space with the usual topology, and another one $S'$ which is just a translated, rotated or scaled version of $S$. Clearly these two shapes are "similar", but I couldn't find any definition of this type of relation. With triangles, the equivalent formulation would be triangle congruence similarity, but I couldn't find anything about arbitrary shapes.Thanks.
 A: Since you're dealing with $\mathbb{R}^n$ with its usual topology, the answer is easy. Firstly, the usual topology on $\mathbb{R}^n$ comes from the Euclidean metric on $\mathbb{R}^n$ given by $d(\vec{x},\vec{y})=\sqrt{(x_1-y_1)^2+\cdots+(x_n-y_n)^2}{}$. Equivalently, it is induced by the dot product $\langle \vec{x},\vec{y} \rangle=x_1y_1 + \cdots + x_ny_n$. Now that you have a dot product, you can talk about orthogonal transformations: the transformations that preserve the dot product. Keep this in mind and continue reading.
Secondly, shapes in $\mathbb{R}^n$ are in fact subsets of $\mathbb{R}^n$. Now consider all $(n+1)\times (n+1)$ matrices as follows:
$$\begin{bmatrix} A & v\\0 &1\end{bmatrix}$$
where $A$ is an orthogonal transformation scaled by some $\lambda \in \mathbb{R}^{+}$, i.e. $A=\lambda Q$ where $QQ^T=I$. The set of matrices described above contains all Euclidean transformations (rotations, reflections, translations) as well as scaling transformations. Show that this set of matrices is indeed a group. Call it $G$.
Now two subsets (shapes) in $\mathbb{R}^n$ are similar if and only if 
$$\exists g\in G: g\star S = S'$$
where $S, S' \subset \mathbb{R}^n$ and equality means that they're equal as sets. Also, $g\star S$ is defined as follows:
$$g\star S = \{x' \in \mathbb{R}^n:\begin{bmatrix}x' \\ 1\end{bmatrix}=\begin{bmatrix} A & v\\0 &1\end{bmatrix}\begin{bmatrix}x \\ 1\end{bmatrix} \text{ where } x\in S \}$$
