
Dot product = sum of products of corresponding entries
Image: AnonymousUnknown author, Public domain, via Wikimedia Commons
Dot product = sum of products of corresponding entries
The dot product of two vectors is calculated by multiplying their corresponding entries and summing the results. This operation results in a scalar value, not a vector. The dot product is essential for determining the angle between vectors and for projecting one vector onto another.
Example
For vectors A = [a1, a2] and B = [b1, b2], the dot product A · B = a1*b1 + a2*b2. If A = [2, 3] and B = [4, 5], then A · B = 2*4 + 3*5 = 8 + 15 = 23.
Remember this
Understanding the dot product is crucial for applications in physics, engineering, and computer science, where vector operations are fundamental.
Text adapted from Wikipedia, licensed under CC BY-SA 4.0.
Matrix norm
L1 norm of a vector is the sum of absolute values of its components
Normalization (machine learning)
L2 normalization equation: x_i' = x_i / ||x||_2
Cosine similarity
Cosine similarity formula: cos(θ) = (A · B) / (||A|| ||B||)
the dot product measures alignment: it equals |a||b|cos(θ)
Why do vectors sometimes "agree" with each other?
Rotation matrix
Determinant of a 2x2 matrix: ad - bc
Regression analysis
Linear regression equation: ŷ = β0 + β1X
Swipe through 100 ML concepts daily
Open Pocket Polymath