Vectors: Definition, Operations, Dot Product & Cross Product
Updated on November 12, 2026
A vector is a quantity that has both magnitude (size) and direction. Velocity, force, and displacement are vectors; temperature and mass, which have only size, are scalars. This page explains how to write vectors, find their length, add them, and calculate the dot product and the cross product of two vectors.
What Is a Vector?
A vector is drawn as an arrow: its length shows the magnitude and the arrowhead shows the direction. In coordinates, a vector is written by its components:
- 2D: v = ⟨3, 4⟩ or v = 3i + 4j
- 3D: a = ⟨1, 2, 3⟩ or a = i + 2j + 3k
Here i, j, and k are unit vectors of length 1 along the x-, y-, and z-axes. A vector from point P(x1, y1) to point Q(x2, y2) is PQ = ⟨x2 − x1, y2 − y1⟩.
Expert Math Tutors for Every Level
Connect with professional and certified educators who provide specialized support for every grade level, from elementary school basics to advanced algebra
Magnitude of a Vector
The magnitude (length) of a vector comes from the Pythagorean theorem:
|⟨x, y⟩| = √(x2 + y2)
|⟨x, y, z⟩| = √(x2 + y2 + z2)
|⟨3, 4⟩| = √(9 + 16) = 5
A unit vector in the direction of v is v/|v|. For v = ⟨3, 4⟩, the unit vector is ⟨3/5, 4/5⟩.
Adding Vectors and Scalar Multiplication
Add or subtract vectors component by component. Multiply by a scalar by multiplying every component.
⟨1, 2, 3⟩ + ⟨4, −5, 6⟩ = ⟨5, −3, 9⟩
⟨1, 2, 3⟩ − ⟨4, −5, 6⟩ = ⟨−3, 7, −3⟩
3 · ⟨2, −1⟩ = ⟨6, −3⟩
Geometrically, to add vectors you place them tip to tail; the sum is the arrow from the start of the first to the end of the second.
Dot Product
The dot product (scalar product) of two vectors gives a number, not a vector. Multiply matching components and add:
- a · b = a1b1 + a2b2 + a3b3
- a · b = |a| |b| cos θ (θ is the angle between a and b)
- a = ⟨1, 2, 3⟩, b = ⟨4, −5, 6⟩
- a · b = 1·4 + 2·(−5) + 3·6 = 4 − 10 + 18 = 12
Finding the angle between two vectors
- cos θ = (a · b) / (|a| |b|)
- |a| = √14, |b| = √77
- cos θ = 12 / √(14 · 77) = 12 / √1078 ≈ 0.366 → θ ≈ 68.6°
What the sign of the dot product tells you
- a · b > 0 — the angle is acute (less than 90°).
- a · b = 0 — the vectors are perpendicular (orthogonal).
- a · b < 0 — the angle is obtuse (more than 90°).
Cross Product of Two Vectors
The cross product (vector product) a × b is defined for 3D vectors and gives a new vector that is perpendicular to both a and b.
Cross product formula
a × b = ⟨a2b3 − a3b2, a3b1 − a1b3, a1b2 − a2b1⟩
Equivalently, a × b is the determinant of the 3 × 3 matrix with rows (i, j, k), (a1, a2, a3), (b1, b2, b3).
Step-by-step example
Find a × b for a = ⟨1, 2, 3⟩ and b = ⟨4, −5, 6⟩.
- x-component: 2·6 − 3·(−5) = 12 + 15 = 27
- y-component: 3·4 − 1·6 = 12 − 6 = 6
- z-component: 1·(−5) − 2·4 = −5 − 8 = −13
a × b = ⟨27, 6, −13⟩
Check (must be perpendicular to both): ⟨27, 6, −13⟩ · a = 27 + 12 − 39 = 0 ✓; · b = 108 − 30 − 78 = 0 ✓
Magnitude and meaning of the cross product
The length of the cross product is |a × b| = |a| |b| sin θ. It equals the area of the parallelogram formed by a and b. In the example, |⟨27, 6, −13⟩| = √934 ≈ 30.6 square units, and the triangle formed by the same two vectors has half that area.
Direction: the right-hand rule
Point the fingers of your right hand along a and curl them toward b. Your thumb points in the direction of a × b. This is why i × j = k, j × k = i, and k × i = j.
Properties of the cross product
- Anti-commutative: b × a = −(a × b). Order matters.
- a × a = 0 — and a × b = 0 whenever a and b are parallel.
- a × (b + c) = a × b + a × c.
- The cross product is defined for 3D vectors; for 2D vectors, set z = 0.
Dot product vs cross product
|
Dot product a · b |
Cross product a × b |
|
|---|---|---|
|
Result |
A number (scalar) |
A vector |
|
Formula with angle |
|a||b| cos θ |
|a||b| sin θ (magnitude) |
|
Equals zero when |
Vectors are perpendicular |
Vectors are parallel |
|
Order matters? |
No: a · b = b · a |
Yes: b × a = −(a × b) |
|
Typical use |
Angles, projections, work |
Normal vectors, area, torque |
Where Vectors Are Used
- Physics: work = force · displacement (dot product); torque = r × F (cross product).
- Navigation: combining a plane’s velocity with wind velocity.
- Computer graphics: cross products give surface normals for lighting.
- Linear algebra: vectors are the rows and columns of matrices.
Practice Problems
- Find |⟨−6, 8⟩|.
- Find ⟨2, −1, 4⟩ · ⟨3, 2, 1⟩.
- Are ⟨2, 3⟩ and ⟨−3, 2⟩ perpendicular?
- Find ⟨1, 0, 0⟩ × ⟨0, 1, 0⟩.
- Find ⟨2, 1, 0⟩ × ⟨1, 3, 0⟩.
More practice: vectors worksheet.
Frequently Asked Questions on Vectors
What is a vector in math?
A vector is a quantity with both magnitude and direction, written with components such as ⟨3, 4⟩.
What is the difference between the dot product and the cross product?
The dot product gives a scalar and measures how much two vectors point the same way; the cross product gives a vector perpendicular to both, whose length is the area of their parallelogram.
When is the cross product zero?
When the two vectors are parallel (or one of them is the zero vector), because sin 0° = sin 180° = 0.
What does the cross product tell us?
The cross product of two vectors gives us a new vector that is perpendicular to the plane containing the original vectors. Its direction follows the right-hand rule, and its magnitude is equal to the area of the parallelogram formed by the two vectors.
How do you find the cross product of two vectors?
For a = ⟨a1, a2, a3⟩ and b = ⟨b1, b2, b3⟩, a × b = ⟨a2b3 − a3b2, a3b1 − a1b3, a1b2 − a2b1⟩. The result is perpendicular to both vectors.