Learning goals
Find the angle between two vectors and define the dot product a ⃗ ⋅ b ⃗ \vec{a}\cdot\vec{b} a ⋅ b .
Use the properties of the dot product to expand expressions.
Compute a ⃗ ⋅ b ⃗ \vec{a}\cdot\vec{b} a ⋅ b from coordinates and use a ⃗ ⋅ b ⃗ = 0 \vec{a}\cdot\vec{b}=0 a ⋅ b = 0 to test perpendicularity.
Find the angle between two vectors and the angles of a triangle from coordinates.
You pull a sled along the snow with a rope. Only the part of your pull that points along the ground moves the sled; the part that lifts it up is wasted. Physicists capture this with a single number: force times distance times the cosine of the angle between them. Mathematicians turned the same idea into a product of two vectors whose result is a number : the dot product.
The angle between two vectors
Place two nonzero vectors a ⃗ \vec{a} a and b ⃗ \vec{b} b so that they start at the same point O O O . The angle between them, written ( a ⃗ , b ⃗ ) (\vec{a}, \vec{b}) ( a , b ) , is the angle θ \theta θ of the figure, with 0 ∘ ≤ θ ≤ 180 ∘ 0^\circ\le\theta\le 180^\circ 0 ∘ ≤ θ ≤ 18 0 ∘ .
a b θ O The angle θ \theta θ between a ⃗ \vec{a} a and b ⃗ \vec{b} b If θ = 0 ∘ \theta=0^\circ θ = 0 ∘ the vectors point the same way; if θ = 180 ∘ \theta=180^\circ θ = 18 0 ∘ they point opposite ways; if θ = 90 ∘ \theta=90^\circ θ = 9 0 ∘ they are perpendicular, written a ⃗ ⊥ b ⃗ \vec{a}\perp\vec{b} a ⊥ b .
Definition of the dot product
Definition Dot product
For nonzero vectors a ⃗ \vec{a} a and b ⃗ \vec{b} b ,
a ⃗ ⋅ b ⃗ = ∣ a ⃗ ∣ ∣ b ⃗ ∣ cos ( a ⃗ , b ⃗ ) . \vec{a}\cdot\vec{b}=|\vec{a}|\,|\vec{b}|\cos(\vec{a}, \vec{b}). a ⋅ b = ∣ a ∣ ∣ b ∣ cos ( a , b ) .
If a ⃗ = 0 ⃗ \vec{a}=\vec{0} a = 0 or b ⃗ = 0 ⃗ \vec{b}=\vec{0} b = 0 , then a ⃗ ⋅ b ⃗ = 0 \vec{a}\cdot\vec{b}=0 a ⋅ b = 0 .
The result is a number, not a vector. It is positive for an acute angle, negative for an obtuse angle and 0 0 0 for a right angle. In particular a ⃗ ⋅ a ⃗ = ∣ a ⃗ ∣ 2 \vec{a}\cdot\vec{a}=|\vec{a}|^2 a ⋅ a = ∣ a ∣ 2 (the angle is 0 ∘ 0^\circ 0 ∘ and cos 0 ∘ = 1 \cos 0^\circ=1 cos 0 ∘ = 1 ).
Example Work done by a force
You pull a sled with a force of 10 10 10 N along a rope that makes 60 ∘ 60^\circ 6 0 ∘ with the ground. The sled moves 5 5 5 m along the ground. Find the work done.
Solution. Work is the dot product of the force vector and the displacement vector: W = 10 ⋅ 5 ⋅ cos 60 ∘ = 50 ⋅ 1 2 = 25 W=10\cdot 5\cdot\cos 60^\circ=50\cdot\frac12=25 W = 10 ⋅ 5 ⋅ cos 6 0 ∘ = 50 ⋅ 2 1 = 25 joules.
Properties
Theorem Properties of the dot product
For any vectors a ⃗ , b ⃗ , c ⃗ \vec{a}, \vec{b}, \vec{c} a , b , c and number k k k :
a ⃗ ⋅ b ⃗ = b ⃗ ⋅ a ⃗ \vec{a}\cdot\vec{b}=\vec{b}\cdot\vec{a} a ⋅ b = b ⋅ a (commutative),
a ⃗ ⋅ ( b ⃗ + c ⃗ ) = a ⃗ ⋅ b ⃗ + a ⃗ ⋅ c ⃗ \vec{a}\cdot(\vec{b}+\vec{c})=\vec{a}\cdot\vec{b}+\vec{a}\cdot\vec{c} a ⋅ ( b + c ) = a ⋅ b + a ⋅ c (distributive),
( k a ⃗ ) ⋅ b ⃗ = k ( a ⃗ ⋅ b ⃗ ) = a ⃗ ⋅ ( k b ⃗ ) (k\vec{a})\cdot\vec{b}=k(\vec{a}\cdot\vec{b})=\vec{a}\cdot(k\vec{b}) ( k a ) ⋅ b = k ( a ⋅ b ) = a ⋅ ( k b ) ,
a ⃗ ⋅ a ⃗ = ∣ a ⃗ ∣ 2 ≥ 0 \vec{a}\cdot\vec{a}=|\vec{a}|^2\ge 0 a ⋅ a = ∣ a ∣ 2 ≥ 0 .
From these we get the identities
∣ a ⃗ + b ⃗ ∣ 2 = ∣ a ⃗ ∣ 2 + 2 a ⃗ ⋅ b ⃗ + ∣ b ⃗ ∣ 2 , ∣ a ⃗ − b ⃗ ∣ 2 = ∣ a ⃗ ∣ 2 − 2 a ⃗ ⋅ b ⃗ + ∣ b ⃗ ∣ 2 . |\vec{a}+\vec{b}|^2=|\vec{a}|^2+2\,\vec{a}\cdot\vec{b}+|\vec{b}|^2,\qquad |\vec{a}-\vec{b}|^2=|\vec{a}|^2-2\,\vec{a}\cdot\vec{b}+|\vec{b}|^2. ∣ a + b ∣ 2 = ∣ a ∣ 2 + 2 a ⋅ b + ∣ b ∣ 2 , ∣ a − b ∣ 2 = ∣ a ∣ 2 − 2 a ⋅ b + ∣ b ∣ 2 .
The dot product in coordinates
Theorem Coordinate formula
If a ⃗ = ( x 1 , y 1 ) \vec{a}=(x_1, y_1) a = ( x 1 , y 1 ) and b ⃗ = ( x 2 , y 2 ) \vec{b}=(x_2, y_2) b = ( x 2 , y 2 ) , then
a ⃗ ⋅ b ⃗ = x 1 x 2 + y 1 y 2 . \vec{a}\cdot\vec{b}=x_1x_2+y_1y_2. a ⋅ b = x 1 x 2 + y 1 y 2 .
Two consequences follow at once:
a ⃗ ⊥ b ⃗ ⟺ x 1 x 2 + y 1 y 2 = 0 \vec{a}\perp\vec{b}\iff x_1x_2+y_1y_2=0 a ⊥ b ⟺ x 1 x 2 + y 1 y 2 = 0 (for nonzero vectors).
cos ( a ⃗ , b ⃗ ) = x 1 x 2 + y 1 y 2 x 1 2 + y 1 2 x 2 2 + y 2 2 \cos(\vec{a}, \vec{b})=\dfrac{x_1x_2+y_1y_2}{\sqrt{x_1^2+y_1^2}\,\sqrt{x_2^2+y_2^2}} cos ( a , b ) = x 1 2 + y 1 2 x 2 2 + y 2 2 x 1 x 2 + y 1 y 2 .
Example Dot product and angle
For a ⃗ = ( 2 , 3 ) \vec{a}=(2, 3) a = ( 2 , 3 ) and b ⃗ = ( 4 , − 1 ) \vec{b}=(4, -1) b = ( 4 , − 1 ) , find a ⃗ ⋅ b ⃗ \vec{a}\cdot\vec{b} a ⋅ b and the angle between the vectors.
Solution. a ⃗ ⋅ b ⃗ = 2 ⋅ 4 + 3 ⋅ ( − 1 ) = 5 \vec{a}\cdot\vec{b}=2\cdot 4+3\cdot(-1)=5 a ⋅ b = 2 ⋅ 4 + 3 ⋅ ( − 1 ) = 5 . Also ∣ a ⃗ ∣ = 13 |\vec{a}|=\sqrt{13} ∣ a ∣ = 13 and ∣ b ⃗ ∣ = 17 |\vec{b}|=\sqrt{17} ∣ b ∣ = 17 , so
cos ( a ⃗ , b ⃗ ) = 5 13 17 = 5 221 ≈ 0.336. \cos(\vec{a}, \vec{b})=\frac{5}{\sqrt{13}\sqrt{17}}=\frac{5}{\sqrt{221}}\approx 0.336. cos ( a , b ) = 13 17 5 = 221 5 ≈ 0.336.
The angle is about 70.3 ∘ 70.3^\circ 70. 3 ∘ .
Example A perpendicular condition
Find m m m so that a ⃗ = ( 2 , m ) \vec{a}=(2, m) a = ( 2 , m ) and b ⃗ = ( 3 , − 1 ) \vec{b}=(3, -1) b = ( 3 , − 1 ) are perpendicular.
Solution. a ⃗ ⋅ b ⃗ = 6 − m = 0 \vec{a}\cdot\vec{b}=6-m=0 a ⋅ b = 6 − m = 0 , so m = 6 m=6 m = 6 .
Angles in a triangle
To find the angle at a vertex, use the two vectors that leave that vertex.
A B C Triangle A B C ABC A B C Example Angles of a triangle
Find the angles of the triangle with A ( 1 , 2 ) A(1, 2) A ( 1 , 2 ) , B ( 3 , 1 ) B(3, 1) B ( 3 , 1 ) and C ( 2 , 4 ) C(2, 4) C ( 2 , 4 ) .
Solution. A B → = ( 2 , − 1 ) \overrightarrow{AB}=(2, -1) A B = ( 2 , − 1 ) and A C → = ( 1 , 2 ) \overrightarrow{AC}=(1, 2) A C = ( 1 , 2 ) .
At A A A : A B → ⋅ A C → = 2 − 2 = 0 \overrightarrow{AB}\cdot\overrightarrow{AC}=2-2=0 A B ⋅ A C = 2 − 2 = 0 , so ∠ A = 90 ∘ \angle A=90^\circ ∠ A = 9 0 ∘ .
At B B B : B A → = ( − 2 , 1 ) \overrightarrow{BA}=(-2, 1) B A = ( − 2 , 1 ) and B C → = ( − 1 , 3 ) \overrightarrow{BC}=(-1, 3) B C = ( − 1 , 3 ) . The dot product is 2 + 3 = 5 2+3=5 2 + 3 = 5 , and ∣ B A → ∣ = 5 |\overrightarrow{BA}|=\sqrt5 ∣ B A ∣ = 5 , ∣ B C → ∣ = 10 |\overrightarrow{BC}|=\sqrt{10} ∣ B C ∣ = 10 . So cos B = 5 50 = 1 2 \cos B=\frac{5}{\sqrt{50}}=\frac{1}{\sqrt2} cos B = 50 5 = 2 1 and ∠ B = 45 ∘ \angle B=45^\circ ∠ B = 4 5 ∘ .
Angles add to 180 ∘ 180^\circ 18 0 ∘ , so ∠ C = 45 ∘ \angle C=45^\circ ∠ C = 4 5 ∘ .
Key terms
Key terms
English Tiếng Việt angle between two vectors góc giữa hai vectơ dot product tích vô hướng perpendicular vuông góc acute angle góc nhọn obtuse angle góc tù work (physics) công commutative giao hoán distributive phân phối
Summary
a ⃗ ⋅ b ⃗ = ∣ a ⃗ ∣ ∣ b ⃗ ∣ cos ( a ⃗ , b ⃗ ) \vec{a}\cdot\vec{b}=|\vec{a}||\vec{b}|\cos(\vec{a}, \vec{b}) a ⋅ b = ∣ a ∣∣ b ∣ cos ( a , b ) is a number; a ⃗ ⋅ a ⃗ = ∣ a ⃗ ∣ 2 \vec{a}\cdot\vec{a}=|\vec{a}|^2 a ⋅ a = ∣ a ∣ 2 .
It is commutative and distributive, and ∣ a ⃗ ± b ⃗ ∣ 2 = ∣ a ⃗ ∣ 2 ± 2 a ⃗ ⋅ b ⃗ + ∣ b ⃗ ∣ 2 |\vec{a}\pm\vec{b}|^2=|\vec{a}|^2\pm2\vec{a}\cdot\vec{b}+|\vec{b}|^2 ∣ a ± b ∣ 2 = ∣ a ∣ 2 ± 2 a ⋅ b + ∣ b ∣ 2 .
In coordinates, a ⃗ ⋅ b ⃗ = x 1 x 2 + y 1 y 2 \vec{a}\cdot\vec{b}=x_1x_2+y_1y_2 a ⋅ b = x 1 x 2 + y 1 y 2 .
a ⃗ ⊥ b ⃗ ⟺ a ⃗ ⋅ b ⃗ = 0 \vec{a}\perp\vec{b}\iff\vec{a}\cdot\vec{b}=0 a ⊥ b ⟺ a ⋅ b = 0 , and the formula for cos \cos cos gives angles.
Practice
Practice
Find a ⃗ ⋅ b ⃗ \vec{a}\cdot\vec{b} a ⋅ b if ∣ a ⃗ ∣ = 5 |\vec{a}|=5 ∣ a ∣ = 5 , ∣ b ⃗ ∣ = 2 |\vec{b}|=2 ∣ b ∣ = 2 and the angle between them is 60 ∘ 60^\circ 6 0 ∘ .
Find a ⃗ ⋅ b ⃗ \vec{a}\cdot\vec{b} a ⋅ b if ∣ a ⃗ ∣ = 4 |\vec{a}|=4 ∣ a ∣ = 4 , ∣ b ⃗ ∣ = 3 |\vec{b}|=3 ∣ b ∣ = 3 and the angle is 150 ∘ 150^\circ 15 0 ∘ .
Compute a ⃗ ⋅ b ⃗ \vec{a}\cdot\vec{b} a ⋅ b for a ⃗ = ( 1 , − 3 ) \vec{a}=(1, -3) a = ( 1 , − 3 ) and b ⃗ = ( 2 , 5 ) \vec{b}=(2, 5) b = ( 2 , 5 ) .
Find m m m so that a ⃗ = ( m , 4 ) \vec{a}=(m, 4) a = ( m , 4 ) and b ⃗ = ( 2 , − 1 ) \vec{b}=(2, -1) b = ( 2 , − 1 ) are perpendicular.
Find the angle between a ⃗ = ( 1 , 2 ) \vec{a}=(1, 2) a = ( 1 , 2 ) and b ⃗ = ( 3 , 1 ) \vec{b}=(3, 1) b = ( 3 , 1 ) .
Find ∠ A \angle A ∠ A in the triangle with A ( − 1 , 0 ) A(-1, 0) A ( − 1 , 0 ) , B ( 2 , 0 ) B(2, 0) B ( 2 , 0 ) , C ( 2 , 3 ) C(2, 3) C ( 2 , 3 ) .
Let ∣ a ⃗ ∣ = 2 |\vec{a}|=2 ∣ a ∣ = 2 , ∣ b ⃗ ∣ = 3 |\vec{b}|=3 ∣ b ∣ = 3 and a ⃗ ⋅ b ⃗ = − 3 \vec{a}\cdot\vec{b}=-3 a ⋅ b = − 3 . Find ∣ a ⃗ + b ⃗ ∣ |\vec{a}+\vec{b}| ∣ a + b ∣ and ∣ a ⃗ − b ⃗ ∣ |\vec{a}-\vec{b}| ∣ a − b ∣ .
A force of 20 20 20 N moves an object 3 3 3 m along a line, the force making an angle of 30 ∘ 30^\circ 3 0 ∘ with the motion. Find the work (exact value, then to 0.01 0.01 0.01 J).
Challenge. Find a vector b ⃗ \vec{b} b perpendicular to a ⃗ = ( 3 , 4 ) \vec{a}=(3, 4) a = ( 3 , 4 ) with ∣ b ⃗ ∣ = 10 |\vec{b}|=10 ∣ b ∣ = 10 .
Challenge. Show that if ∣ a ⃗ ∣ = ∣ b ⃗ ∣ |\vec{a}|=|\vec{b}| ∣ a ∣ = ∣ b ∣ then ( a ⃗ + b ⃗ ) ⊥ ( a ⃗ − b ⃗ ) (\vec{a}+\vec{b})\perp(\vec{a}-\vec{b}) ( a + b ) ⊥ ( a − b ) . Check it for a ⃗ = ( 3 , 4 ) \vec{a}=(3, 4) a = ( 3 , 4 ) and b ⃗ = ( 5 , 0 ) \vec{b}=(5, 0) b = ( 5 , 0 ) .
Show solutions
5 ⋅ 2 ⋅ cos 60 ∘ = 10 ⋅ 1 2 = 5 5\cdot 2\cdot\cos 60^\circ=10\cdot\frac12=5 5 ⋅ 2 ⋅ cos 6 0 ∘ = 10 ⋅ 2 1 = 5 .
4 ⋅ 3 ⋅ cos 150 ∘ = 12 ⋅ ( − 3 2 ) = − 6 3 4\cdot 3\cdot\cos 150^\circ=12\cdot\left(-\frac{\sqrt3}{2}\right)=-6\sqrt3 4 ⋅ 3 ⋅ cos 15 0 ∘ = 12 ⋅ ( − 2 3 ) = − 6 3 .
1 ⋅ 2 + ( − 3 ) ⋅ 5 = 2 − 15 = − 13 1\cdot 2+(-3)\cdot 5=2-15=-13 1 ⋅ 2 + ( − 3 ) ⋅ 5 = 2 − 15 = − 13 .
2 m − 4 = 0 2m-4=0 2 m − 4 = 0 , so m = 2 m=2 m = 2 .
a ⃗ ⋅ b ⃗ = 3 + 2 = 5 \vec{a}\cdot\vec{b}=3+2=5 a ⋅ b = 3 + 2 = 5 , ∣ a ⃗ ∣ = 5 |\vec{a}|=\sqrt5 ∣ a ∣ = 5 , ∣ b ⃗ ∣ = 10 |\vec{b}|=\sqrt{10} ∣ b ∣ = 10 . cos = 5 50 = 1 2 \cos=\frac{5}{\sqrt{50}}=\frac1{\sqrt2} cos = 50 5 = 2 1 , so the angle is 45 ∘ 45^\circ 4 5 ∘ .
A B → = ( 3 , 0 ) \overrightarrow{AB}=(3, 0) A B = ( 3 , 0 ) and A C → = ( 3 , 3 ) \overrightarrow{AC}=(3, 3) A C = ( 3 , 3 ) . Dot product 9 9 9 ; lengths 3 3 3 and 3 2 3\sqrt2 3 2 . cos A = 9 9 2 = 1 2 \cos A=\frac{9}{9\sqrt2}=\frac1{\sqrt2} cos A = 9 2 9 = 2 1 , so ∠ A = 45 ∘ \angle A=45^\circ ∠ A = 4 5 ∘ .
∣ a ⃗ + b ⃗ ∣ 2 = 4 − 6 + 9 = 7 |\vec{a}+\vec{b}|^2=4-6+9=7 ∣ a + b ∣ 2 = 4 − 6 + 9 = 7 , so 7 \sqrt7 7 . ∣ a ⃗ − b ⃗ ∣ 2 = 4 + 6 + 9 = 19 |\vec{a}-\vec{b}|^2=4+6+9=19 ∣ a − b ∣ 2 = 4 + 6 + 9 = 19 , so 19 \sqrt{19} 19 .
W = 20 ⋅ 3 ⋅ cos 30 ∘ = 60 ⋅ 3 2 = 30 3 ≈ 51.96 W=20\cdot 3\cdot\cos 30^\circ=60\cdot\frac{\sqrt3}{2}=30\sqrt3\approx 51.96 W = 20 ⋅ 3 ⋅ cos 3 0 ∘ = 60 ⋅ 2 3 = 30 3 ≈ 51.96 J.
Let b ⃗ = ( x , y ) \vec{b}=(x, y) b = ( x , y ) . Then 3 x + 4 y = 0 3x+4y=0 3 x + 4 y = 0 , so b ⃗ = t ( 4 , − 3 ) \vec{b}=t(4, -3) b = t ( 4 , − 3 ) . ∣ b ⃗ ∣ = 5 ∣ t ∣ = 10 |\vec{b}|=5|t|=10 ∣ b ∣ = 5∣ t ∣ = 10 gives t = ± 2 t=\pm2 t = ± 2 . So b ⃗ = ( 8 , − 6 ) \vec{b}=(8, -6) b = ( 8 , − 6 ) or b ⃗ = ( − 8 , 6 ) \vec{b}=(-8, 6) b = ( − 8 , 6 ) .
( a ⃗ + b ⃗ ) ⋅ ( a ⃗ − b ⃗ ) = ∣ a ⃗ ∣ 2 − ∣ b ⃗ ∣ 2 = 0 (\vec{a}+\vec{b})\cdot(\vec{a}-\vec{b})=|\vec{a}|^2-|\vec{b}|^2=0 ( a + b ) ⋅ ( a − b ) = ∣ a ∣ 2 − ∣ b ∣ 2 = 0 . Check: a ⃗ + b ⃗ = ( 8 , 4 ) \vec{a}+\vec{b}=(8, 4) a + b = ( 8 , 4 ) , a ⃗ − b ⃗ = ( − 2 , 4 ) \vec{a}-\vec{b}=(-2, 4) a − b = ( − 2 , 4 ) and − 16 + 16 = 0 -16+16=0 − 16 + 16 = 0 . ✓ (This says the diagonals of a rhombus are perpendicular.)