Dot and Cross Products
Two ways to multiply vectors: the dot product gives a number that measures alignment; the cross product gives a vector perpendicular to both.
Needs a step first: 3
, so it finds angles, tests for perpendicularity (dot product zero) and projects one vector onto another. The cross product is perpendicular to both, with length , the area of the parallelogram they span. Together they give the equations of planes, torque and magnetic force, and lead to Orthogonality and Projections and to Divergence and Curl.
Where it shows up: Attention scores in a Transformer are dot products of query and key vectors, cosine similarity compares embeddings, and the magnetic force on a moving charge is a cross product.
How to hold it: By hand, until automatic
Compute dot products and lengths instantly and read them as alignment, zero for perpendicular and for the angle, because projections, similarity and attention all run on this.
What knowing it looks like
- Find the angle between two vectors with the dot product, and test whether they are perpendicular.
- Compute a cross product and check the answer is perpendicular to both vectors.
- Find the equation of a plane through three points, using a cross product for its normal.
Test yourself
Let and . Find the angle between them, , and the area of the triangle with sides and .
Show the worked answer
Needs a step first: 3
Learn it with an AI
Copy this prompt into any AI assistant. It will take you through step by step at your level and finish with the test above.
Be my maths tutor. I'm learning "Dot and Cross Products" (Core tier): Two ways to multiply vectors: the dot product gives a number that measures alignment; the cross product gives a vector perpendicular to both.
I already know: Vectors, Trigonometric Functions and Radians.
Teach it Socratically: first ask what I already know; then explain the core idea with one concrete example and why it's true; then give me three problems, one at a time, easy to hard. Wait for my answer, check every step, and point out mistakes without giving the answer away.
Finish by testing me with this: Let $\mathbf{a} = (1, 2, 2)$ and $\mathbf{b} = (3, 0, 4)$. Find the angle between them, $\mathbf{a} \times \mathbf{b}$, and the area of the triangle with sides $\mathbf{a}$ and $\mathbf{b}$.
Use LaTeX for formulas. When you say where it's used later (machine learning, quantum mechanics), be specific.Needs first
- VectorsQuantities with both size and direction, written as columns of numbers, added head to tail and scaled by numbers.Bridge · Multivariable & Vector Calculus
- Trigonometric Functions and RadiansSine, cosine and tangent as functions of any angle, measured in radians, with their graphs and the main identities.Bridge · Functions & Calculus
Leads to
- Divergence and CurlFor a field of arrows, such as a flow or a force, divergence measures spreading out from a point and curl measures swirling.Undergraduate II · Multivariable & Vector Calculus
- Orthogonality and ProjectionsPerpendicular vectors, and how to split any vector into a part inside a subspace and a part at right angles to it.Undergraduate I · Linear Algebra
- Gravity and OrbitsNewton's inverse-square law of gravity, and how it produces circular and elliptical orbits, orbital speeds and escape velocity.Undergraduate I · Physics
On the way to
Recommended
- OpenStax CalculusOpenStax, Rice University · BookA free, peer-reviewed calculus textbook in three volumes, from limits through series to vectors and multiple integrals, with worked examples and answers.
- Khan Academy: Multivariable CalculusKhan Academy · CourseFree, ad-free videos and exercises on partial derivatives, gradients, multiple integrals, divergence, curl and Stokes' theorem, taught largely by Grant Sanderson of 3Blue1Brown.
- Mathematics for Machine LearningDeisenroth, Faisal and Ong (Cambridge University Press) · BookA free book that gathers exactly the linear algebra, vector calculus, probability and optimisation machine learning uses, then applies them to regression, PCA and classification.
- 宋浩老师官方宋浩(山东财经大学) · Videos · 中文Full university courses in calculus, linear algebra and probability by a Shandong University of Finance and Economics lecturer, clear and good-humoured; a new calculus series came out in October 2026.