Stewart Precalculus Chapter 9 · Vectors

Vectors and the Dot Product

A complete guide to vectors in precalculus: component form, magnitude, unit vectors, vector operations, the dot product formula, angle between vectors, orthogonality, vector projection, and work in physics. Worked examples with every concept.

Quick Reference — Dot Product Formulas

Dot product
u · v = a1 b1 + a2 b2
Angle between
cos θ = (u·v) / (|u||v|)
Orthogonal test
u · v = 0 means perpendicular
Scalar projection
comp_v(u) = (u·v) / |v|
Vector projection
proj_v(u) = ((u·v)/|v|²) v
Work
W = F · D = |F||D| cos θ

1. Vector Definition and Notation

A vector is a quantity that has both magnitude (size) and direction. This distinguishes it from a scalar, which has only magnitude. In precalculus, two-dimensional vectors are written in component form as an ordered pair inside angle brackets.

Component Form

A vector v from point A to point B is written:

v = (b1 - a1, b2 - a2)

From A(1, 3) to B(5, 7): v = (4, 4). The first component is the horizontal change; the second is the vertical change.

Notation

Vectors are written in several equivalent ways:

v = (a, b) [component form]
v = a i + b j [basis form]
v = AB [position notation]

Bold or an arrow overhead signals a vector. Scalars use regular type.

Magnitude (Length) of a Vector

The magnitude of v = (a, b) is found using the Pythagorean theorem on the components. The vector forms the hypotenuse of a right triangle with legs of length a and b.

|v| = square root of (a squared plus b squared)

Example: For v = (3, 4), the magnitude is the square root of (9 + 16) which equals the square root of 25, which equals 5.

Unit Vectors

A unit vector has magnitude exactly 1. To convert any nonzero vector v into a unit vector in the same direction, divide by its magnitude:

u-hat = v divided by |v| = (a/|v|, b/|v|)

For v = (3, 4): u-hat = (3/5, 4/5). Check: magnitude = square root of (9/25 + 16/25) = square root of 1 = 1.

Standard Basis Vectors i and j

The two special unit vectors along the coordinate axes are called the standard basis vectors:

i = (1, 0) — points along the x-axis
j = (0, 1) — points along the y-axis
(a, b) = a i + b j

Example: (5, -3) = 5i - 3j. This notation is common in physics.

2. Vector Addition and Scalar Multiplication

Two fundamental operations on vectors are addition (combining two vectors into one) and scalar multiplication (stretching or shrinking a vector by a number). Both operations work component by component.

OperationFormulaExample
Addition(a, b) + (c, d) = (a+c, b+d)(2, 3) + (1, -5) = (3, -2)
Subtraction(a, b) - (c, d) = (a-c, b-d)(5, 2) - (3, 4) = (2, -2)
Scalar multiplyk(a, b) = (ka, kb)3(2, -1) = (6, -3)
Magnitude|(a, b)| = sqrt(a squared + b squared)|(3, 4)| = sqrt(25) = 5

Geometric Interpretation

Vector addition (tip-to-tail method)

Place the tail of the second vector at the tip of the first. The sum (resultant) goes from the tail of the first to the tip of the second. This is how you add force vectors and velocity vectors in physics.

Scalar multiplication

Multiplying a vector by a positive scalar k stretches it by a factor of k without changing direction. A negative scalar reverses the direction and scales the length. Multiplying by -1 gives the opposite vector.

3. The Dot Product

The dot product (also called the scalar product or inner product) takes two vectors and produces a single number (scalar), not another vector. This distinguishes it from the cross product, which gives a vector. The dot product is one of the most important operations in mathematics and physics.

Component Formula

For u = (a1, a2) and v = (b1, b2):

u · v = a1 × b1 + a2 × b2

Use this form when you know the components. Multiply the first components together, multiply the second components together, then add.

Geometric Formula

Let theta be the angle between u and v (0 to 180 degrees):

u · v = |u| |v| cos(θ)

Use this form when you know magnitudes and the angle. Setting both formulas equal lets you find the angle between two vectors.

Key Insight: Sign of the Dot Product

u · v > 0
Angle is acute (less than 90 degrees). Vectors point roughly the same way.
u · v = 0
Angle is exactly 90 degrees. Vectors are orthogonal (perpendicular).
u · v < 0
Angle is obtuse (greater than 90 degrees). Vectors point mostly opposite ways.

Dot Product Properties

Commutative
u · v = v · u
Order does not matter
Distributive
u · (v + w) = u · v + u · w
Distributes over vector addition
Scalar factor
(cu) · v = c(u · v)
Scalar can move in or out
Self product
v · v = |v|²
Equals the square of the magnitude
Zero vector
0 · v = 0
Zero vector gives scalar zero

The Self Dot Product and Magnitude

When you take the dot product of a vector with itself, you get the square of its magnitude. This gives a useful alternative formula:

v · v = |v| squared, so |v| = square root of (v · v)

Example: v = (3, 4). Then v · v = (3)(3) + (4)(4) = 9 + 16 = 25. So |v| = square root of 25 = 5.

4. Angle Between Two Vectors

Setting the two dot product formulas equal and solving for the angle theta gives one of the most useful formulas in the chapter. This works for any two nonzero vectors in 2D or 3D and always produces an angle between 0 and 180 degrees.

Angle Formula

cos(θ) = (u · v) divided by (|u| times |v|)
θ = arccos( (u · v) divided by (|u| times |v|) )

The result is always in the range 0 to 180 degrees (0 to pi radians). Both vectors must be nonzero for the formula to be defined.

Step-by-Step Procedure

  1. 1.Compute the dot product u dot v using the component formula.
  2. 2.Find the magnitude of u: square root of (a1 squared + a2 squared).
  3. 3.Find the magnitude of v: square root of (b1 squared + b2 squared).
  4. 4.Divide the dot product by the product of the two magnitudes to get cos(theta).
  5. 5.Apply arccos to find theta. Make sure your calculator is set to the correct mode (degrees or radians).

Special Angle Cases

0 degrees (parallel, same direction)
u dot v = |u||v|
Dot product equals product of magnitudes
90 degrees (perpendicular)
u dot v = 0
Dot product equals zero
180 degrees (parallel, opposite direction)
u dot v = -|u||v|
Dot product equals negative product of magnitudes

5. Orthogonal Vectors

Two vectors are orthogonal if the angle between them is exactly 90 degrees. Because cos(90) = 0, the dot product formula immediately gives the orthogonality test: two nonzero vectors are orthogonal if and only if their dot product equals zero.

Orthogonality Test

u and v are orthogonal if and only if u · v = 0

This is the fastest way to check perpendicularity. No angles, no square roots needed — just multiply components and add.

Finding an Orthogonal Vector

Given v = (a, b), a vector orthogonal to v is (-b, a) or (b, -a). Rotating the components and flipping a sign always produces a perpendicular vector.

v = (3, 5) → orthogonal vector: (-5, 3) or (5, -3)

Check: (3)(-5) + (5)(3) = -15 + 15 = 0. Confirmed orthogonal.

Orthogonal vs. Parallel

Orthogonal (perpendicular)

u dot v = 0. The angle is 90 degrees. The vectors form a right angle when placed tail to tail.

Parallel

One vector is a scalar multiple of the other: v = ku for some scalar k. Same direction if k is positive; opposite direction if k is negative.

6. Vector Projection

The projection of u onto v answers the question: how much of u goes in the direction of v? Think of it as the shadow u casts on the line of v when light shines perpendicular to v. The result is a vector parallel to v.

Scalar Projection

The component of u along v (a signed length):

comp_v(u) = (u · v) divided by |v|

This is a scalar. Positive means the projection points in the same direction as v; negative means opposite direction.

Vector Projection

The vector component of u in the direction of v:

proj_v(u) = ((u · v) divided by |v| squared) times v

This is a vector parallel to v. The denominator is |v| squared, not |v|, because we are scaling the unit vector v-hat by the scalar projection.

Decomposing u into Parallel and Perpendicular Parts

Any vector u can be split into two orthogonal components relative to v:

u = proj_v(u) + u_perp
where u_perp = u - proj_v(u)

Here proj_v(u) is parallel to v, and u_perp is orthogonal to v. You can verify orthogonality by checking that u_perp dot v equals 0.

Why this matters: This decomposition appears in physics (resolving forces), computer graphics (lighting calculations), and machine learning (least squares regression).

Alternative Formula Using the Unit Vector

If you define v-hat as the unit vector in the direction of v, the projection formula becomes cleaner:

proj_v(u) = (u · v-hat) times v-hat

Both formulas are equivalent. The unit vector form emphasizes that projection is the dot product of u with the unit vector, scaled back into vector form.

7. Work as a Dot Product (Physics Application)

In physics, the work done by a constant force F on an object moving through displacement D is defined as the dot product of the force and displacement vectors. This captures the key physical insight: only the component of force parallel to the motion actually contributes to work.

Work Formula

W = F · D = |F| |D| cos(θ)

W is measured in Joules (Newton-meters) when F is in Newtons and D is in meters. The angle theta is between the force direction and the displacement direction.

theta = 0 degrees
Force and motion in same direction
W = |F||D| (maximum work)
theta = 90 degrees
Force perpendicular to motion
W = 0 (no work done)
theta = 180 degrees
Force opposes motion
W = -|F||D| (negative work)

Real-World Example: Pulling a Sled

You pull a sled with a rope making a 35-degree angle above horizontal. The force in the rope is 80 Newtons. The sled moves 15 meters horizontally. How much work is done?

W = F dot D = |F| |D| cos(35 degrees)
W = (80)(15) cos(35 degrees)
W = 1200 times 0.8192
W is approximately 983 Joules

The vertical component of force does no work because the sled does not move vertically. The dot product formula handles this automatically.

Worked Examples

Example 1 — Compute the dot product

Find u · v where u = (5, -2) and v = (3, 4).

  1. 1.Write the formula: u · v = a1 b1 + a2 b2
  2. 2.Substitute: u · v = (5)(3) + (-2)(4)
  3. 3.Compute: 15 + (-8) = 15 - 8
  4. 4.Result: u · v = 7
Note: The dot product is 7 (a positive scalar). Since it is positive, the angle between u and v is acute (less than 90 degrees).

Example 2 — Angle between two vectors

Find the angle between u = (2, 1) and v = (-1, 3). Give the answer in degrees.

  1. 1.Dot product: u · v = (2)(-1) + (1)(3) = -2 + 3 = 1
  2. 2.Magnitude of u: |u| = sqrt(4 + 1) = sqrt(5)
  3. 3.Magnitude of v: |v| = sqrt(1 + 9) = sqrt(10)
  4. 4.cos(theta) = 1 divided by (sqrt(5) times sqrt(10)) = 1 divided by sqrt(50) = 1 divided by (5 sqrt 2)
  5. 5.theta = arccos(1 / (5 sqrt 2)) which equals approximately arccos(0.1414)
  6. 6.theta is approximately 81.9 degrees
Note: Because the dot product is positive but small relative to the magnitudes, the angle is acute but close to 90 degrees.

Example 3 — Test for orthogonality

Are the vectors a = (6, -4) and b = (2, 3) orthogonal?

  1. 1.Compute the dot product: a · b = (6)(2) + (-4)(3)
  2. 2.= 12 + (-12)
  3. 3.= 12 - 12
  4. 4.= 0
Note: The dot product equals zero, so a and b are orthogonal (perpendicular). The angle between them is exactly 90 degrees.

Example 4 — Vector projection

Find the vector projection of u = (3, 2) onto v = (4, 0).

  1. 1.Compute u · v = (3)(4) + (2)(0) = 12
  2. 2.Compute |v| squared = 4 squared + 0 squared = 16
  3. 3.Scalar factor = (u · v) divided by |v| squared = 12 divided by 16 = 3/4
  4. 4.proj_v(u) = (3/4) times v = (3/4)(4, 0) = (3, 0)
  5. 5.Perpendicular component = u minus proj_v(u) = (3, 2) minus (3, 0) = (0, 2)
Note: The projection (3, 0) is the shadow of u cast onto the line of v. The remaining part (0, 2) is perpendicular to v. Check: (3, 0) dot (0, 2) = 0. Confirmed orthogonal.

Example 5 — Work done by a force

A force F = (10, 6) Newtons acts on an object that moves along displacement D = (5, 2) meters. Find the work done.

  1. 1.Work W = F · D
  2. 2.W = (10)(5) + (6)(2)
  3. 3.W = 50 + 12
  4. 4.W = 62 Joules
Note: Work is a scalar. Only the component of force in the direction of motion does work. Using the dot product automatically handles the angle between force and displacement.

8. Vectors in Three Dimensions (Brief Introduction)

Everything from the 2D case extends naturally to three dimensions. A 3D vector is an ordered triple (a, b, c) representing displacement along the x, y, and z axes. The dot product formula gains a third term. All the properties and applications remain the same.

3D Formulas

v = (a, b, c) = a i + b j + c k
|v| = sqrt(a squared + b squared + c squared)
u · v = a1 b1 + a2 b2 + a3 b3
cos(θ) = (u · v) divided by (|u| |v|)

Standard Basis Vectors in 3D

i = (1, 0, 0) along the x-axis
j = (0, 1, 0) along the y-axis
k = (0, 0, 1) along the z-axis
(2, -3, 5) = 2i - 3j + 5k

3D Example: Dot Product and Angle

Find the angle between u = (1, 2, 2) and v = (0, 1, -1).

u · v = (1)(0) + (2)(1) + (2)(-1) = 0 + 2 - 2 = 0
Since u · v = 0, the vectors are orthogonal.
The angle between them is exactly 90 degrees.

For a full treatment of 3D vectors including the cross product, parametric equations of lines in space, and equations of planes, see the 3D Vectors guide.

9. Applications in Navigation and Physics

Navigation: Resultant Velocity

A boat heads due east at 12 knots. A current flows N 30 E at 4 knots. Find the resultant velocity and its direction.

  1. 1.Boat velocity vector: B = (12, 0) in (east, north) components
  2. 2.Current direction N 30 E means 30 degrees east of north: C = (4 sin 30, 4 cos 30) = (2, 3.46)
  3. 3.Resultant: R = B + C = (12 + 2, 0 + 3.46) = (14, 3.46)
  4. 4.|R| = square root of (196 + 11.97) = square root of 207.97 is approximately 14.4 knots
  5. 5.Direction: arctan(3.46 / 14) is approximately 13.9 degrees north of east

Physics: Force Along an Incline

A 500-Newton weight rests on a ramp inclined at 25 degrees. Find the component of gravitational force parallel to the ramp (which causes sliding) and perpendicular to the ramp (which presses into the surface).

  1. 1.Gravity vector: F = (0, -500) pointing straight down
  2. 2.Ramp direction (unit vector along ramp, pointing downhill): d = (cos(-25), sin(-25)) = (cos 25, -sin 25)
  3. 3.Parallel component (scalar projection): F dot d = (0)(cos 25) + (-500)(-sin 25) = 500 sin 25 is approximately 211 N
  4. 4.This 211 N is the force pulling the object down the slope
  5. 5.Perpendicular component: 500 cos 25 is approximately 453 N. This is the normal force pressing into the ramp.

Computer Graphics: Lighting (Dot Product in Action)

The dot product is fundamental to 3D graphics. The brightness of a surface at a given point is proportional to the dot product of the surface normal vector and the light direction vector:

brightness = max(0, n-hat · L-hat)

Here n-hat is the unit normal to the surface and L-hat is the unit vector toward the light. When they point the same way (dot product near 1), the surface is brightly lit. When perpendicular (dot product 0), the surface receives no direct light. This is the Lambertian reflectance model used in every rendering engine.

Common Mistakes to Avoid

Thinking the dot product is a vector
The dot product always produces a scalar (number). If your answer is a vector, something went wrong. The cross product produces a vector, not the dot product.
Using |v| instead of |v| squared in the projection formula
The vector projection formula is (u dot v) divided by |v| SQUARED, then multiplied by v. The scalar projection uses |v| (not squared). Keep these straight.
Forgetting that arccos only returns angles between 0 and 180 degrees
The angle formula always gives an angle in [0, 180]. You do not need to worry about which quadrant the vectors are in, because the formula already handles direction through the sign of the dot product.
Confusing orthogonal with zero vector
The zero vector (0, 0) has a zero dot product with everything, but it is not considered orthogonal to any vector because it has no direction. Orthogonality requires both vectors to be nonzero.
Using degrees when the calculator is in radians mode (or vice versa)
After applying arccos, check your calculator mode. If the problem asks for degrees, be in degree mode. If it asks for radians, be in radian mode. A common error is getting an answer of approximately 1.43 when the answer should be 81.9 degrees.

Frequently Asked Questions

What is the dot product formula for two vectors?

For vectors u = (a1, a2) and v = (b1, b2), the dot product is u dot v = a1 times b1 plus a2 times b2. You multiply corresponding components and add the results. Example: (3, 4) dot (2, -1) = 3 times 2 plus 4 times (-1) = 6 - 4 = 2. The result is always a scalar (a plain number), never another vector. In 3D, extend to three components: u dot v = a1 b1 plus a2 b2 plus a3 b3.

How do you find the angle between two vectors using the dot product?

Use the formula cos(theta) = (u dot v) divided by (magnitude of u times magnitude of v). Then take the inverse cosine to find theta. Example: u = (1, 2) and v = (3, -1). Dot product = 3 - 2 = 1. Magnitude of u = sqrt(5). Magnitude of v = sqrt(10). cos(theta) = 1 divided by sqrt(50) = 1 divided by (5 sqrt 2). theta = arccos(1 / (5 sqrt 2)) which is approximately 81.9 degrees. The angle found this way is always between 0 and 180 degrees.

When are two vectors orthogonal (perpendicular)?

Two vectors are orthogonal (perpendicular) when their dot product equals zero. This follows from the angle formula: cos(90 degrees) = 0, so u dot v = magnitude of u times magnitude of v times 0 = 0. To test orthogonality, simply compute the dot product and check if it equals zero. Example: u = (2, 3) and v = (-3, 2). Dot product = (2)(-3) + (3)(2) = -6 + 6 = 0. These vectors are orthogonal.

What is the projection of one vector onto another?

The scalar projection of u onto v (also called the component of u along v) is: comp_v(u) = (u dot v) divided by magnitude of v. The vector projection of u onto v is: proj_v(u) = ((u dot v) divided by (magnitude of v squared)) times v. The vector projection gives you the component of u that lies parallel to v. The perpendicular component is then u minus proj_v(u), which is orthogonal to v. These formulas are used extensively in physics and computer graphics.

How is the dot product used to calculate work in physics?

Work done by a constant force F acting through displacement D is W = F dot D = magnitude of F times magnitude of D times cos(theta), where theta is the angle between the force and displacement vectors. If force and displacement are in the same direction (theta = 0), all the force contributes to work. If perpendicular (theta = 90 degrees), no work is done. Example: Force F = (4, 3) Newtons, displacement D = (6, 0) meters. W = (4)(6) + (3)(0) = 24 Joules.

What are the properties of the dot product?

The dot product satisfies four key properties: (1) Commutative: u dot v = v dot u. (2) Distributive over addition: u dot (v + w) = u dot v + u dot w. (3) Scalar multiplication: (cu) dot v = c(u dot v). (4) Self dot product equals magnitude squared: v dot v = magnitude of v squared. These properties make the dot product a powerful tool for proofs and computations. Note that the dot product is NOT associative in the same way multiplication is, because (u dot v) dot w is undefined - u dot v is a scalar, not a vector.

Practice dot product problems

Work through component calculations, angle problems, projections, and applications with step-by-step solutions. Free to start — no account required.

Start Practicing Free

Related Topics