Math Lab

2-D Dot Product a·b

Vector Algebra · Class XII

Set components of vectors a and b in 2-D. See magnitudes, dot product and angle between them.

3
type a value
-55
0
type a value
-55
0
type a value
-55
4
type a value
-55
Live values
  • |a|3
  • |b|4
  • a · b0
  • cos θ0
xy
  • a · b as b_x varies

Formulas in this lab

  • |a|
    ax2+ay2\sqrt{a_x^2 + a_y^2}
  • |b|
    bx2+by2\sqrt{b_x^2 + b_y^2}
  • a · b
    axbx+aybya_x b_x + a_y b_y
  • cos θ
    abab\dfrac{a\cdot b}{|a||b|}
Tip: Dot product is linear in each component; sign flips through zero exactly where the vectors become perpendicular.

Frequently asked questions

What does the dot product $\vec{a}\cdot\vec{b}$ compute?

For $\vec{a} = (a_1, a_2, a_3)$ and $\vec{b} = (b_1, b_2, b_3)$, the dot product is $a_1 b_1 + a_2 b_2 + a_3 b_3$. Geometrically, $\vec{a}\cdot\vec{b} = |\vec{a}||\vec{b}|\cos\theta$, where $\theta$ is the angle between them.

How do I use the dot product lab?

Enter components of two 3-D vectors. The lab returns the dot product, magnitudes and the angle $\theta = \cos^{-1}\!\big(\frac{\vec a\cdot\vec b}{|\vec a||\vec b|}\big)$. Try $\vec a = (1, 0, 0)$ and $\vec b = (0, 1, 0)$: dot is $0$, angle $90^\circ$.

Why does $\vec{a}\cdot\vec{b} = 0$ mean perpendicular?

Because $|\vec a||\vec b|\cos\theta = 0$ with non-zero magnitudes forces $\cos\theta = 0$, i.e. $\theta = 90^\circ$. This is the fastest way to check orthogonality. JEE uses it on lines, planes and direction vectors throughout 3-D geometry.

Where does the dot product appear in real life?

Work done by a force: $W = \vec{F}\cdot\vec{d}$. Computer graphics uses dot products for lighting (how directly a surface faces the light). Recommendation systems on Hotstar score similarity between user vectors using cosine similarity, which is just a normalised dot product.