Learning path

Full curriculum

Full curriculum

Unit content

Dot product

The dot product combines two vectors into a scalar. For

$$\mathbf u=(u_1,\ldots,u_n),\qquad \mathbf v=(v_1,\ldots,v_n),$$

it is defined by

$$\mathbf u\cdot\mathbf v=u_1v_1+\cdots+u_nv_n.$$

For example,

$$(2,1)\cdot(3,-4)=6-4=2.$$

Length from the dot product

A vector dotted with itself gives the square of its length:

$$\mathbf v\cdot\mathbf v=|\mathbf v|^2.$$

Therefore

$$|\mathbf v|=\sqrt{\mathbf v\cdot\mathbf v}.$$

In $\mathbb R^2$, this reproduces the Pythagorean formula

$$|(x,y)|=\sqrt{x^2+y^2}.$$

Angle between vectors

For nonzero vectors, the dot product also satisfies

$$\mathbf u\cdot\mathbf v =|\mathbf u|,|\mathbf v|\cos\theta,$$

where $\theta$ is the angle between them. Hence

$$\cos\theta=\frac{\mathbf u\cdot\mathbf v}{|\mathbf u|,|\mathbf v|}.$$

A positive dot product corresponds to an acute angle, a negative one to an obtuse angle, and a zero dot product to a right angle.

The dot product therefore connects component arithmetic with length, angle and geometric alignment.

Visual intuition: dot products