MATH-125 · Lesson 1 of 5 · 47 min
Vectors and geometry
Many quantities in engineering cannot be described by a single number. A force of 500 N acting straight up does something very different from 500 N acting sideways. The wind has a speed and a direction. An electric field at a point has a strength and points somewhere. Quantities like these, with both a size and a direction, are called vectors, and they are the starting point of linear algebra.
This chapter builds the toolkit you will use in statics, dynamics, electromagnetics and fluid mechanics: writing vectors in components, adding and scaling them, measuring angles with the dot product, finding perpendicular directions and moments with the cross product, and describing lines and planes in space. Every idea has a picture, and the pictures are worth learning as carefully as the formulas.
What a vector is
A scalar is a quantity described by one number: mass, temperature, time, energy. A vector has a magnitude and a direction: displacement, velocity, force, acceleration, current density. Geometrically, a vector is an arrow. Its length is the magnitude and the way it points is the direction. Two arrows with the same length and direction are the same vector, wherever they are drawn.
To compute with vectors we set up axes and describe each vector by its components, the distances it travels along each axis. In the plane we write \(\mathbf{u} = (u_1, u_2)\); in space, \(\mathbf{u} = (u_1, u_2, u_3)\). Engineers also write \(\mathbf{u} = u_1\mathbf{i} + u_2\mathbf{j} + u_3\mathbf{k}\), where \(\mathbf{i}, \mathbf{j}, \mathbf{k}\) are unit vectors along the \(x\), \(y\) and \(z\) axes. Both notations mean exactly the same thing.
The vector from point \(P\) to point \(Q\) is found by subtracting coordinates: if \(P = (1, 2, 0)\) and \(Q = (4, 6, 0)\), then \(\overrightarrow{PQ} = (3, 4, 0)\). The position vector of a point is the vector from the origin to that point, so its components are just the point's coordinates.
Adding and scaling vectors
Vectors add component by component, and multiplying by a scalar multiplies every component:
Geometrically, to add \(\mathbf{v}\) to \(\mathbf{u}\), place the tail of \(\mathbf{v}\) at the tip of \(\mathbf{u}\). The sum runs from the start of \(\mathbf{u}\) to the end of \(\mathbf{v}\). Doing it in the other order traces the other two sides of a parallelogram and lands in the same place, which is why \(\mathbf{u} + \mathbf{v} = \mathbf{v} + \mathbf{u}\). The sum is the diagonal of the parallelogram.
Scaling by a positive number stretches or shrinks a vector without changing its direction; scaling by a negative number also reverses it. Subtraction is adding the negative: \(\mathbf{u} - \mathbf{v} = \mathbf{u} + (-1)\mathbf{v}\), which is the arrow from the tip of \(\mathbf{v}\) to the tip of \(\mathbf{u}\) when both start at the same point.
In mechanics, the resultant of several forces acting on a particle is their vector sum. If the resultant is zero, the particle is in equilibrium. That single sentence is the foundation of statics.
Worked problem
Resultant of two forces
Two tow ropes pull on a stuck vehicle. One pulls with 300 N along the \(x\)-axis. The other pulls with 200 N at 60° above the \(x\)-axis. Find the magnitude and direction of the resultant.
Show solution
- Write each force in components. \(\mathbf{F}_1 = (300, 0)\) N.
- \(\mathbf{F}_2 = (200\cos 60^\circ,\; 200\sin 60^\circ) = (100,\; 173.2)\) N.
- Add: \(\mathbf{R} = (400,\; 173.2)\) N.
- \[|\mathbf{R}| = \sqrt{400^2 + 173.2^2} = 435.9 \text{ N}, \qquad \theta = \arctan\frac{173.2}{400} = 23.4^\circ\]
Answer: 435.9 N at 23.4° above the x-axis. Note that this is less than 300 + 200 = 500 N: magnitudes do not add unless the vectors point the same way
Magnitude and unit vectors
The magnitude of a vector comes from Pythagoras, applied once in the plane and twice in space:
A unit vector has magnitude 1. Dividing any non-zero vector by its magnitude gives the unit vector in its direction: \(\hat{\mathbf{u}} = \mathbf{u}/|\mathbf{u}|\). Unit vectors carry direction only, so they are the natural way to turn a known direction and a known size into a vector: \(\mathbf{F} = F\,\hat{\mathbf{u}}\).
The components of a unit vector are the cosines of the angles it makes with the axes, called direction cosines. They satisfy \(\cos^2\alpha + \cos^2\beta + \cos^2\gamma = 1\).
Worked problem
Force along a cable
A guy-wire runs from an anchor at the origin to the top of a mast at \((3, 4, 12)\) m. The tension in the wire is 500 N. Write the force the wire exerts on the anchor as a vector.
Show solution
- The direction is the vector from anchor to mast top: \(\mathbf{d} = (3, 4, 12)\).
- \(|\mathbf{d}| = \sqrt{9 + 16 + 144} = \sqrt{169} = 13\) m.
- Unit vector: \(\hat{\mathbf{u}} = (3, 4, 12)/13 = (0.2308,\; 0.3077,\; 0.9231)\).
- \[\mathbf{F} = 500\,\hat{\mathbf{u}} = (115.4,\; 153.8,\; 461.5) \text{ N}\]
- Check: \(\sqrt{115.4^2 + 153.8^2 + 461.5^2} = 500\) N.
Answer: F = (115.4, 153.8, 461.5) N. Most of the tension acts vertically, because the wire is steep
This "unit vector times magnitude" step appears in nearly every three-dimensional statics problem. Cable and member directions are always known from geometry; the tensions are the unknowns.
The dot product
The dot product (or scalar product) of two vectors is a number:
Its geometric meaning comes from the law of cosines. If \(\theta\) is the angle between the vectors (placed tail to tail, with \(0 \le \theta \le 180^\circ\)):
Three consequences are used constantly:
- The angle between two vectors: \(\cos\theta = \dfrac{\mathbf{u}\cdot\mathbf{v}}{|\mathbf{u}||\mathbf{v}|}\).
- Perpendicular test: two non-zero vectors are perpendicular (orthogonal) exactly when \(\mathbf{u}\cdot\mathbf{v} = 0\).
- Length: \(\mathbf{u}\cdot\mathbf{u} = |\mathbf{u}|^2\).
The sign tells you something too. A positive dot product means the angle is acute (the vectors point roughly the same way); negative means obtuse.
Worked problem
Angle between two vectors
Find the angle between \(\mathbf{u} = (1, 2, 2)\) and \(\mathbf{v} = (2, 0, 1)\).
Show solution
- \(|\mathbf{u}| = \sqrt{1 + 4 + 4} = 3\) and \(|\mathbf{v}| = \sqrt{4 + 0 + 1} = \sqrt{5}\).
- \(\mathbf{u}\cdot\mathbf{v} = (1)(2) + (2)(0) + (2)(1) = 4\).
- \[\cos\theta = \frac{4}{3\sqrt{5}} = 0.5963 \;\Rightarrow\; \theta = 53.4^\circ\]
Answer: About 53.4°
Worked problem
Work done by a force
A constant force \(\mathbf{F} = (10, 0, 5)\) N moves a crate through the displacement \(\mathbf{d} = (3, 4, 0)\) m. How much work does it do?
Show solution
- Work is the dot product of force and displacement: \(W = \mathbf{F}\cdot\mathbf{d}\).
- \(W = (10)(3) + (0)(4) + (5)(0) = 30\) J.
- Only the part of the force along the motion does work. The vertical 5 N component does none, because the crate does not move vertically.
Answer: 30 J
Projections and components along a direction
Often you need the part of a vector that lies along some direction: the component of the weight along a ramp, the part of the wind acting along a runway, the share of a load carried along a member. That part is the projection. The scalar component of \(\mathbf{b}\) along \(\mathbf{a}\) and the vector projection are:
What remains, \(\mathbf{b} - \text{proj}_{\mathbf{a}}\mathbf{b}\), is perpendicular to \(\mathbf{a}\). So every vector splits uniquely into a part along a given direction and a part perpendicular to it. This decomposition is how you separate normal and friction forces on a surface, or tension and shear in a member.
Worked problem
Splitting a force
Split \(\mathbf{F} = (10, 0, 5)\) N into a part along \(\mathbf{d} = (3, 4, 0)\) and a part perpendicular to it.
Show solution
- \(\hat{\mathbf{d}} = (3, 4, 0)/5 = (0.6, 0.8, 0)\). Scalar component: \(\mathbf{F}\cdot\hat{\mathbf{d}} = 6 + 0 + 0 = 6\) N.
- Parallel part: \(6\,\hat{\mathbf{d}} = (3.6,\; 4.8,\; 0)\) N.
- Perpendicular part: \((10, 0, 5) - (3.6, 4.8, 0) = (6.4,\; -4.8,\; 5)\) N.
- Check: \((6.4)(3) + (-4.8)(4) + (5)(0) = 19.2 - 19.2 = 0\). Perpendicular, as it should be.
Answer: Parallel part (3.6, 4.8, 0) N; perpendicular part (6.4, −4.8, 5) N. The work in the previous example is 6 N × 5 m = 30 J, the same answer
The cross product
The cross product (or vector product) of two vectors in space is another vector. It is defined by a pattern that is easiest to remember as a determinant (Lesson 4 covers determinants fully):
Its geometry is what makes it useful:
- Direction: \(\mathbf{u}\times\mathbf{v}\) is perpendicular to both \(\mathbf{u}\) and \(\mathbf{v}\), following the right-hand rule. Curl the fingers of your right hand from \(\mathbf{u}\) toward \(\mathbf{v}\); your thumb points along \(\mathbf{u}\times\mathbf{v}\).
- Magnitude: \(|\mathbf{u}\times\mathbf{v}| = |\mathbf{u}||\mathbf{v}|\sin\theta\), which is the area of the parallelogram the two vectors span.
- Parallel test: \(\mathbf{u}\times\mathbf{v} = \mathbf{0}\) exactly when the vectors are parallel (or one is zero).
Unlike every product you have met before, the cross product is not commutative. Swapping the order reverses the direction: \(\mathbf{v}\times\mathbf{u} = -\,\mathbf{u}\times\mathbf{v}\). For the unit vectors, \(\mathbf{i}\times\mathbf{j} = \mathbf{k}\), \(\mathbf{j}\times\mathbf{k} = \mathbf{i}\), \(\mathbf{k}\times\mathbf{i} = \mathbf{j}\), and reversing any of these gives a minus sign.
Worked problem
Computing a cross product and an area
Find \(\mathbf{u}\times\mathbf{v}\) for \(\mathbf{u} = (1, 2, 0)\) and \(\mathbf{v} = (3, 1, 2)\), and the area of the triangle with these two vectors as sides.
Show solution
- \(\mathbf{i}\) component: \(u_2v_3 - u_3v_2 = (2)(2) - (0)(1) = 4\).
- \(\mathbf{j}\) component: \(-(u_1v_3 - u_3v_1) = -[(1)(2) - (0)(3)] = -2\).
- \(\mathbf{k}\) component: \(u_1v_2 - u_2v_1 = (1)(1) - (2)(3) = -5\).
- So \(\mathbf{u}\times\mathbf{v} = (4, -2, -5)\). Check perpendicularity: \((4)(1) + (-2)(2) + (-5)(0) = 0\) and \((4)(3) + (-2)(1) + (-5)(2) = 0\).
- Parallelogram area \(= \sqrt{16 + 4 + 25} = \sqrt{45} = 6.708\). The triangle is half of that.
Answer: u × v = (4, −2, −5); triangle area ≈ 3.354
Moments of forces
The turning effect of a force about a point is its moment (also called torque). If \(\mathbf{r}\) is the vector from the point to anywhere on the force's line of action, the moment is:
Here \(d = r\sin\theta\) is the perpendicular distance from the point to the line of action, often called the moment arm. The direction of \(\mathbf{M}\) is the axis the force tends to rotate about, by the right-hand rule.
Worked problem
Tightening a bolt
A mechanic pushes on the end of a 0.25 m wrench with 150 N, at 70° to the handle. What moment is applied to the bolt?
Show solution
- \(|\mathbf{M}| = rF\sin\theta = (0.25)(150)\sin 70^\circ\).
- \(\sin 70^\circ = 0.9397\), so \(|\mathbf{M}| = 35.2\) N·m.
- If she pushed at 90°, she would get \(0.25 \times 150 = 37.5\) N·m. The 20° error costs only 6%, because \(\sin\theta\) is flat near 90°.
Answer: 35.2 N·m
Worked problem
Moment in three dimensions
A bracket is attached at the origin. A load \(\mathbf{F} = (0, -200, 0)\) N acts at the point \((0.3, 0, 0.2)\) m. Find the moment about the origin.
Show solution
- \(\mathbf{r} = (0.3, 0, 0.2)\), \(\mathbf{F} = (0, -200, 0)\).
- \(\mathbf{i}\): \((0)(0) - (0.2)(-200) = 40\).
- \(\mathbf{j}\): \(-[(0.3)(0) - (0.2)(0)] = 0\).
- \(\mathbf{k}\): \((0.3)(-200) - (0)(0) = -60\).
- \[\mathbf{M} = (40,\; 0,\; -60) \text{ N·m}, \qquad |\mathbf{M}| = \sqrt{40^2 + 60^2} = 72.1 \text{ N·m}\]
Answer: M = (40, 0, −60) N·m. The bolts at the base must resist twisting about two axes at once, which is why 3D moments need vectors
The scalar triple product
Combining both products gives \(\mathbf{a}\cdot(\mathbf{b}\times\mathbf{c})\), a number whose absolute value is the volume of the box (parallelepiped) with edges \(\mathbf{a}\), \(\mathbf{b}\), \(\mathbf{c}\). It is zero exactly when the three vectors lie in one plane. For example, \((1, 0, 0)\cdot\big((0, 2, 0)\times(1, 1, 3)\big) = (1, 0, 0)\cdot(6, 0, -2) = 6\), so those three edges span a box of volume 6. You will see in Lesson 4 that this is a 3×3 determinant.
Lines and planes in space
A line is fixed by a point on it and a direction. If \(\mathbf{p}\) is the position of a point on the line and \(\mathbf{d}\) its direction vector, every point on the line is
This is the parametric form. In components, \(x = p_1 + td_1\), \(y = p_2 + td_2\), \(z = p_3 + td_3\). Think of \(t\) as time and \(\mathbf{d}\) as a velocity: the point slides along the line as \(t\) changes.
A plane is fixed by a point on it and a normal vector \(\mathbf{n}\) perpendicular to it. A point \(\mathbf{r}\) lies on the plane when \(\mathbf{r} - \mathbf{p}\) is perpendicular to \(\mathbf{n}\):
So the coefficients of \(x, y, z\) in a plane's equation are the components of its normal. The plane \(6x + 3y + 2z = 6\) has normal \((6, 3, 2)\).
Worked problem
Plane through three points
Find the equation of the plane through \(A = (1, 0, 0)\), \(B = (0, 2, 0)\) and \(C = (0, 0, 3)\).
Show solution
- Two vectors in the plane: \(\overrightarrow{AB} = (-1, 2, 0)\) and \(\overrightarrow{AC} = (-1, 0, 3)\).
- Their cross product is normal to the plane: \(\mathbf{n} = (2\cdot3 - 0\cdot0,\; -[(-1)(3) - (0)(-1)],\; (-1)(0) - (2)(-1)) = (6, 3, 2)\).
- Using point \(A\): \(6x + 3y + 2z = 6(1) + 0 + 0 = 6\).
- Check \(B\): \(0 + 6 + 0 = 6\). Check \(C\): \(0 + 0 + 6 = 6\).
Answer: 6x + 3y + 2z = 6
The distance from a point \(Q\) to a plane is the length of the projection of \(\overrightarrow{PQ}\) onto the normal, for any point \(P\) on the plane:
Worked problem
Clearance from a sloping surface
A sloping roof panel lies in the plane \(6x + 3y + 2z = 6\) (meters). How far is a sensor at \((2, 2, 2)\) from the panel's plane, and where does the line from the origin in direction \((1, 1, 1)\) hit it?
Show solution
- \(|\mathbf{n}| = \sqrt{36 + 9 + 4} = 7\).
- Distance: \(\dfrac{|6(2) + 3(2) + 2(2) - 6|}{7} = \dfrac{16}{7} = 2.29\) m.
- The line is \((t, t, t)\). Substitute into the plane: \(6t + 3t + 2t = 6\), so \(t = 6/11 = 0.545\).
Answer: Distance 2.29 m; the line meets the plane at (0.545, 0.545, 0.545)
Common mistakes
MistakeAdding magnitudes: "300 N plus 200 N is 500 N" for forces in different directions.
InsteadAdd components, then take the magnitude of the result. Magnitudes add only for vectors pointing the same way.
MistakeWriting a force along a cable as (3, 4, 12) × 500 without dividing by the length.
InsteadTurn the direction into a unit vector first: F = 500 × (3, 4, 12)/13.
MistakeTreating the dot product as a vector, or the cross product as a number.
Insteadu · v is a scalar (work, angle, projection). u × v is a vector (moment, normal, area direction).
MistakeForgetting the minus sign on the j component of a cross product.
InsteadThe pattern is +, −, + across the top row. Check the answer by dotting it with both vectors: both results must be 0.
MistakeAssuming u × v = v × u.
InsteadOrder matters: v × u = −(u × v). In M = r × F, r always comes first.
MistakeUsing the full distance to the force for the moment, M = rF, when the force is not perpendicular.
InsteadUse the perpendicular distance d = r sin θ, or the cross product, which handles the angle automatically.
Summary and key terms
- A vector has magnitude and direction. Write it in components and compute component by component.
- Vectors add tip to tail (the parallelogram rule). A particle is in equilibrium when the vector sum of the forces on it is zero.
- Magnitude is the square root of the sum of squared components. A unit vector is a vector divided by its magnitude, and force = magnitude × unit vector.
- u · v = u₁v₁ + u₂v₂ + u₃v₃ = |u||v| cos θ. It gives angles, work, projections and the perpendicular test.
- u × v is perpendicular to both vectors, with length |u||v| sin θ (the parallelogram area). It gives moments, normals and areas.
- A line is r = p + t d. A plane is n · (r − p) = 0, so the coefficients of x, y, z are the normal vector.
- Vector
- A quantity with magnitude and direction, written by its components.
- Unit vector
- A vector of length 1; carries direction only.
- Resultant
- The vector sum of several forces.
- Dot product
- u · v = |u||v| cos θ, a scalar.
- Orthogonal
- Perpendicular; the dot product is zero.
- Projection
- The part of one vector lying along another.
- Cross product
- u × v, perpendicular to both, length |u||v| sin θ.
- Moment
- M = r × F, the turning effect of a force about a point.
- Normal vector
- A vector perpendicular to a plane.
Practice problems
Work each problem on paper first, then reveal the answer to check.
Find \(|\mathbf{u}|\) and the unit vector in the direction of \(\mathbf{u} = (2, -1, 2)\).
Show answer
|u| = √(4 + 1 + 4) = 3. Unit vector (2/3, −1/3, 2/3).
Forces of 50 N along \(+x\) and 80 N along \(+y\) act on a ring. What single force would hold the ring in equilibrium?
Show answer
Resultant (50, 80) N, magnitude 94.3 N. The balancing force is (−50, −80) N: 94.3 N pointing opposite.
A cable from \((0, 0, 0)\) to \((2, -6, 3)\) m carries 140 N. Write the cable force as a vector.
Show answer
Length √(4 + 36 + 9) = 7. F = 140(2, −6, 3)/7 = (40, −120, 60) N.
Are \((3, -2, 1)\) and \((1, 2, 1)\) perpendicular?
Show answer
Dot product 3 − 4 + 1 = 0, so yes.
Find the angle between \((1, 1, 0)\) and \((0, 1, 1)\).
Show answer
Dot product 1; magnitudes √2 each. cos θ = 1/2, θ = 60°.
A 20 kg box sits on a ramp whose downhill direction is \((4, 0, -3)/5\). Find the component of its weight \((0, 0, -196.2)\) N along the ramp.
Show answer
(0)(0.8) + 0 + (−196.2)(−0.6) = 117.7 N down the ramp.
Compute \((2, 0, 1)\times(1, 3, -1)\) and check your answer.
Show answer
(0·(−1) − 1·3, −(2·(−1) − 1·1), 2·3 − 0·1) = (−3, 3, 6). Dot with (2, 0, 1): −6 + 0 + 6 = 0. Dot with (1, 3, −1): −3 + 9 − 6 = 0.
Find the area of the triangle with vertices \((0, 0, 0)\), \((2, 0, 0)\) and \((0, 3, 4)\).
Show answer
(2, 0, 0) × (0, 3, 4) = (0, −8, 6), length 10. Area = 5.
A 40 N force \(\mathbf{F} = (0, 0, -40)\) acts at \((0.5, 0.2, 0)\) m. Find its moment about the origin.
Show answer
r × F = (0.2·(−40) − 0, −(0.5·(−40) − 0), 0) = (−8, 20, 0) N·m; magnitude 21.5 N·m.
Find the plane through \((1, 1, 1)\) with normal \((2, -1, 3)\), and the distance from the origin to it.
Show answer
2x − y + 3z = 2 − 1 + 3 = 4. Distance 4/√14 ≈ 1.07.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.