What Is a Vector?
Speed ("60 mph") is a scalar. Velocity ("60 mph north") is a vector. Force, displacement, momentum, and acceleration are all vectors.
Geometrically, a vector is often drawn as an arrow: the length represents the magnitude, and the arrow points in the direction. Algebraically, a 2D vector is written as v = ⟨a, b⟩ or v = ai + bj, where a is the horizontal component and b is the vertical component. In 3D, vectors have three components: v = ⟨a, b, c⟩ or v = ai + bj + ck.
Position vectors and equality
The position vector from the origin to a point (x, y) is just ⟨x, y⟩. Vectors that are not anchored at the origin are still described by their components — the direction and magnitude are what matter, not the starting point. Two vectors are equal if and only if they have the same components (same magnitude and same direction), regardless of where they start.
Vectors are foundational in physics, engineering, computer graphics, and machine learning. Every direction-aware quantity in the universe is modeled as a vector.
Vector Magnitude
v = ⟨a, b⟩, the magnitude is |v| = √(a² + b²). This is just the Pythagorean theorem applied to the components. For a 3D vector v = ⟨a, b, c⟩, it generalizes to |v| = √(a² + b² + c²).Find the magnitude of v = ⟨3, 4⟩.
|v| = √(3² + 4²) = √(9 + 16) = √25 = 5.
|v| = 5Find the magnitude of v = ⟨2, −1, 2⟩.
|v| = √(4 + 1 + 4) = √9 = 3.
|v| = 3Unit vectors
v, divide v by its magnitude: û = v/|v|.Find the unit vector in the direction of ⟨3, 4⟩.
û = ⟨3/5, 4/5⟩.
Verification: |û| = √((3/5)² + (4/5)²) = √(9/25 + 16/25) = √(25/25) = 1.
û = ⟨3/5, 4/5⟩Unit vectors are useful because they isolate the direction of a vector from its magnitude.
Vector Addition and Scalar Multiplication
Vector addition
⟨a, b⟩ + ⟨c, d⟩ = ⟨a + c, b + d⟩. Geometrically, this is the parallelogram rule (or tip-to-tail method).⟨2, 3⟩ + ⟨5, −1⟩ = ⟨7, 2⟩.
⟨7, 2⟩Vector subtraction
⟨a, b⟩ − ⟨c, d⟩ = ⟨a − c, b − d⟩.⟨5, 7⟩ − ⟨2, 3⟩ = ⟨3, 4⟩.
⟨3, 4⟩Scalar multiplication
k · ⟨a, b⟩ = ⟨ka, kb⟩. Geometrically, scalar multiplication scales the vector's length by |k|. If k > 0, the direction stays the same; if k < 0, the direction reverses.3 · ⟨2, −5⟩ = ⟨6, −15⟩.
⟨6, −15⟩−2 · ⟨1, 4⟩ = ⟨−2, −8⟩.
⟨−2, −8⟩Properties: Vector addition is commutative and associative. Scalar multiplication distributes over vector addition: k(u + v) = ku + kv. These properties make vector algebra feel natural and consistent with regular arithmetic — with the important difference that vectors point in directions.
What Is the Dot Product?
u = ⟨a, b⟩ and v = ⟨c, d⟩, the dot product is u · v = ac + bd. In 3D, ⟨a, b, c⟩ · ⟨d, e, f⟩ = ad + be + cf.⟨3, 4⟩ · ⟨2, 1⟩ = 3(2) + 4(1) = 10.
10⟨1, 2, 3⟩ · ⟨4, 5, 6⟩ = 4 + 10 + 18 = 32.
32Geometric meaning
The dot product has a beautiful geometric meaning: u · v = |u| · |v| · cos(θ), where θ is the angle between the vectors. This formula connects algebra (component multiplication) with geometry (lengths and angles) in a single elegant equation.
| Case | Condition | Angle | Why |
|---|---|---|---|
| 1 | u · v = 0 | Perpendicular (90°) | The vectors are perpendicular (orthogonal), since cos(90°) = 0. |
| 2 | u · v > 0 | Acute (between 0° and 90°) | The angle is acute. |
| 3 | u · v < 0 | Obtuse (between 90° and 180°) | The angle is obtuse. |
The dot product is the workhorse of physics (work done by a force), computer graphics (lighting calculations), and machine learning (cosine similarity for comparing vectors).
Finding the Angle Between Two Vectors
u · v = |u| · |v| · cos(θ) for θ gives cos(θ) = (u · v)/(|u| · |v|), so θ = arccos((u · v)/(|u| · |v|)).Find the angle between u = ⟨3, 4⟩ and v = ⟨2, 1⟩.
- Step 1 — dot product
u · v = 3(2) + 4(1) = 10. - Step 2 — magnitudes
|u| = 5,|v| = √5. - Step 3 — angle
cos(θ) = 10/(5√5) = 2/√5 ≈ 0.894.θ = arccos(0.894) ≈ 26.57°.
θ ≈ 26.57°Are u = ⟨3, −2⟩ and v = ⟨4, 6⟩ perpendicular?
Dot product: 3(4) + (−2)(6) = 12 − 12 = 0.
Yes, they are perpendicular.Find the angle between u = ⟨1, 1, 0⟩ and v = ⟨1, 0, 1⟩.
Dot product: 1 + 0 + 0 = 1.
|u| = √2, |v| = √2.
cos(θ) = 1/(√2 · √2) = 1/2.
θ = 60°The angle between two vectors is one of the most important quantities in linear algebra, geometry, and physics — and the dot product makes it computable in a single line.
Applications and the Cross Product
Work done by a force
F moves an object through a displacement d, the work done is W = F · d.The dot product captures the fact that only the component of force in the direction of motion does work. A force perpendicular to motion does zero work — exactly what the dot product gives when the vectors are perpendicular.
Vector projections
u onto v is proj_v(u) = ((u · v)/|v|²) · v. This decomposes u into a component along v and a component perpendicular to v — a fundamental trick in physics for resolving forces.More applications
Computer graphics: The dot product of a surface normal with a light direction gives the brightness of a pixel — this is how 3D shading works.
Machine learning: The cosine similarity between two vectors (their dot product divided by their magnitudes) measures how similar two documents, embeddings, or features are.
The cross product (in 3D)
u × v gives a vector that's perpendicular to both u and v, with magnitude |u| · |v| · sin(θ). The cross product is used for finding normal vectors to planes, computing torque in physics, and calculating areas of parallelograms.The cross product is its own deep topic — a future article. For now, the dot product alone unlocks an enormous range of geometric and physical applications. If you're working on vector problems, scan them with Solver AI for full step-by-step solutions including dot products, magnitudes, and angle calculations.