Dot Product of Two 2D Vectors (Components)

a⃗⋅b⃗=axbx+ayby\vec{a}\cdot\vec{b} = a_x b_x + a_y b_y

Worked example: (3, 4)·(2, −1) → 2 — press Try an example to run it live, then adjust anything.

Enter your known values, leave one input blank, and solves for the missing one. Tap a variable’s symbol to see what it means, with a typical value. Try different units for next level excitement!

Here the solver did the work — could you?

The dot product →

Grade 12Grade 12 Math

Test your skills in the Exam Room: new numbers every attempt — free lessons for students, no sign-up, just pure learning. Find 1 more lesson on this formula.

See your Report Card
Compete with your friends
share your results
Learning zone

Dot Product of Two 2D Vectors (Components) explained

ayaxbybxa·b

The dot product pairs up matching components, multiplies, and adds — and the answer is a plain number, not a vector. That single scalar measures agreement of direction: positive when two vectors broadly point the same way, zero when they are perpendicular, negative when they oppose. Example: (3, 4)·(2, −1) = 6 − 4 = 2, a small positive number, meaning the two arrows lean the same way but only just. Change b to (4, −3) and the product is 12 − 12 = 0: exactly perpendicular, which is far easier to test this way than by measuring any angle.

The notation is younger than the idea. Through the 1880s Hamilton's quaternions were the standard tool for three-dimensional algebra, and their product mixed a scalar part with a vector part in one unwieldy object. Josiah Willard Gibbs at Yale, printing lecture notes privately for his students, and Oliver Heaviside in England, working on Maxwell's equations, independently tore that product in half — keeping the scalar piece as the dot product and the vector piece as the cross product. Quaternion loyalists fought the change bitterly in the pages of Nature; Gibbs and Heaviside won, and every physics course since teaches their version.

Dot Product of Two 2D Vectors (Components) formula

a⃗⋅b⃗=axbx+ayby\vec{a}\cdot\vec{b} = a_x b_x + a_y b_y
Where
  • a⃗⋅b⃗\vec{a}\cdot\vec{b}= Dot product
  • axa_x= x-component of a
  • aya_y= y-component of a
  • bxb_x= x-component of b
  • byb_y= y-component of b