Vectors in three dimensions, dot product, cross product, equations of lines and planes in 3D space — the complete guide for precalculus and multivariable calculus.
Three-dimensional space is described by three mutually perpendicular axes: x, y, and z. Every point is an ordered triple (x, y, z). The three coordinate planes — the xy-plane, xz-plane, and yz-plane — divide space into eight octants.
z = 0
Contains all points where z = 0. Equivalent to the familiar 2D coordinate plane.
y = 0
Contains all points where y = 0. Extends along the x and z directions.
x = 0
Contains all points where x = 0. The plane you see when looking along the positive x-axis.
The distance between P₁(x₁, y₁, z₁) and P₂(x₂, y₂, z₂) extends the Pythagorean theorem into three dimensions:
Example: distance from (1, 2, 3) to (4, 6, 3): d = √(9 + 16 + 0) = √25 = 5
A vector v = (a, b, c) = ai + bj + ck has components a, b, c along the x, y, z axes respectively.
Vector Addition
Add corresponding components. Geometrically this is the tip-to-tail rule: place the tail of the second vector at the tip of the first.
(1, 2, 3) + (4, −1, 2) = (5, 1, 5)
Scalar Multiplication
Multiply each component by the scalar c. Positive c scales the vector; negative c reverses direction and scales.
3 · (2, −1, 4) = (6, −3, 12)
Vector Subtraction
Subtract corresponding components. The vector from point A to point B is B − A (not A − B).
(5, 3, 1) − (2, 7, −1) = (3, −4, 2)
Magnitude (Length)
The length of the vector, always non-negative. Zero only for the zero vector (0, 0, 0).
|(3, 4, 0)| = √(9 + 16 + 0) = 5
Unit Vector
Divide each component by the magnitude to get a vector of length 1 pointing in the same direction.
v = (2, −1, 2): |v| = 3, û = (2/3, −1/3, 2/3)
The dot product (also called the scalar product or inner product) takes two vectors and returns a single number. It encodes the angle between the vectors.
Angle between the vectors is acute (0° < θ < 90°). The vectors point generally in the same direction.
The vectors are orthogonal (perpendicular). The angle between them is exactly 90°.
Angle between the vectors is obtuse (90° < θ < 180°). The vectors point generally in opposite directions.
The vectors are parallel and pointing in the same direction. θ = 0° and cos(0°) = 1.
The result is always in [0°, 180°]. Compute the dot product, divide by the product of the magnitudes, then take the inverse cosine.
The scalar projection (component of a along b) is comp_b(a) = a · b / |b|. The vector projection is that scalar times the unit vector b̂.
The cross product a × b produces a new vector perpendicular to both a and b. Its magnitude equals the area of the parallelogram spanned by the two vectors. The cross product is only defined in three dimensions.
a = (a₁, a₂, a₃), b = (b₁, b₂, b₃)
a × b = (a₂b₃ − a₃b₂, a₃b₁ − a₁b₃, a₁b₂ − a₂b₁)
Expand the determinant of the 3×3 matrix with i, j, k in the first row:
| i j k |
| a₁ a₂ a₃ |
| b₁ b₂ b₃ |
= i(a₂b₃ − a₃b₂) − j(a₁b₃ − a₃b₁) + k(a₁b₂ − a₂b₁)
Point fingers of your right hand in the direction of a, curl them toward b. Your thumb points in the direction of a × b. Swapping order reverses direction: b × a = −(a × b).
The area of the parallelogram with sides a and b equals |a × b| = |a||b|sin(θ). The area of the triangle formed by a and b is half that: (1/2)|a × b|.
| Cross Product | Result | Cross Product | Result |
|---|---|---|---|
| i × j | k | j × i | −k |
| j × k | i | k × j | −i |
| k × i | j | i × k | −j |
| i × i | 0 | j × j | 0 |
Cyclic rule: i → j → k → i gives positive cross products; reversing gives negative.
A line in 3D space is determined by a point on it and a direction vector. Unlike 2D, you cannot describe a line with a single equation — you need parametric or symmetric form.
Line through P₀(x₀, y₀, z₀) with direction vector d = (a, b, c):
x = x₀ + at
y = y₀ + bt
z = z₀ + ct
The parameter t ranges over all real numbers. At t = 0 you get the starting point P₀; as t increases or decreases you move along the line.
Solve each parametric equation for t and set the expressions equal:
If any direction component is 0 (say b = 0), that coordinate is fixed: y = y₀, and the other two form a ratio. Direction vectors for parallel lines are scalar multiples of each other.
Any non-zero scalar multiple of d works as a direction vector. Common sources:
A plane in 3D space is determined by a normal vector (perpendicular to the plane) and any point on the plane. Unlike a line, a plane can be described by a single equation.
Plane with normal n = (a, b, c) through point P₀(x₀, y₀, z₀):
a(x − x₀) + b(y − y₀) + c(z − z₀) = 0
Simplified: ax + by + cz = d
Where d = ax₀ + by₀ + cz₀. The coefficients (a, b, c) of x, y, z are always the components of the normal vector.
If the plane crosses the axes at (p, 0, 0), (0, q, 0), and (0, 0, r), then:
Useful when intercepts are given or easily read. Multiply through to put in standard form.
Given three non-collinear points A, B, C:
Two planes are parallel if and only if their normal vectors are parallel (scalar multiples). Example: 2x + y − 3z = 4 and 4x + 2y − 6z = 1 are parallel (normals (2,1,−3) and (4,2,−6) = 2(2,1,−3)).
Two planes are perpendicular if and only if their normal vectors are orthogonal (dot product = 0). The line of intersection of two perpendicular planes has direction vector n₁ × n₂.
The shortest distance from a point to a plane is measured along the normal direction.
For point P₁(x₁, y₁, z₁) and plane ax + by + cz + d = 0 (note: bring d to the left side first):
Example: Distance from (1, 2, 3) to plane 2x − y + 2z = 5
Rewrite: 2x − y + 2z − 5 = 0, so a=2, b=−1, c=2, d=−5
Numerator: |2(1) + (−1)(2) + 2(3) − 5| = |2 − 2 + 6 − 5| = 1
Denominator: √(4 + 1 + 4) = √9 = 3
Distance = 1/3
a = (3, −1, 2), b = (1, 4, −2)
Step 1: Dot product: 3(1) + (−1)(4) + 2(−2) = 3 − 4 − 4 = −5
Step 2: |a| = √(9 + 1 + 4) = √14
Step 3: |b| = √(1 + 16 + 4) = √21
Step 4: cos(θ) = −5 / (√14 · √21) = −5 / √294
Step 5: θ = arccos(−5 / √294) ≈ arccos(−0.2915) ≈ 106.9°
The angle is approximately 107°. Since a · b < 0, the angle is obtuse ✓
a = (1, 2, 0), b = (3, 0, 4)
Cross product components:
i: (2)(4) − (0)(0) = 8
j: −[(1)(4) − (0)(3)] = −4
k: (1)(0) − (2)(3) = −6
a × b = (8, −4, −6)
Verify orthogonality: (8,−4,−6)·(1,2,0) = 8 − 8 + 0 = 0 ✓
(8,−4,−6)·(3,0,4) = 24 + 0 − 24 = 0 ✓
|a × b| = √(64 + 16 + 36) = √116 = 2√29 ≈ 10.77
Area of parallelogram ≈ 10.77. Area of triangle = 5.39.
Points: A(1, −1, 2) and B(3, 3, 0)
Direction vector: d = B − A = (2, 4, −2) = 2(1, 2, −1)
Use simplified direction (1, 2, −1) and point A(1, −1, 2):
Parametric:
x = 1 + t, y = −1 + 2t, z = 2 − t
Symmetric:
(x − 1)/1 = (y + 1)/2 = (z − 2)/(−1)
Verify B: t = 2 → x=3, y=3, z=0 = B ✓
A(2, 0, 0), B(0, 3, 0), C(0, 0, 4)
AB = B − A = (−2, 3, 0)
AC = C − A = (−2, 0, 4)
Normal n = AB × AC:
i: (3)(4) − (0)(0) = 12
j: −[(−2)(4) − (0)(−2)] = 8
k: (−2)(0) − (3)(−2) = 6
n = (12, 8, 6) = 2(6, 4, 3)
Using n = (6, 4, 3) and A(2, 0, 0):
6(x−2) + 4y + 3z = 0 → 6x + 4y + 3z = 12
Plane: 6x + 4y + 3z = 12. Verify: B: 0+12+0=12 ✓, C: 0+0+12=12 ✓
Find the projection of a = (1, 3, 2) onto b = (2, 1, −1)
a · b = 2 + 3 − 2 = 3
|b|² = 4 + 1 + 1 = 6
Scalar projection: comp_b(a) = 3/√6 = √6/2 ≈ 1.22
Vector projection: (3/6) · (2, 1, −1) = (1/2)(2, 1, −1) = (1, 1/2, −1/2)
Orthogonal component: a − proj = (1−1, 3−1/2, 2+1/2) = (0, 5/2, 5/2)
Verify orthogonality: (0, 5/2, 5/2)·(2, 1, −1) = 0 + 5/2 − 5/2 = 0 ✓
| Concept | Formula | Notes |
|---|---|---|
| Magnitude | |v| = √(a²+b²+c²) | Always ≥ 0 |
| Dot Product | a·b = a₁b₁+a₂b₂+a₃b₃ | Scalar result |
| Angle | θ = arccos(a·b / |a||b|) | 0° ≤ θ ≤ 180° |
| Cross Product | a×b = (a₂b₃−a₃b₂, a₃b₁−a₁b₃, a₁b₂−a₂b₁) | Vector result |
| Area Parallelogram | |a×b| | = |a||b|sin(θ) |
| Line (parametric) | r = r₀ + td | t ∈ ℝ |
| Line (symmetric) | (x−x₀)/a = (y−y₀)/b = (z−z₀)/c | Direction (a,b,c) |
| Plane | a(x−x₀) + b(y−y₀) + c(z−z₀) = 0 | Normal (a,b,c) |
| Point-to-Plane Dist | |ax₁+by₁+cz₁+d| / √(a²+b²+c²) | Plane: ax+by+cz+d=0 |
| Vector Projection | proj_b(a) = (a·b/|b|²)b | Onto vector b |
A vector in three dimensions is a quantity with both magnitude and direction, represented as an ordered triple (a, b, c) or in component form as v = ai + bj + ck, where i = (1,0,0), j = (0,1,0), and k = (0,0,1) are the standard unit vectors along the x, y, and z axes. The scalars a, b, c are the components of the vector. For example, the vector from point P(1, 2, 3) to point Q(4, 0, 7) is PQ = (4−1, 0−2, 7−3) = (3, −2, 4). This is different from a point: vectors have direction and magnitude but no fixed position.
The magnitude (or length) of a vector v = (a, b, c) is |v| = √(a² + b² + c²). This is the 3D version of the Pythagorean theorem applied twice. Example: for v = (2, −3, 6), |v| = √(4 + 9 + 36) = √49 = 7. A unit vector in the same direction is obtained by dividing each component by the magnitude: û = v / |v| = (2/7, −3/7, 6/7). Unit vectors always have magnitude 1 and are used to describe direction alone.
The dot product of two vectors a = (a₁, a₂, a₃) and b = (b₁, b₂, b₃) is a · b = a₁b₁ + a₂b₂ + a₃b₃. The result is a scalar (a number, not a vector). The dot product equals |a||b|cos(θ) where θ is the angle between the vectors. This means: if a · b = 0, the vectors are perpendicular (orthogonal); if a · b > 0, the angle between them is acute (less than 90°); if a · b < 0, the angle is obtuse (greater than 90°). Example: a = (1, 2, 3), b = (4, −1, 2) → a · b = 4 − 2 + 6 = 8.
Use the dot product formula: cos(θ) = (a · b) / (|a| |b|), then θ = arccos((a · b) / (|a| |b|)). The angle θ always satisfies 0 ≤ θ ≤ π (0° to 180°). Example: a = (1, 0, 1) and b = (0, 1, 1). Dot product: 0 + 0 + 1 = 1. |a| = √2, |b| = √2. cos(θ) = 1/(√2 · √2) = 1/2. θ = arccos(1/2) = 60°. For orthogonal (perpendicular) vectors the angle is 90° and the dot product is 0. For parallel vectors the angle is 0° or 180°.
The cross product a × b produces a vector (not a scalar) that is perpendicular to both a and b. For a = (a₁, a₂, a₃) and b = (b₁, b₂, b₃), the cross product is a × b = (a₂b₃ − a₃b₂, a₃b₁ − a₁b₃, a₁b₂ − a₂b₁). The magnitude |a × b| = |a||b|sin(θ) equals the area of the parallelogram spanned by a and b. Key differences: the dot product is a scalar and measures how parallel two vectors are; the cross product is a vector and measures how perpendicular they are. The cross product is only defined in 3D (and 7D). The direction of a × b follows the right-hand rule.
The right-hand rule determines the direction of the cross product a × b. Point the fingers of your right hand in the direction of a, then curl them toward b (through the smaller angle between them). Your thumb points in the direction of a × b. Consequence: a × b = −(b × a), so the cross product is anti-commutative — swapping the order reverses the direction. For the standard unit vectors: i × j = k, j × k = i, k × i = j. If you reverse the order: j × i = −k, k × j = −i, i × k = −j. Memorize these using the cyclic pattern i → j → k → i.
A line through point P₀(x₀, y₀, z₀) with direction vector d = (a, b, c) has parametric equations: x = x₀ + at, y = y₀ + bt, z = z₀ + ct, where t is a real-number parameter. To eliminate t, solve each equation for t and set them equal: (x − x₀)/a = (y − y₀)/b = (z − z₀)/c. These are the symmetric equations. Example: line through (2, −1, 3) with direction (4, 2, −1): parametric: x = 2 + 4t, y = −1 + 2t, z = 3 − t. Symmetric: (x−2)/4 = (y+1)/2 = (z−3)/(−1). If any direction component is 0, that variable is set equal to that constant instead of forming a fraction.
A plane is determined by a normal vector n = (a, b, c) (perpendicular to the plane) and a point P₀(x₀, y₀, z₀) on it. The equation is a(x − x₀) + b(y − y₀) + c(z − z₀) = 0, which simplifies to ax + by + cz = d where d = ax₀ + by₀ + cz₀. To find a plane through three non-collinear points P, Q, R: form two vectors PQ and PR, then compute the normal n = PQ × PR. Example: plane through (1, 0, 0), (0, 1, 0), (0, 0, 1). PQ = (−1,1,0), PR = (−1,0,1). n = PQ × PR = (1,1,1). Equation: (x−1) + y + z = 0 → x + y + z = 1.
The distance from point P₁(x₁, y₁, z₁) to the plane ax + by + cz + d = 0 is D = |ax₁ + by₁ + cz₁ + d| / √(a² + b² + c²). The denominator is just the magnitude of the normal vector. Example: distance from (1, 2, 3) to the plane 2x − y + 2z = 5 (rewritten as 2x − y + 2z − 5 = 0). Numerator: |2(1) − 2 + 2(3) − 5| = |2 − 2 + 6 − 5| = |1| = 1. Denominator: √(4 + 1 + 4) = 3. Distance = 1/3. This formula is analogous to the 2D point-to-line distance formula.
Interactive problems with step-by-step solutions and private tutoring — dot products, cross products, planes, and more. Free to try.
Start Practicing Free