Read this lesson as text
Dot Product & Inner Product
Linear Algebra for Machine Learning · Axiom Academy
Measuring similarity and angle between vectors The dot product combines two vectors into a single number by multiplying corresponding components and summing. The result is a single scalar (a number), not a vector. Example: u = [1, 2, 3] and v = [4, 5, 6] u · v = (1)(4) + (2)(5) + (3)(6) = 4 + 10 + 18 = 32 The dot product reveals the angle between two vectors: Where θ is the angle between u and v, and ||u|| and ||v|| are the magnitudes (lengths). u · v > 0: vectors point in similar directions (angle < 90°) u · v = 0: vectors are perpendicular (orthogonal, angle = 90°) u · v < 0: vectors point in opposite directions (angle > 90°) Similarity Measurement: In machine learning, dot product measures how similar two data vectors are. Higher dot product = more similar. Projections: The dot product lets us project one vector onto another, useful in signal processing and statistics. Physics: Work = force · displacement (both vectors), calculated as a dot product. Neural Networks: Computing neuron outputs involves dot products of input vectors with weight vectors. The dot product is one of the most fundamental operations in machine learning, appearing in almost every algorithm.
This is the written version of the interactive lesson above. See the full Linear Algebra for Machine Learning course.