This document provides an overview and introduction to distance functions and metric learning. It discusses various distance measures that can be used for histograms, including bin-to-bin distances, the quadratic-form histogram distance, the quadratic-chi histogram distance, and the Earth Mover's Distance. Code examples are provided for calculating the quadratic-chi distance. The document also defines key concepts like metrics, pseudo-metrics, and Minkowski distances.