The Maths You Actually NeedLesson 6 of 76

Module 1 · Vectors, and the space they live in

Projection, and the art of removing a direction

In this lesson

  • 9 min read
  • 7 reading sections
  • Knowledge check
  • Lesson 6 of 9 in this chapter

This chapter’s goalTurn a real piece of data into a vector and defend the choices made, compute a length, a distance, a projection and a cosine by hand, and explain using the 1/√d rule why a similarity threshold that works in a 3-dimensional picture is meaningless in a 768-dimensional embedding space.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 8Free · no account needed
Lesson steps

Splitting a vector in two

Take a vector a and a direction b. Every vector a can be written as the sum of two pieces: one lying along b, and one perpendicular to it. The first piece is the projection of a onto b, and it is one formula:

Text
proj_b(a) = ( (a . b) / (b . b) ) * b

If b is already a unit vector, b . b = 1 and this simplifies to (a . b) * b. The scalar a . b is how much of b there is in a, and multiplying by b turns that scalar back into a vector.

Worked, with a = [3, 4] and b = [1, 0]:

Text
a . b = 3
b . b = 1
proj_b(a) = 3 * [1, 0] = [3, 0]
the leftover: a - proj_b(a) = [0, 4]

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Stuck on something?Ask Funke, your AI tutor

How to cite: Addaly (2026) ‘Projection, and the art of removing a direction’, in The Maths You Actually Need. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/maths-you-need/angles-orthogonality-and-projection (Accessed: 29 November 2026).