Produto Escalar 3D (Dot)
Calcula a · b = aₓbₓ + a_yb_y + a_zb_z (escalar).
a · b
—
Dot product u · v in 3D
The dot product of two 3D vectors u = (u₁, u₂, u₃) and v = (v₁, v₂, v₃) is the scalar u · v = u₁v₁ + u₂v₂ + u₃v₃ = |u|·|v|·cos θ, with θ being the angle between them. You get one number out, not a vector. If u · v = 0, the vectors are perpendicular (orthogonal). A positive result means the angle is acute; a negative one means it's obtuse. Take (1, 2, 3) · (4, 5, 6) = 4 + 10 + 18 = 32. Rearrange for the angle and you land on cos θ = (u · v) / (|u|·|v|), which is the cosine similarity that machine learning relies on so much. A few properties worth knowing: it's commutative, u · v = v · u, it distributes over addition, and u · u = |u|², the squared norm.
Applications
Physics uses it for mechanical work, W = F · d. It gives you the orthogonal projection of u onto v, proj = (u · v / |v|²) · v, the angle between two vectors, and Gram-Schmidt orthogonalisation. And then there's cosine similarity in machine learning, which sits at the heart of NLP (word embeddings like Word2Vec, sentence embeddings), semantic search and recommender systems, anywhere you want to compare high-dimensional vectors by direction instead of magnitude.
FAQ
Does u · v = 0 always mean perpendicular? Only if both u and v are non-zero. The zero vector dot-products to 0 against everything, but calling it perpendicular doesn't make much geometric sense.
What is the difference between dot product and cosine similarity? Cosine similarity is the dot product after normalising, (u · v) / (|u|·|v|). Dividing out the magnitudes leaves a value in [-1, 1] that reflects only the angle between the vectors.
Can the dot product be negative? Yes, any time the angle between u and v is more than 90° (cos θ < 0). A negative value tells you the two vectors point in roughly opposite directions.
Related Tools
Rent Adjustment Calculator
Compute annual rent adjustment by IGP-M or IPCA accumulated in the last 12 months (manually configurable).
Pregnancy Calculator
Compute estimated due date (EDD), gestational age and trimester from the last menstrual period (LMP).
Fertile Period Calculator
Compute fertile window and ovulation day from the first day of the last cycle and the average cycle length.