Given two 2D vectors v = [v1, v2] and w = [w1, w2], which expression correctly computes their dot product v · w?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Let's keep this one simple: the dot product just multiplies matching components and adds up the results. For v = [v1, v2] and w = [w1, w2], that's v1·w1 + v2·w2 — answer C. You pair up position one with position one, position two with position two, multiply each pair, then sum. The first option crosses the terms (v1 with w2, v2 with w1), which is a mix-up, not a dot product. The second option adds the components together first and multiplies the sums — that's not how the operation is defined at all, and it'll give you a totally different number. The fourth option is actually the product of the two vectors' magnitudes (their lengths), which only equals the dot product when the vectors point in exactly the same direction — not a general formula. Match, multiply, add: that's the whole trick.
Full explanation below image
Full Explanation
The dot product (also called the scalar or inner product) of two vectors of equal dimension is defined as the sum of the products of their corresponding components. For v = [v1, v2] and w = [w1, w2], this is v · w = v1·w1 + v2·w2, which produces a single scalar value, not a vector. This generalizes directly to higher dimensions: for n-dimensional vectors, the dot product is the sum over i of vi·wi.
The correct option pairs each component with its matching index and sums the products, which is exactly this definition.
The first distractor (v1·w2 + v2·w1) swaps the indices, cross-multiplying components from different positions. This is not a standard vector operation and does not correspond to any meaningful geometric quantity for these vectors; it is a common transcription error when students rush through the formula.
The second distractor, (v1 + v2)·(w1 + w2), first sums each vector's components into a scalar and then multiplies those two scalars together. Algebraically this expands to v1w1 + v1w2 + v2w1 + v2w2 — twice as many cross terms as the true dot product — so it is both conceptually and numerically wrong.
The fourth distractor computes the product of the Euclidean norms (magnitudes) of v and w, i.e., |v|·|w|. This quantity appears in the geometric definition of the dot product, v·w = |v||w|cos(θ), but it equals the dot product itself only when θ = 0 (the vectors are parallel and point the same way). In general, |v||w| ≥ v·w, so treating it as the formula for the dot product is incorrect.
Memory aid: dot product = 'multiply straight across, then add' — same-index pairs only, no cross terms, and the result is always a single number, never a vector. This operation underlies projections, similarity measures like cosine similarity, and the matrix multiplications that power every neural network layer.