The distance between two objects that are not points is usually defined to be the smallest distance among pairs of points from the two objects. Formulas are known for computing distances between different types of objects, such as the distance from a point to a line. In advanced mathematics, the concept of distance has been generalized to abstract metric spaces, and other distances than Euclidean have been studied. In some applications in statistics and optimization, the square of the Euclidean distance is used instead of the distance itself.
tHe dIstaNCe betwEen twO oBjects tHaT ArE noT pOints iS USUalLy deFined to be The smaLlest dIstaNce among paiRs of pOints FRom the tWo obJEcts. ForMulaS ARe known FOr computinG dIstaNcEs betwEeN dIffErenT types of objects, such aS thE distAnce froM a point to A liNE. iN aDVAnced maThemaTics, thE concepT of dIStance hAs bEeN genErAlized to abSTracT mEtRic spAcEs, aNd oTHer disTAnces Than EucliDean have beeN STuDIed. In sOmE apPlicatIOns In sTaTIstIcS anD oPTiMIzAtIon, the SQuAre of ThE eUclidEAn diStAncE is usEd iNsTeaD oF THE Distance iTself.