MAT1052 · Week 6 · Taylor Series, Vectors, Dot Product
Vectors and the dot product
You learn to work with vectors in space, to find length and unit vectors, and to use the dot product for angles, orthogonality, projection and work. All the geometry of the multivariable part is written in this language.
vectorcomponent formmagnitudeunit vectordot productangle between vectorsorthogonalvector projectionscalar componentdirection cosineswork
In the second half of week 6 the subject of the course changes completely: we move from series to the geometry of three-dimensional space. Every topic from here on (lines and planes, surfaces, gradient, directional derivative, tangent plane, Lagrange multipliers) is written in the language of vectors. So being able to do the operations on this page quickly and without mistakes will make the next eight weeks easier. The exam has direct “find the angle / projection / work” questions, but their real importance is that they are used constantly as intermediate steps in later topics.
Golden rules:
Vector = direction + length. Its components are written ⟨v1,v2,v3⟩. PQ = end minus start.
The result of the dot product is a number, not a vector.
If u⋅v=0, the vectors are perpendicular. This is the one-line test for all perpendicularity questions.
In the projection formula the denominator has ∣v∣2 (vector projection), and in the scalar component it has ∣v∣. Do not mix them up.
Vectors: definition and basic operations
In space we denote a point by (x,y,z) and a vector by ⟨v1,v2,v3⟩. The starting point of a vector does not matter; all arrows with the same direction and length are the same vector. The vector from P(x1,y1,z1) to Q(x2,y2,z2) is
PQ=⟨x2−x1,y2−y1,z2−z1⟩.
It is also written with the standard unit vectors as v=v1i+v2j+v3k; i=⟨1,0,0⟩, j=⟨0,1,0⟩, k=⟨0,0,1⟩.
Operation
Formula
Example (u=⟨2,−1,3⟩, v=⟨1,4,−2⟩)
Addition
component by component
u+v=⟨3,3,1⟩
Scalar multiplication
multiply each component
2u=⟨4,−2,6⟩
Length (magnitude)
v12+v22+v32
∣u∣=14
Unit vector
v/∣v∣
141⟨2,−1,3⟩
The length of a unit vector is 1; it carries only direction. If “a vector of length 5 in the direction of v” is asked, you write 5∣v∣v.
Intuition. Addition is “placing end to end”: first go u, then from there go v; the place you reach is u+v. The parallelogram rule says the same thing.
The dot product
Definition.
u⋅v=u1v1+u2v2+u3v3.
Geometric meaning. If θ is the angle between the two vectors (0≤θ≤π), then
Intuition. The dot product answers the question “how much do two vectors face the same direction”. If they point the same way, cosθ=1 and the product is largest. If they are perpendicular, it is 0. If they point opposite ways, it is negative.
Sign of u⋅v
Angle
>0
acute angle (θ<90∘)
=0
perpendicular (θ=90∘), orthogonal
<0
obtuse angle (θ>90∘)
Example 1. The angle between u=⟨2,−1,3⟩ and v=⟨1,4,−2⟩.
Example 2 (perpendicularity).⟨1,2,3⟩ and ⟨3,0,−1⟩: 3+0−3=0, they are perpendicular.
PITFALL · the range of the angle.arccos always gives values in [0,π]. The angle between vectors cannot be negative or greater than 180∘. Use the calculator in the right mode (degrees/radians) and see which one the question wants.
Projection
The projection of u onto v is the shadow formed when you drop a perpendicular from the tip of u onto the line of v.
projvu=(∣v∣2u⋅v)v(vector)
compvu=∣v∣u⋅v=∣u∣cosθ(scalar, signed length)
The projection is parallel to v. And u−projvu is perpendicular to v. This way you can split any vector into two parts, “parallel + perpendicular”. In physics, splitting a force into its components parallel and perpendicular to an inclined plane is exactly this.
Example 3. With the vectors of Example 1: projvu=21−8⟨1,4,−2⟩. The coefficient is negative, so the projection points opposite to v. This is consistent with the angle being obtuse.
TIP · onto which one? In projvu the denominator has the length of the vector onto which you project (v) and the result is in its direction. If you swap u and v you get a completely different vector.
Direction angles and direction cosines
The angles α,β,γ that v makes with the x, y, z axes:
The direction cosines are really the components of the unit vector. That is why the sum of their squares is 1.
Work
If a constant force F moves an object by D, the work done is
W=F⋅D=∣F∣∣D∣cosθ.
Only the component of the force in the direction of motion does work. If the force is perpendicular to the direction of motion, the work is zero.
Example 4.∣F∣=5 N, F=⟨3,0,4⟩ and the object is displaced by ⟨6,0,8⟩ m: W=18+32=50 J. The force and the displacement are in the same direction (D=2F), cosθ=1, W=5⋅10=50. The same result by two routes.
Example 5 (with an angle given). A force of 40 N pulls a box 10 m horizontally with a rope that makes a 60∘ angle with the horizontal: W=40⋅10⋅cos60∘=200 J.
Common mistakes
Wrong
Correct
PQ=P−Q
End minus start: Q−P
Writing the result of the dot product as a vector
The result is a scalar
∣u+v∣=∣u∣+∣v∣
∣u+v∣2=∣u∣2+2u⋅v+∣v∣2
Writing ∣v∣ in the denominator of the projection
In the vector projection it is ∣v∣2
Mixing up projvu and projuv
The result is in the direction of the vector you project onto
Finding the angle in a triangle with the wrong vectors
Both vectors must start at that vertex
Writing the unit vector as v/∣v∣2
v/∣v∣
The angle coming out greater than 180∘
arccos∈[0∘,180∘]
Test yourself
Exam-style questions. Solve them on paper first, then reveal the answer.
Question 1easy
Find the magnitude of v=⟨3,−4,12⟩.
Show answer
13
∣v∣=32+(−4)2+122=9+16+144=169=13.
Question 2easy
Find the unit vector in the direction of v=⟨2,−1,2⟩.
Show answer
⟨2/3,−1/3,2/3⟩
∣v∣=4+1+4=3. The unit vector is ∣v∣v=⟨32,−31,32⟩.
Question 3easy
Compute u⋅v for u=⟨1,2,−3⟩ and v=⟨4,0,2⟩.
Show answer
−2
Multiply the corresponding components and add: 1⋅4+2⋅0+(−3)⋅2=4+0−6=−2. Since it is negative, the angle between them is greater than 90∘.
Question 4easy
Find the angle between u=⟨1,1,0⟩ and v=⟨1,0,1⟩.
Show answer
60∘ (π/3)
u⋅v=1, ∣u∣=∣v∣=2.cosθ=221=21, θ=3π=60∘.
Question 5medium
Find c so that ⟨c,2,−1⟩ and ⟨3,c,4⟩ are orthogonal.
Find the vector projection of u=⟨3,1,2⟩ onto v=⟨1,1,0⟩.
Show answer
⟨2,2,0⟩
projvu=∣v∣2u⋅vv.u⋅v=3+1+0=4, ∣v∣2=2. The result is 2⟨1,1,0⟩=⟨2,2,0⟩.
Question 7medium
Find the scalar component of u=⟨2,3,6⟩ in the direction of v=⟨1,2,2⟩.
Show answer
20/3
The scalar component is compvu=∣v∣u⋅v.u⋅v=2+6+12=20, ∣v∣=3. The result is 320.
Question 8easy
A constant force F=⟨5,2,0⟩ N moves an object from P(1,0,0) to Q(4,3,0) (meters). Find the work done.
Show answer
21 J
The displacement is D=PQ=⟨3,3,0⟩. The work is W=F⋅D=15+6+0=21 J.
Question 9medium
For the triangle with vertices A(0,0,0), B(3,0,0), C(1,2,2), find the angle at A.
Show answer
arccos(1/3)≈70.53∘
The angle is between the two side vectors that start at A: AB=⟨3,0,0⟩, AC=⟨1,2,2⟩. The dot product is 3, the lengths are 3 and 3. cosθ=93=31, θ≈70.53∘.
Question 10medium
If ∣u∣=3, ∣v∣=4 and u⋅v=2, find ∣u+v∣.
Show answer
29
∣u+v∣2=(u+v)⋅(u+v)=∣u∣2+2u⋅v+∣v∣2=9+4+16=29. Square root: 29. (Writing 3+4=7 is wrong; lengths do not add.)
Question 11medium
Find the direction angles α,β,γ of v=⟨1,2,2⟩.
Show answer
α≈70.53∘, β=γ≈48.19∘
∣v∣=3. Direction cosines: cosα=31, cosβ=32, cosγ=32.α=arccos31≈70.53∘, β=γ=arccos32≈48.19∘. Check: cos2α+cos2β+cos2γ=91+94+94=1.
Question 12hard
Write u=⟨4,1,−2⟩ as the sum of a vector parallel to v=⟨2,0,1⟩ and a vector orthogonal to v.
Show answer
⟨512,0,56⟩+⟨58,1,−516⟩
The parallel part is the projection: u⋅v=8+0−2=6, ∣v∣2=5, projvu=56⟨2,0,1⟩=⟨512,0,56⟩. The orthogonal part: u−proj=⟨4−512,1,−2−56⟩=⟨58,1,−516⟩. Check: ⟨58,1,−516⟩⋅⟨2,0,1⟩=516−516=0.
Verification: All vector operations (dot product, length, angle, projection, orthogonal component) were computed numerically in node; the dot product of the orthogonal component came out as 0 (verify/MAT1052/06.mjs, section 06b).
Review card
v = <v1,v2,v3>, PQ = Q - P (end - start)
|v| = √(v1²+v2²+v3²) unit: v/|v| |cv| = |c||v|
u·v = u1v1+u2v2+u3v3 = |u||v|cos θ (the result is a NUMBER)
cos θ = u·v / (|u||v|) θ ∈ [0, π]
u·v = 0 ⇔ perpendicular. u·v > 0 acute angle, u·v < 0 obtuse angle
v·v = |v|² |u+v|² = |u|² + 2u·v + |v|²
proj_v u = (u·v / |v|²) v (vector, in the direction of v)
comp_v u = u·v / |v| (scalar, signed)
perpendicular part = u - proj_v u (check: its dot product with v is 0)
Direction cosines: cos α = v1/|v| ... the sum of squares is 1
Work: W = F·D = |F||D|cos θ (N·m = J)