applied sciences Article The Duality of Similarity and Metric Spaces OndˇrejRozinek 1,2,* and Jan Mareš 1,3,* 1 Department of Process Control, Faculty of Electrical Engineering and Informatics, University of Pardubice, 530 02 Pardubice, Czech Republic 2 CEO at Rozinet s.r.o., 533 52 Srch, Czech Republic 3 Department of Computing and Control Engineering, Faculty of Chemical Engineering, University of Chemistry and Technology, 166 28 Prague, Czech Republic * Correspondence:
[email protected] (O.R.);
[email protected] (J.M.) Abstract: We introduce a new mathematical basis for similarity space. For the first time, we describe the relationship between distance and similarity from set theory. Then, we derive generally valid relations for the conversion between similarity and a metric and vice versa. We present a general solution for the normalization of a given similarity space or metric space. The derived solutions lead to many already used similarity and distance functions, and combine them into a unified theory. The Jaccard coefficient, Tanimoto coefficient, Steinhaus distance, Ruzicka similarity, Gaussian similarity, edit distance and edit similarity satisfy this relationship, which verifies our fundamental theory. Keywords: similarity metric; similarity space; distance metric; metric space; normalized similarity metric; normalized distance metric; edit distance; edit similarity; Jaccard coefficient; Gaussian similarity 1. Introduction Mathematical spaces have been studied for centuries and belong to the basic math- ematical theories, which are used in various real-world applications [1]. In general, a mathematical space is a set of mathematical objects with an associated structure. This Citation: Rozinek, O.; Mareš, J. The structure can be specified by a number of operations on the objects of the set.