Reading Time: < 1 minute

The Cosine similarity is used to determine the similarity between documents or vectors. Mathematically the cosine similarity is used to measures the cosine of the angle between two vectors projected in a multi-dimensional space.

There are other similarity measuring techniques like Euclidean distance, Jaccard Similarity or Manhattan distance available but we will be focusing here on the Cosine Similarity and Cosine Distance.

The relation between cosine similarity and cosine distance can be define as below.

The similarity decreases when distance between two vectors increases. The similarity increases when distance between two vectors decreases.

The formula to find the Cosine Similarity and Distance is as below:

Cosine Distance = 1- Cosine Simularity