Vectors and the Dot Product

Study Sheet

Vectors and the Dot Product

Components, magnitude & direction, the dot product, projection, and applications

Vectors: Geometric and Component Form

Tip

Rounding for this topic: Give exact values (fractions or radicals) whenever they are clean. Otherwise round magnitudes and components to two decimal places and angles to the nearest 0.10.1^\circ. Keep full precision in your calculator until the final step.

Concept
What a vector is

A vector has both magnitude (length) and direction. Draw it as an arrow. Written in component form as v=a,b\vec v=\langle a,b\rangle, where aa is the horizontal change and bb the vertical change.

From P(p1,p2) to Q(q1,q2):PQ=q1p1, q2p2.\text{From }P(p_1,p_2)\text{ to }Q(q_1,q_2):\quad \vec{PQ}=\langle q_1-p_1,\ q_2-p_2\rangle .

Two vectors are equal when they have the same components — same magnitude and same direction — no matter where they are drawn.

Concept
Magnitude and direction angle
v=a,b=a2+b2,tanθ=ba.\|\vec v\|=\|\langle a,b\rangle\|=\sqrt{a^2+b^2},\qquad \tan\theta=\frac{b}{a}.

The direction angle θ\theta is measured counterclockwise from the positive xx-axis. Use the signs of aa and bb to place θ\theta in the correct quadrant.

Example
Full magnitude and direction

Find the magnitude and direction angle of v=4,3\vec v=\langle 4,3\rangle.

v=42+32=16+9=25=5.\|\vec v\|=\sqrt{4^2+3^2}=\sqrt{16+9}=\sqrt{25}=5.

Since a=4>0a=4>0 and b=3>0b=3>0, v\vec v is in Quadrant I:

θ=tan1 ⁣(34)=36.9.\theta=\tan^{-1}\!\left(\tfrac{3}{4}\right)=36.9^\circ .

Answer: magnitude 55, direction 36.9\approx 36.9^\circ.

Tip

Quadrant tip: tan1\tan^{-1} on a calculator only returns 90-90^\circ to 9090^\circ. If a<0a<0 (Quadrant II or III), add 180180^\circ to the calculator value. If a>0, b<0a>0,\ b<0 (Quadrant IV), add 360360^\circ to get a positive angle.

Vector Operations

Concept
Adding, subtracting, scaling, unit vectors
a,b+c,d=a+c, b+d(add tip-to-tail)a,bc,d=ac, bd(uv=u+(v))ka,b=ka, kb(scalar multiple)\begin{aligned} \langle a,b\rangle+\langle c,d\rangle&=\langle a+c,\ b+d\rangle &\text{(add tip-to-tail)}\\ \langle a,b\rangle-\langle c,d\rangle&=\langle a-c,\ b-d\rangle &\text{($\vec u-\vec v=\vec u+(-\vec v)$)}\\ k\langle a,b\rangle&=\langle ka,\ kb\rangle &\text{(scalar multiple)} \end{aligned}

A unit vector has magnitude 11. To find the unit vector in the direction of v\vec v:

u^=vv=av, bv.\hat u=\frac{\vec v}{\|\vec v\|}=\left\langle \frac{a}{\|\vec v\|},\ \frac{b}{\|\vec v\|}\right\rangle .

Standard basis / i,j\mathbf{i},\mathbf{j} form: i=1,0\mathbf i=\langle 1,0\rangle, j=0,1\mathbf j=\langle 0,1\rangle, so a,b=ai+bj.\langle a,b\rangle=a\,\mathbf i+b\,\mathbf j.

Example
Operations and a unit vector

Let u=3,2\vec u=\langle 3,-2\rangle and v=1,4\vec v=\langle 1,4\rangle.

2uv=6,41,4=5,8.2\vec u-\vec v=\langle 6,-4\rangle-\langle 1,4\rangle=\langle 5,-8\rangle .

Unit vector for u\vec u: u=9+4=13\|\vec u\|=\sqrt{9+4}=\sqrt{13}, so

u^=313, 2130.83,0.55.\hat u=\left\langle \tfrac{3}{\sqrt{13}},\ \tfrac{-2}{\sqrt{13}}\right\rangle\approx\langle 0.83,\,-0.55\rangle .

In i,j\mathbf i,\mathbf j form: u=3i2j\vec u=3\,\mathbf i-2\,\mathbf j.

Writing a Vector from Magnitude and Direction

Concept
Resolving into components

A vector with magnitude r=vr=\|\vec v\| and direction angle θ\theta has components

v=rcosθ, rsinθ.\vec v=\langle r\cos\theta,\ r\sin\theta\rangle .

This is the reverse of finding magnitude and direction — it resolves the vector into its horizontal and vertical parts.

Example
Magnitude and direction to components

Write the vector of magnitude 1010 pointing at 3030^\circ.

v=10cos30, 10sin30=1032, 1012=53, 58.66, 5.\vec v=\langle 10\cos 30^\circ,\ 10\sin 30^\circ\rangle=\left\langle 10\cdot\tfrac{\sqrt3}{2},\ 10\cdot\tfrac12\right\rangle=\langle 5\sqrt3,\ 5\rangle\approx\langle 8.66,\ 5\rangle .
Tip

Check: resolving and then re-computing the magnitude must return rr: (53)2+52=75+25=100=10.\sqrt{(5\sqrt3)^2+5^2}=\sqrt{75+25}=\sqrt{100}=10.

The Dot Product, Angle Between Vectors, Orthogonality

Concept
Dot product and the angle between vectors
uv=a,bc,d=ac+bd(a scalar, not a vector).\vec u\cdot\vec v=\langle a,b\rangle\cdot\langle c,d\rangle=ac+bd \qquad(\text{a scalar, not a vector}).
uv=uvcosθcosθ=uvuv,0θ180.\vec u\cdot\vec v=\|\vec u\|\,\|\vec v\|\cos\theta \qquad\Longrightarrow\qquad \cos\theta=\frac{\vec u\cdot\vec v}{\|\vec u\|\,\|\vec v\|},\quad 0^\circ\le\theta\le 180^\circ .

Orthogonal (perpendicular): uv\vec u\perp\vec v exactly when uv=0\vec u\cdot\vec v=0.

Example
Angle between two vectors

Find the angle between u=3,1\vec u=\langle 3,1\rangle and v=2,4\vec v=\langle 2,4\rangle.

uv=3(2)+1(4)=10,u=10,v=20.\vec u\cdot\vec v=3(2)+1(4)=10,\qquad \|\vec u\|=\sqrt{10},\quad \|\vec v\|=\sqrt{20}.
cosθ=101020=10200=1014.142=0.7071  θ=45.\cos\theta=\frac{10}{\sqrt{10}\sqrt{20}}=\frac{10}{\sqrt{200}}=\frac{10}{14.142}=0.7071 \ \Longrightarrow\ \theta=45^\circ .
Tip

Orthogonal check: 2,33,2=66=0\langle 2,3\rangle\cdot\langle 3,-2\rangle=6-6=0, so these vectors are perpendicular. A negative dot product means the angle is obtuse; a positive one means acute.

Vector Projection and Work

Concept
Projection and parallel/orthogonal decomposition

The (vector) projection of u\vec u onto v\vec v:

projvu=(uvv2)v.\operatorname{proj}_{\vec v}\vec u=\left(\frac{\vec u\cdot\vec v}{\|\vec v\|^2}\right)\vec v .

The scalar component of u\vec u along v\vec v is uvv\dfrac{\vec u\cdot\vec v}{\|\vec v\|}. Every vector splits into a part parallel to v\vec v and a part orthogonal to it:

u=projvuw1 (v)+(uprojvu)w2 (v).\vec u=\underbrace{\operatorname{proj}_{\vec v}\vec u}_{\vec w_1\ (\parallel\vec v)}+\underbrace{\big(\vec u-\operatorname{proj}_{\vec v}\vec u\big)}_{\vec w_2\ (\perp\vec v)} .
Example
Full projection and decomposition

Project u=6,2\vec u=\langle 6,2\rangle onto v=3,4\vec v=\langle 3,4\rangle.

uv=6(3)+2(4)=26,v2=32+42=25.\vec u\cdot\vec v=6(3)+2(4)=26,\qquad \|\vec v\|^2=3^2+4^2=25.
projvu=26253,4=7825, 10425=3.12, 4.16.\operatorname{proj}_{\vec v}\vec u=\frac{26}{25}\langle 3,4\rangle=\left\langle \tfrac{78}{25},\ \tfrac{104}{25}\right\rangle=\langle 3.12,\ 4.16\rangle .

Orthogonal part: w2=uw1=63.12, 24.16=2.88, 2.16\vec w_2=\vec u-\vec w_1=\langle 6-3.12,\ 2-4.16\rangle=\langle 2.88,\ -2.16\rangle. Check: w1w2=3.12(2.88)+4.16(2.16)=8.98568.9856=0\vec w_1\cdot\vec w_2=3.12(2.88)+4.16(-2.16)=8.9856-8.9856=0. ✓

Concept
Work done by a force

When a constant force F\vec F moves an object through displacement d\vec d,

W=Fd=Fdcosθ,W=\vec F\cdot\vec d=\|\vec F\|\,\|\vec d\|\cos\theta,

where θ\theta is the angle between the force and the direction of motion.

Example
Work along a ramp

A rope pulls a crate 2020 ft horizontally with a 5050-lb force directed 3030^\circ above the horizontal.

W=Fdcosθ=50(20)cos30=1000(0.8660)=866.03 ft-lb.W=\|\vec F\|\,\|\vec d\|\cos\theta=50(20)\cos 30^\circ=1000(0.8660)=866.03\ \text{ft-lb}.

Applications: Resultant Forces, Velocity, Navigation, Inclined Planes

Concept
Combining vectors in the real world

Resultant force / velocity: resolve each vector into components, add the components, then re-compute magnitude and direction.

R=F1+F2,R=Rx2+Ry2,θ=tan1 ⁣RyRx (adjust quadrant).\vec R=\vec F_1+\vec F_2,\qquad \|\vec R\|=\sqrt{R_x^2+R_y^2},\qquad \theta=\tan^{-1}\!\frac{R_y}{R_x}\ (\text{adjust quadrant}).

Inclined plane: for weight WW on a ramp of angle α\alpha,

force along ramp=Wsinα,force into ramp=Wcosα.\text{force along ramp}=W\sin\alpha,\qquad \text{force into ramp}=W\cos\alpha.
Example
Resultant of two forces

F1\vec F_1: 4040 N at 3030^\circ. F2\vec F_2: 6060 N at 120120^\circ.

F1=40cos30,40sin30=34.64, 20,F2=60cos120,60sin120=30, 51.96,R=4.64, 71.96.\begin{aligned} \vec F_1&=\langle 40\cos 30^\circ,40\sin 30^\circ\rangle=\langle 34.64,\ 20\rangle,\\ \vec F_2&=\langle 60\cos 120^\circ,60\sin 120^\circ\rangle=\langle -30,\ 51.96\rangle,\\ \vec R&=\langle 4.64,\ 71.96\rangle. \end{aligned}
R=4.642+71.962=5199.7=72.11 N,θ=tan1 ⁣71.964.64=86.3.\|\vec R\|=\sqrt{4.64^2+71.96^2}=\sqrt{5199.7}=72.11\ \text{N},\quad \theta=\tan^{-1}\!\frac{71.96}{4.64}=86.3^\circ .
Tip

Navigation reminder: a compass bearing is measured clockwise from North, but a direction angle is measured counterclockwise from the positive xx-axis (East). Convert carefully, or set East =x=x, North =y=y and resolve each velocity into components before adding.

Going Deeper: Advanced Vector Ideas

Tip

Same rounding rules apply: keep exact radicals when clean, otherwise round magnitudes/components to two decimals and angles to 0.10.1^\circ. In proofs, prefer exact arithmetic so a dot product that should be zero comes out exactly zero.

Concept
Magnitude of a sum or difference from the angle

You do not need components to find u+v\|\vec u+\vec v\| — only the two magnitudes and the angle θ\theta between the vectors. Expanding u±v2=(u±v)(u±v)\|\vec u\pm\vec v\|^2=(\vec u\pm\vec v)\cdot(\vec u\pm\vec v) gives the Law of Cosines in vector form:

u±v2=u2+v2±2uvcosθ.\|\vec u\pm\vec v\|^2=\|\vec u\|^2+\|\vec v\|^2\pm 2\,\|\vec u\|\,\|\vec v\|\cos\theta .

This is exactly the parallelogram law: u+v\vec u+\vec v is the diagonal and uv\vec u-\vec v is the other diagonal of the parallelogram built on u\vec u and v\vec v.

Reminder — Law of Cosines:c2=a2+b22abcosCc^{2}=a^{2}+b^{2}-2ab\cos C
Example
Both diagonals from magnitudes and the angle

Vectors u\vec u and v\vec v have u=5\|\vec u\|=5, v=3\|\vec v\|=3, and the angle between them is θ=60\theta=60^\circ.

u+v2=52+32+2(5)(3)cos60=25+9+30(0.5)=49  u+v=7.\|\vec u+\vec v\|^2=5^2+3^2+2(5)(3)\cos 60^\circ=25+9+30(0.5)=49\ \Longrightarrow\ \|\vec u+\vec v\|=7.
uv2=25+930(0.5)=19  uv=194.36.\|\vec u-\vec v\|^2=25+9-30(0.5)=19\ \Longrightarrow\ \|\vec u-\vec v\|=\sqrt{19}\approx 4.36.

Answer: the diagonals measure 77 and 4.36\approx 4.36.

Concept
Proving geometry with vectors

Turn a geometric claim about points A,B,C,A,B,C,\dots into an algebra statement about the vectors between them:

  • 2pt
  • Perpendicular / right angle at BB: show BABC=0\vec{BA}\cdot\vec{BC}=0.
  • Equal lengths (isosceles): show AB=AC\|\vec{AB}\|=\|\vec{AC}\|, i.e. equal vv\vec v\cdot\vec v.
  • Parallel / collinear: show one vector is a scalar multiple of the other, u=kv\vec u=k\vec v.
  • Midpoint MM of ABAB: OM=12(OA+OB)\vec{OM}=\tfrac12(\vec{OA}+\vec{OB}).

Because the dot product is exact, these tests are cleaner than measuring slopes or distances.

Example
Proving a triangle is right and isosceles

Triangle with A(1,2)A(1,2), B(5,4)B(5,4), C(3,8)C(3,8). Form the edge vectors at BB:

BA=AB=4,2,BC=CB=2,4.\vec{BA}=A-B=\langle -4,-2\rangle,\qquad \vec{BC}=C-B=\langle -2,4\rangle .
BABC=(4)(2)+(2)(4)=88=0  right angle at B.\vec{BA}\cdot\vec{BC}=(-4)(-2)+(-2)(4)=8-8=0\ \Longrightarrow\ \text{right angle at }B.

Now compare the two legs:

BA=(4)2+(2)2=20,BC=(2)2+42=20.\|\vec{BA}\|=\sqrt{(-4)^2+(-2)^2}=\sqrt{20},\qquad \|\vec{BC}\|=\sqrt{(-2)^2+4^2}=\sqrt{20}.

Equal legs, so the triangle is an isosceles right triangle. ✓

Concept
Direction of an angle bisector

The bisector of the angle between u\vec u and v\vec v points along the sum of the two unit vectors:

b=u^+v^=uu+vv.\vec b=\hat u+\hat v=\frac{\vec u}{\|\vec u\|}+\frac{\vec v}{\|\vec v\|}.

Using unit vectors is essential — adding u+v\vec u+\vec v directly leans toward the longer vector. Any positive scalar multiple of b\vec b gives the same bisector direction.

Example
Bisector direction between two vectors

Bisect the angle between u=3,0\vec u=\langle 3,0\rangle and v=0,4\vec v=\langle 0,4\rangle.

u^=1,0,v^=0,1,b=u^+v^=1,1.\hat u=\langle 1,0\rangle,\qquad \hat v=\langle 0,1\rangle,\qquad \vec b=\hat u+\hat v=\langle 1,1\rangle .

Its direction angle is tan1(1/1)=45\tan^{-1}(1/1)=45^\circ, exactly halfway between 00^\circ and 9090^\circ. ✓ Note that u+v=3,4\vec u+\vec v=\langle 3,4\rangle (angle 53.153.1^\circ) would have been wrong — it tilts toward the longer v\vec v.

Tip

Work along a path with a constant force: for a constant F\vec F, the work over a path made of straight legs d1,d2,\vec d_1,\vec d_2,\dots is

W=Fd1+Fd2+=F(d1+d2+)=Fdtotal.W=\vec F\cdot\vec d_1+\vec F\cdot\vec d_2+\cdots=\vec F\cdot(\vec d_1+\vec d_2+\cdots)=\vec F\cdot\vec d_{\text{total}} .

So a constant force does path-independent work: only the straight-line displacement from start to finish matters.

Concept
Equilibrium: resultant of several forces is zero

An object is in equilibrium when the forces on it sum to the zero vector:

F=0Fx=0  and  Fy=0.\sum \vec F=\vec 0\quad\Longleftrightarrow\quad \sum F_x=0\ \text{ and }\ \sum F_y=0 .

For a weight hung by two ropes, resolve each tension into components and force both totals to zero. On an inclined plane of angle α\alpha, split gravity into the part WsinαW\sin\alpha down the ramp (balanced by friction/tension) and WcosαW\cos\alpha into the ramp (balanced by the normal force).

Example
Two rope tensions holding a weight

A 100100-lb weight hangs in equilibrium from two ropes: rope 1 pulls up-left at 120120^\circ, rope 2 up-right at 3030^\circ (angles from the positive xx-axis). Find the tensions T1,T2T_1,T_2. Gravity is 0,100\langle 0,-100\rangle. Equilibrium in each axis:

x:T1cos120+T2cos30=0 0.5T1+0.8660T2=0,y:T1sin120+T2sin30100=0 0.8660T1+0.5T2=100.\begin{aligned} x:\quad & T_1\cos 120^\circ+T_2\cos 30^\circ=0 &&\Rightarrow\ -0.5\,T_1+0.8660\,T_2=0,\\ y:\quad & T_1\sin 120^\circ+T_2\sin 30^\circ-100=0 &&\Rightarrow\ 0.8660\,T_1+0.5\,T_2=100. \end{aligned}

From the xx-equation, T1=1.7320T2T_1=1.7320\,T_2. Substitute into the yy-equation:

0.8660(1.7320T2)+0.5T2=100  2.0T2=100  T2=50 lb,  T186.60 lb.0.8660(1.7320\,T_2)+0.5\,T_2=100\ \Longrightarrow\ 2.0\,T_2=100\ \Longrightarrow\ T_2=50\ \text{lb},\ \ T_1\approx 86.60\ \text{lb}.
Example
Navigation: correcting a heading for wind

A plane cruises at airspeed 250250 mph and must travel due north. A wind blows toward the east at 4040 mph, so w=40,0\vec w=\langle 40,0\rangle (East =x=x, North =y=y). The pilot heads slightly west of north by angle φ\varphi, so the air velocity is a=250sinφ, 250cosφ\vec a=\langle -250\sin\varphi,\ 250\cos\varphi\rangle. The ground velocity g=a+w\vec g=\vec a+\vec w must have zero east-west component:

250sinφ+40=0  sinφ=40250=0.16  φ=9.2 west of north.-250\sin\varphi+40=0\ \Longrightarrow\ \sin\varphi=\frac{40}{250}=0.16\ \Longrightarrow\ \varphi=9.2^\circ\ \text{west of north}.

Groundspeed is the surviving north component:

g=250cos9.2=250(0.9871)=246.78 mph.\|\vec g\|=250\cos 9.2^\circ=250(0.9871)=246.78\ \text{mph}.

Answer: steer 9.29.2^\circ west of north; the plane makes good 246.78\approx 246.78 mph northward.

Formulas, Proofs & Tips

Tip
The dot product
uv=u1v1+u2v2=uvcosθ\mathbf{u}\cdot\mathbf{v}=u_1v_1+u_2v_2=|\mathbf{u}||\mathbf{v}|\cos\theta

What it means. Multiply matching components and add; the result also measures how aligned the vectors are.

Example. (1,2)(3,4)=13+24=11(1,2)\cdot(3,4)=1\cdot3+2\cdot4=11.

Why it works. Apply the Law of Cosines to the triangle formed by u\mathbf u, v\mathbf v and vu\mathbf v-\mathbf u. Expanding vu2|\mathbf v-\mathbf u|^2 in components and comparing with u2+v22uvcosθ|\mathbf u|^2+|\mathbf v|^2-2|\mathbf u||\mathbf v|\cos\theta leaves exactly u1v1+u2v2=uvcosθu_1v_1+u_2v_2=|\mathbf u||\mathbf v|\cos\theta.

Tip. A dot product of 00 means the vectors are perpendicular — the fastest perpendicularity test there is.