The geometry behind the dot product: projections and unit vectors
Why dot product geometry matters if you build search relevance or recommendations. Unit vectors, scalar and vector projections, the shadow analogy, and a plain PHP cosine similarity function you can read.