CosineDistance
✖
CosineDistance
Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Scope (2)Survey of the scope of standard use cases
Applications (1)Sample problems that can be solved with this function
Properties & Relations (3)Properties of the function, and connections to other functions
Cosine distance includes a dot product scaled by norms:
In[1]:=1

✖
https://wolfram.com/xid/0bnhtx59v3qi6-g7irif
Out[1]=1

In[2]:=2

✖
https://wolfram.com/xid/0bnhtx59v3qi6-d0q2f
Out[2]=2

Cosine distance includes a dot product scaled by Euclidean distances from the origin:
In[1]:=1

✖
https://wolfram.com/xid/0bnhtx59v3qi6-dl0re8
In[2]:=2

✖
https://wolfram.com/xid/0bnhtx59v3qi6-b836g
Out[2]=2

In[3]:=3

✖
https://wolfram.com/xid/0bnhtx59v3qi6-1npjt
Out[3]=3

CosineDistance of vectors shifted by their means is equivalent to CorrelationDistance:
In[1]:=1

✖
https://wolfram.com/xid/0bnhtx59v3qi6-gorn6
In[2]:=2

✖
https://wolfram.com/xid/0bnhtx59v3qi6-s0rv3
Out[2]=2

Wolfram Research (2007), CosineDistance, Wolfram Language function, https://reference.wolfram.com/language/ref/CosineDistance.html.
✖
Wolfram Research (2007), CosineDistance, Wolfram Language function, https://reference.wolfram.com/language/ref/CosineDistance.html.
Text
Wolfram Research (2007), CosineDistance, Wolfram Language function, https://reference.wolfram.com/language/ref/CosineDistance.html.
✖
Wolfram Research (2007), CosineDistance, Wolfram Language function, https://reference.wolfram.com/language/ref/CosineDistance.html.
CMS
Wolfram Language. 2007. "CosineDistance." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CosineDistance.html.
✖
Wolfram Language. 2007. "CosineDistance." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CosineDistance.html.
APA
Wolfram Language. (2007). CosineDistance. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CosineDistance.html
✖
Wolfram Language. (2007). CosineDistance. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CosineDistance.html
BibTeX
✖
@misc{reference.wolfram_2025_cosinedistance, author="Wolfram Research", title="{CosineDistance}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/CosineDistance.html}", note=[Accessed: 04-June-2025
]}
BibLaTeX
✖
@online{reference.wolfram_2025_cosinedistance, organization={Wolfram Research}, title={CosineDistance}, year={2007}, url={https://reference.wolfram.com/language/ref/CosineDistance.html}, note=[Accessed: 04-June-2025
]}