Difficulty: Intermediate | Prerequisites: Calculus I and II (MATH 115/116 or equivalent). Familiarity with basic vector notation and MATLAB/Octave syntax is helpful but not required.
This lab introduces vectors and their operations in the context of multivariable calculus. You are moving from single-variable functions (curves on a plane) to working with quantities that have both magnitude and direction in two or three dimensions. Vectors, dot products, and angles between vectors form the foundation for nearly everything that follows in Calculus III, from directional derivatives to surface integrals. If you are comfortable with trig functions and basic coordinate geometry, you have what you need to start here.
Vectors can be described by parameter families, where a variable like t controls each component. The dot product lets you compute the angle between two vectors, and dividing a vector by its norm (magnitude) produces a unit vector. These operations are the building blocks for projections, work calculations, and curve analysis in three dimensions.
Parameter family of vectors
A set of vectors whose components are functions of a single variable (the parameter), typically called t. As t changes, you get a different vector from the same formula.
Think of it as: one recipe for a vector, with a dial you can turn to get different outputs.
Norm (magnitude)
The length of a vector, written ‖v‖ or |v|. For a vector v = ⟨a, b, c⟩, the norm is √(a² + b² + c²). The norm is always non-negative.
In simple terms, this means: how long the arrow is, regardless of which direction it points.
Dot product (scalar product)
An operation on two vectors that returns a single number (a scalar). For vectors u = ⟨u₁, u₂, u₃⟩ and v = ⟨v₁, v₂, v₃⟩, the dot product is u · v = u₁v₁ + u₂v₂ + u₃v₃.
Think of it as: a measure of how much two vectors point in the same direction. If the result is zero, they are perpendicular.
Unit vector
A vector with norm equal to 1. You get one by dividing any non-zero vector by its own norm: û = v / ‖v‖.
In simple terms, this means: same direction, but shrunk (or stretched) to exactly length 1.
Orthogonal
Two vectors are orthogonal when their dot product equals zero, meaning they meet at a right angle (90°).
Think of it as: the fancy word for "perpendicular" in vector language.
Radians
The standard unit for measuring angles in calculus. One full revolution = 2π radians. The angle between two vectors is found using θ = arccos(u · v / (‖u‖ ‖v‖)).
In simple terms, this means: the angle unit that makes calculus formulas work cleanly, as opposed to degrees.
A parameter family is a vector-valued function of one variable, e.g. r(t) = ⟨f(t), g(t)⟩ or r(t) = ⟨f(t), g(t), h(t)⟩.
As t varies, each component changes, tracing a path (curve) in 2D or 3D space.
More complex component functions (polynomials, trig functions) produce richer, more informative curves than simple linear ones.
In MATLAB, the parameter t is typically defined as a vector of equally spaced values (e.g. t = linspace(0, 2*pi, 100)).
MATLAB arrays are 1-indexed: the first element is y(1), not y(0).
Accessing an index beyond the array length (e.g. y(502) on a 501-element array) produces an "out of range" error.
This is relevant because parameter families are stored as arrays of discrete sample points.
The norm of v = ⟨a, b, c⟩ is ‖v‖ = √(a² + b² + c²).
In MATLAB, use norm(v) to compute this.
Norms are always non-negative, which is why they are used (rather than raw components) when computing angles: the arccos formula requires positive denominators.
The dot product formula: u · v = u₁v₁ + u₂v₂ + u₃v₃.
In MATLAB: dot(u, v).
The angle between two vectors: θ = arccos(u · v / (‖u‖ · ‖v‖)).
Result is in radians. The lab example computes the angle between Ann Arbor and Portland as 0.41606 radians.
If u · v = 0, the vectors are orthogonal (perpendicular).
The vector w = p − a represents the displacement from point a to point p.
If w is orthogonal to another vector a₁, then dot(w, a₁) ≈ 0 (in the lab, dot(w, a1) = 8.7311 × 10⁻¹⁰, which is effectively zero, confirming orthogonality).
A unit vector points in the same direction as the original but has length 1.
Computed as û = v / ‖v‖.
There are infinitely many vectors orthogonal to a given vector in 3D space, because the set of perpendicular directions forms an entire plane.
\|\mathbf{v}\| = \sqrt{v_1^2 + v_2^2 + v_3^2}\mathbf{u} \cdot \mathbf{v} = u_1 v_1 + u_2 v_2 + u_3 v_3\theta = \arccos\!\left(\frac{\mathbf{u} \cdot \mathbf{v}}{\|\mathbf{u}\|\;\|\mathbf{v}\|}\right)\hat{\mathbf{u}} = \frac{\mathbf{v}}{\|\mathbf{v}\|}The angle-between-vectors formula is how GPS systems and flight planners compute the great-circle distance between two cities on the Earth's surface (as in the Ann Arbor to Portland example). Dot products also underpin computer graphics lighting: the brightness of a surface depends on the angle between the surface normal and the light source direction.
Students often confuse the dot product with the cross product. The dot product returns a scalar (a number). The cross product returns a vector. They are different operations with different uses.
A dot product of approximately zero (like 8.73 × 10⁻¹⁰) does not mean the vectors are "almost" perpendicular. It means they are perpendicular, and the tiny residual is floating-point rounding error, not a real angle.
Students sometimes think there is only one vector perpendicular to a given vector in 3D. There are infinitely many: every vector in the perpendicular plane qualifies.
Forgetting that MATLAB uses 1-based indexing. Trying y(0) will throw an error, not return the first element.
⚠️ Expect to compute the angle between two vectors using the dot product formula. You must use radians, not degrees, unless told otherwise.
⚠️ Know how to normalise a vector (produce a unit vector). This comes up in projections and directional derivatives later in the course.
⚠️ Be able to verify orthogonality by showing that dot(u, v) = 0.
⚠️ Understand what a parameter family is and how changing t traces a curve. This concept returns in parametric curves and line integrals.
True or false: The dot product of two vectors always returns a vector.
Fill in the blank: To find the angle between two vectors, you use the formula θ = arccos( ____ ).
True or false: A unit vector has magnitude 0.
Fill in the blank: If dot(u, v) = 0, the two vectors are ____.
True or false: In 3D, there is exactly one vector perpendicular to any given vector.
Answers: 1. False (it returns a scalar). 2. (u · v) / (‖u‖ ‖v‖). 3. False (magnitude 1). 4. Orthogonal (perpendicular). 5. False (infinitely many).
Q: Given u = ⟨3, −1, 2⟩ and v = ⟨1, 4, −1⟩, compute u · v.
A: u · v = (3)(1) + (−1)(4) + (2)(−1) = 3 − 4 − 2 = −3.
Q: Find the norm of w = ⟨2, −3, 6⟩.
A: ‖w‖ = √(4 + 9 + 36) = √49 = 7.
Q: Find the unit vector in the direction of w = ⟨2, −3, 6⟩.
A: ŵ = ⟨2/7, −3/7, 6/7⟩.
Q: Two vectors have a dot product of 0. What can you conclude about the angle between them?
A: The angle is π/2 radians (90°). They are orthogonal.
Q: Why does the angle formula use norms in the denominator rather than the raw vector components?
A: Dividing by the norms normalises the dot product to fall in the range [−1, 1], which is the domain of arccos. Without the norms, the result would depend on vector length, not just direction.
This connects to parametric curves (Lab 1A, Part 2) because parameter families of vectors define the position along a curve as t varies. The dot product returns later in projections (scalar and vector projections onto a line or plane) and in computing work done by a force along a path. The norm reappears in arc length calculations and in normalising gradient vectors for directional derivatives.
Vector operations, dot product, scalar product, inner product, norm, magnitude, length of a vector, unit vector, normalisation, orthogonal vectors, perpendicular vectors, angle between vectors, arccos formula, parameter family, vector-valued function, MATLAB vectors, Calculus III, MATH 215, multivariable calculus, great-circle distance