Engineering Mathematics · Lesson 6 of 28
Vectors and Three-Dimensional Geometry
Work with vectors in space, addition and resolution, the dot and cross products, magnitude and direction cosines, unit vectors, and the equations of lines and planes with their distances, each rule carried all the way to a clean number.
15 min read · Super EaFree lesson
A vector carries both a size and a direction, and once you learn to break one into components the hardest-looking space problem becomes ordinary arithmetic. The MSTE paper reaches for vectors whenever a force, a velocity, a moment, or a line in space appears, and the same two products, the dot product and the cross product, answer almost every question the board can ask about angles, projections, areas, and normals. This lesson builds the toolkit from the component up and carries each formula to a number with units so you can check your own habits against it.
Vectors, components, and magnitude
A vector in space is written with its three components along the coordinate axes, A = Ax i + Ay j + Az k, where i, j, and k are the unit vectors pointing along the positive x, y, and z axes. The magnitude (length) of A comes straight from the three-dimensional Pythagorean theorem:
|A| = sqrt(Ax^2 + Ay^2 + Az^2)
Worked example: Find the magnitude of A = 2i + 3j + 6k. Square and add the components: |A| = sqrt(2^2 + 3^2 + 6^2) = sqrt(4 + 9 + 36) = sqrt(49) = 7. The classic slips are to add the components (2 + 3 + 6 = 11) or to forget the square root and report 49.
Unit vectors and direction cosines
A unit vector has magnitude 1 and records pure direction. To turn any nonzero vector into its unit vector, divide by its own length:
u = A / |A|
The three components of that unit vector are exactly the direction cosines: cos(alpha), cos(beta), and cos(gamma), the cosines of the angles the vector makes with the positive x, y, and z axes. Each is a component over the magnitude, cos(alpha) = Ax/|A|, cos(beta) = Ay/|A|, cos(gamma) = Az/|A|. Because they come from a unit vector, they always satisfy
cos^2(alpha) + cos^2(beta) + cos^2(gamma) = 1
which is the fastest way to catch an arithmetic error: if your three direction cosines do not square to 1, one of them is wrong.
Worked example: For A = 2i + 3j + 6k with |A| = 7, the direction cosines are cos(alpha) = 2/7 = 0.286, cos(beta) = 3/7 = 0.429, and cos(gamma) = 6/7 = 0.857, so the angle with the z axis is gamma = arccos(0.857) = 31.0 degrees. Check: (2/7)^2 + (3/7)^2 + (6/7)^2 = (4 + 9 + 36)/49 = 49/49 = 1. The unit vector is u = (2/7)i + (3/7)j + (6/7)k. A common miss is dividing by the wrong length, such as 11, which throws every cosine off and breaks the sum-of-squares check.
Adding and resolving vectors
Adding vectors is done one component at a time: A + B = (Ax + Bx)i + (Ay + By)j + (Az + Bz)k. Geometrically this is the tip-to-tail rule, place the tail of B at the tip of A, and the resultant runs from the start of A to the tip of B. The same resultant is the diagonal of the parallelogram built on A and B, which is why the parallelogram law and the tip-to-tail rule always agree. A scalar multiple k A simply stretches every component by k.
Resolution is the reverse move: given a magnitude and a direction, find the components. In a plane, a force of magnitude F at angle theta above the horizontal has Fx = F cos(theta) and Fy = F sin(theta). In space, multiply the magnitude by the direction cosines: Ax = |A| cos(alpha), and likewise for the other two.
Worked example (addition): For A = 3i + 2j - k and B = i - 4j + 2k, add componentwise: A + B = (3 + 1)i + (2 - 4)j + (-1 + 2)k = 4i - 2j + k. Worked example (resolution): A 100 N force acts at 30 degrees above the horizontal. Its horizontal component is Fx = 100 cos(30 degrees) = 100(0.866) = 86.6 N and its vertical component is Fy = 100 sin(30 degrees) = 100(0.5) = 50 N. Swapping sine and cosine, so that the horizontal part becomes 50 N, is the standard error.
The dot product: angle, projection, and work
The dot product multiplies two vectors to give a single number (a scalar). Two equivalent formulas define it:
A . B = Ax Bx + Ay By + Az Bz = |A| |B| cos(theta)
Setting the two forms equal solves for the angle between the vectors, cos(theta) = (A . B) / (|A| |B|). Three facts follow at once. First, the dot product is zero exactly when the vectors are perpendicular, since cos(90 degrees) = 0, which makes it the quickest perpendicularity test there is. Second, the scalar projection of A onto B (the shadow A casts along B) is A . B / |B|. Third, the work done by a constant force F over a displacement d is W = F . d.
Worked example (angle): For A = 2i + 2j - k and B = 6i + 3j + 2k, the dot product is A . B = (2)(6) + (2)(3) + (-1)(2) = 12 + 6 - 2 = 16. The magnitudes are |A| = sqrt(4 + 4 + 1) = 3 and |B| = sqrt(36 + 9 + 4) = 7, so cos(theta) = 16/(3)(7) = 16/21 = 0.762 and theta = 40.4 degrees. Worked example (perpendicular): For A = 3i - j + 2k and B = 2i + 4j - k, A . B = 6 - 4 - 2 = 0, so the vectors are perpendicular without computing a single magnitude. Worked example (work): A force F = 12i - 3j + 4k N pushes a body through displacement d = 2i + 2j + k m, so W = F . d = 24 - 6 + 4 = 22 J.
The cross product: area, moment, and the normal vector
The cross product multiplies two vectors to give a third vector, one that is perpendicular to both. It is computed as a determinant:
A x B = (Ay Bz - Az By) i - (Ax Bz - Az Bx) j + (Ax By - Ay Bx) k
Its magnitude is |A x B| = |A| |B| sin(theta), which equals the area of the parallelogram spanned by A and B, so half of it is the area of the triangle with A and B as two sides. Its direction is set by the right-hand rule: point your fingers from A toward B and your thumb points along A x B. Because the result is perpendicular to the plane of A and B, the cross product is the standard way to build a normal vector to a plane, and because a moment is a turning effect it is computed as M = r x F.
Worked example (cross product and area): For A = 2i - j + 3k and B = i + 2j - k, the determinant gives A x B = ((-1)(-1) - (3)(2))i - ((2)(-1) - (3)(1))j + ((2)(2) - (-1)(1))k = (1 - 6)i - (-2 - 3)j + (4 + 1)k = -5i + 5j + 5k. Its magnitude, the parallelogram area, is |A x B| = sqrt((-5)^2 + 5^2 + 5^2) = sqrt(75) = 8.66 square units, so the triangle on A and B has area 8.66/2 = 4.33 square units. Worked example (moment): A force F = 100j N acts at a position r = 0.3i m from a pivot. The moment is M = r x F, with magnitude |r| |F| sin(90 degrees) = (0.3)(100)(1) = 30 N.m, directed along +k.
The two products answer different questions, and mixing them up is the most common vector mistake on the board.
| Feature | Dot product A . B | Cross product A x B |
|---|---|---|
| Result | a scalar (a number) | a vector |
| Component formula | Ax Bx + Ay By + Az Bz | the i, j, k determinant above |
| Geometric size | A | |
| Equals zero when | vectors are perpendicular | vectors are parallel |
| Main uses | angle, projection, work | area, moment, normal vector |
Lines and planes in space
A line in space is fixed by one point P0(x0, y0, z0) and a direction vector d = (a, b, c). Feeding a parameter t through the point in the direction d gives the parametric equations, and eliminating t gives the symmetric form:
x = x0 + a t, y = y0 + b t, z = z0 + c t, so (x - x0)/a = (y - y0)/b = (z - z0)/c
A plane is fixed by one point and a normal vector n = (A, B, C) that stands perpendicular to it. Because every vector lying in the plane must be perpendicular to n, the point-normal form and its tidy general form are
A(x - x0) + B(y - y0) + C(z - z0) = 0, which rearranges to Ax + By + Cz + D = 0
The key habit: in Ax + By + Cz + D = 0 the coefficients (A, B, C) read off directly as the normal vector, which is what you feed into the angle and distance formulas below.
| Object | You are given | Equation to write |
|---|---|---|
| Line | point (x0, y0, z0) and direction (a, b, c) | (x - x0)/a = (y - y0)/b = (z - z0)/c |
| Plane | point (x0, y0, z0) and normal (A, B, C) | A(x - x0) + B(y - y0) + C(z - z0) = 0 |
Worked example (line): The line through (1, 2, 3) with direction (2, -1, 4) is x = 1 + 2t, y = 2 - t, z = 3 + 4t, or in symmetric form (x - 1)/2 = (y - 2)/(-1) = (z - 3)/4. Worked example (plane): The plane through (1, -2, 3) with normal n = (2, 1, -2) is 2(x - 1) + 1(y + 2) - 2(z - 3) = 0. Expanding, 2x - 2 + y + 2 - 2z + 6 = 0, which tidies to 2x + y - 2z + 6 = 0.
Distances in three-dimensional space
The straight-line distance between two points is the three-dimensional distance formula, the same Pythagorean idea with a third term:
d = sqrt[(x2 - x1)^2 + (y2 - y1)^2 + (z2 - z1)^2]
The distance from a point (x0, y0, z0) to the plane Ax + By + Cz + D = 0 mirrors the plane-geometry formula, dividing by the length of the normal vector:
d = |A x0 + B y0 + C z0 + D| / sqrt(A^2 + B^2 + C^2)
Angles in space also reduce to the two products. The angle between two planes is the angle between their normals, cos(theta) = |n1 . n2| / (|n1| |n2|), and the angle between a line and a plane uses sin(theta) = |d . n| / (|d| |n|), because the line direction d is measured against the plane's normal n.
Worked example (point to point): The distance between P(1, 1, 1) and Q(3, 4, 7) is d = sqrt[(3 - 1)^2 + (4 - 1)^2 + (7 - 1)^2] = sqrt(4 + 9 + 36) = sqrt(49) = 7. Worked example (point to plane): The distance from (3, 1, -1) to 2x + y - 2z + 6 = 0 is d = |2(3) + 1(1) - 2(-1) + 6| / sqrt(2^2 + 1^2 + (-2)^2) = |6 + 1 + 2 + 6| / sqrt(9) = 15/3 = 5. Forgetting to divide by the length of the normal and reporting 15 is the standard miss. Worked example (angle between planes): For normals n1 = (2, 1, -2) and n2 = (1, 2, 2), n1 . n2 = 2 + 2 - 4 = 0, so the planes are perpendicular, theta = 90 degrees.
Exam-day strategy
- For a magnitude, square the components and add before taking one square root; never add the components first, and never skip the final root.
- Sanity-check any set of direction cosines by squaring and adding them: the total must be exactly 1, or an arithmetic error has crept in.
- Read the product the question wants: an angle, a projection, or work is a dot product (scalar answer), while an area, a moment, or a normal vector is a cross product (vector answer).
- Use the dot product as an instant perpendicularity test (A . B = 0) and the cross product as an instant parallelism test (A x B = 0), before reaching for magnitudes.
- Pull the normal (A, B, C) straight out of a plane written as Ax + By + Cz + D = 0, then feed it into the distance formula and remember to divide by sqrt(A^2 + B^2 + C^2).
- To resolve a magnitude into space components, multiply by the direction cosines; to resolve a planar force, adjacent uses cosine and opposite uses sine, never the other way around.
Marking it done updates your Exam-Ready progress.
Lesson quiz
Check you actually have it
20 items on this lesson alone, randomized each try, with the reasoning on every answer.
Vectors and Three-Dimensional Geometry: quick check
Item 01 / 20 · Score 0
What is the distance from the point (3, 1, -1) to the plane 2x + y - 2z + 6 = 0?
This whole first section is free
Read every lesson in Engineering Mathematics and take its quizzes free. The full CELE reviewer unlocks the other 5 subjects, all section tests, and the timed mock exams — one payment, lifetime access, ₱399.
Unlock the full reviewer