In precise mathematical terms, how is the dot product of two vectors A and B, each with n components, formally defined?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Strip away the geometry for a second and just look at the arithmetic: to get the dot product, you multiply each pair of matching components together — A_1 times B_1, A_2 times B_2, all the way to A_n times B_n — and then add up all those products. That sum is the dot product, so the answer is the one describing sum of A_i times B_i over i. The elementwise maximum option is just made up — that's not any standard vector operation tied to the dot product. The square-root-of-squared-differences option is actually the formula for Euclidean distance between two points, a totally different calculation. And dividing the product of magnitudes by n isn't a real formula either — it's a distractor blending unrelated pieces (magnitude, and n) that don't combine that way in any standard definition.
Full explanation below image
Full Explanation
The dot product (also called the scalar or inner product) of two n-dimensional vectors A = (A_1, A_2, ..., A_n) and B = (B_1, B_2, ..., B_n) is formally defined as A · B = the summation from i = 1 to n of A_i times B_i. In other words, you multiply each corresponding pair of components and then sum all of those products together, yielding a single scalar value. This algebraic definition is equivalent to the geometric definition A · B = |A||B|cos(theta), where |A| and |B| are the vector magnitudes and theta is the angle between them, but the summation form is the precise componentwise definition being tested here.
The elementwise maximum option is incorrect because taking the maximum of corresponding components is not a recognized vector operation associated with the dot product at all; it does not appear in any standard linear algebra formula for scalar or inner products.
The square-root-of-summed-squared-differences option is incorrect because that expression, sqrt(sum of (A_i - B_i)^2), is the formula for Euclidean distance between two points or vectors, which measures how far apart A and B are in space. It is a fundamentally different quantity from the dot product: distance captures separation, while the dot product captures alignment/projection and scales with magnitude and angle.
The magnitude-product-divided-by-n option is incorrect because there is no standard formula that divides the product of two vector magnitudes by the dimensionality n. This distractor superficially resembles pieces of related concepts (vector magnitude, dimensionality) but does not correspond to any valid mathematical definition of the dot product or a related quantity like cosine similarity, which instead divides by the product of magnitudes, not by n.
Memory aid: multiply matching components, then add — 'multiply-then-sum' is the dot product in one phrase, and it underlies core deep learning operations such as weighted sums in a neuron and matrix multiplication itself.