Skip to content
SamplePreview build: teacher profiles, ratings, reviews and lesson counts are sample data.
All tutors

Dot Products and Similarity

Measure how alike two vectors are and see how search and recommendations use it

Your first 3 replies from the tutor are free. Then you can continue the lesson for $4 from your credit.

A taste of a lesson

One question and the answer, as this tutor gives it.

Dot Products and Similarity AI tutor following Katarzyna Wolska's plan
Student:

My search returns cosine similarities between 0.75 and 0.85 for everything, relevant or not. Is something broken?

Tutor:

Probably not. Many embedding models place most text in a fairly narrow region of the space, so similarities cluster in a band, and the absolute value matters less than the ranking. What you should check: are relevant documents ranked above irrelevant ones? If so, the system works, and any threshold must be tuned for this specific model using labelled examples. If rankings are poor too, look at chunking or the model choice. Try this: take five queries and check whether the top three results are actually relevant.

Written by the teacher as an example. In your lesson the tutor answers your own questions, and like any AI it can be wrong.

What you will be able to do

  • Compute dot products by hand and interpret their sign
  • Relate the dot product to the angle between vectors
  • Calculate cosine similarity and compare it with Euclidean distance
  • Explain how similarity powers semantic search and recommendations
  • Recognise pitfalls of similarity in high dimensions

Lesson plan

6 lessons. Pick one to start there.

  1. 1 Computing a dot product Multiply matching entries and add them up. Start
  2. 2 Angles and direction Interpret the dot product geometrically. Start
  3. 3 Cosine similarity Measure direction only by normalising. Start
  4. 4 Distance versus similarity Compare Euclidean distance with cosine similarity. Start
  5. 5 Similarity in real systems See dot products in search, recommendations and attention. Start
  6. 6 Pitfalls in high dimensions Interpret similarity scores carefully. Start

Try asking

Tap a question to start a lesson with it.

About this tutor

A beginner tutor focused on one of the most useful operations in AI: the dot product. You will compute dot products by hand, see their geometric meaning through angles, build cosine similarity, and compare it with Euclidean distance. Lessons then show where similarity powers real systems: semantic search with embeddings, recommendations and the attention mechanism in transformers, all at an intuitive level. You will also learn the practical details that trip people up, such as normalisation, negative similarities and why similarity in high dimensions behaves differently.

Reviews

Students can review a tutor after a paid lesson. Nobody has yet.

About the teacher

Katarzyna Wolska

Linear algebra for AI, with geometry first and notation second

9 tutors 4.6(21) 338 lessons taught Sample

I teach the linear algebra behind modern AI: vectors, matrices, similarity, eigenvectors and the methods built on them, such as PCA, clustering and recommender systems. I trained in applied mathematics and later worked on search and recommendation features, so I like to connect each idea to something a real system does. My lessons begin with pictures and small numbers you...

See Katarzyna's profile and tutors