# The Duality of Similarity and Metric Spaces
## 4 Similarity Space Revisited
Another example could be taken from min-max feature scaling  
\[X^{\prime}=a+\frac{(X-X_{min})(b-a)}{X_{max}-X_{min}}, \tag{3}\]  
where \(X_{min}\) denotes the minimum value, and \(X_{max}\) the maximum value. All values are re-scaled (normalization) to lie within the range \([a,b]\). When the parameters \(a=0\), \(b=1\) are chosen, then this is a unity-based normalization. For instance, it should be clear that two errors in a comparison of short strings are more critical than in a comparison of long strings. Therefore, it is necessary in some circumstances to normalize the similarity metric. Until the beginning of this century, no such normalization preserving the metric axioms was known for the edit distance metric. Initially, [12] developed a normalized edit distance metric, with the range \([0,1]\). It is obvious that for any normalized distance metric \(d_{n}(x,y)\), there is also a normalized similarity metric \(s_{n}(x,y)=1-d_{n}(x,y)\) satisfying Definition 3. Because this axiomatic system is too general and valid for any unnormalized similarity metric functions, we introduce for our case a new specific axiomatic system for a normalized similarity metric in the range \([0,1]\). **Definition 4** (Normalized Similarity Metric). : _A function \(s_{n}(x,y)\colon\mathbf{X}\times\mathbf{X}\to[0,1]\subset\mathbb{R}\) is a normalized similarity metric if, such that for all subsets \(x,y,z\in\mathbf{X}\), it satisfies the following conditions:_  
1. \(s_{n}(x,y)=s_{n}(y,x)\) (symmetry),
2. \(s_{n}(x,z)+1\geq s_{n}(x,y)+s_{n}(y,z)\) (triangle inequality),
3. \(s_{n}(x,y)=1\Longleftrightarrow x=y\) (identity of indiscernibles)
4. \(s_{n}(x,y)\geq 0\) (non-negativity). _A normalized similarity space is an ordered pair \((\mathbf{X},s_{n})\)._  
We do not relax any axiom compared to Definition 3, but we have created a stricter meaningful special case of that definition by substituting \(s_{n}(x,x)=1\), which is also the least upper bound \(s_{n}(x,y)\). Due to this normalization, the self-similarity is always bounded by the same number \(s(x,x)=s(y,y)=1\). The total dissimilarity also defines the greatest lower bound \(s_{n}(x,y)=0\). The requirements for both limit conditions N3 and N4 thus stretch the similarity metric to its boundaries. **Theorem 3** (Self-Similarity Inequality). : _A normalized similarity metric satisfies \(s_{n}(x,y)\leq 1\)._  
Proof. : Appendix A.3. With these properties, we are also connected with probability theory, where we want to ensure that the probability of the similarity is \(0\leq P(x,y)\leq 1\) as well as \(0\leq s_{n}(x,y)\leq 1\). **Theorem 4** (Convex Combinations). : _A convex combination \(T_{\mathbb{C}}\colon\mathbb{R}\to\mathbb{R}\) of normalized similarity metrics is again a normalized similarity metric:_  
\[s_{n_{\mathbb{C}}}(x,y)=T_{\mathbb{C}}(s_{n}(x,y))=\sum_{i=1}^{m}\alpha_{i}s_ {i}=\alpha_{1}s_{1}+\alpha_{2}s_{2}+...+\alpha_{m}s_{m} \tag{4}\]  
_where \(\sum_{i=1}^{m}\alpha_{i}=1\) and \(0\leq\alpha_{i}\leq 1\)._  
Proof. : Appendix A.4. This property of convex combinations allows us to assemble different normalized similarity metrics together and obtain again a normalized similarity metric.