Cosine Similarity measures similarity using the cosine of the angle generated between two vectors in p-dimensional space. For two vectors **x _{1}** and

**x**, the similarity measure is found by the ratio of the dot product of two vectors over the product of the magnitude of the vectors. A common application of Cosine Similarity is in measuring document similarity in natural language processing.

_{2}