Vector Operations

A vector is a mathematical object that carries both magnitude (size) and direction, distinguishing it from a scalar, which has magnitude alone. Vectors appear throughout physics, engineering, computer graphics, and pure mathematics. In linear algebra, mastering vector operations — addition, scalar multiplication, and the dot and cross products — is essential for understanding everything from solving systems of equations to describing rotations in three-dimensional space. Vector operations follow precise algebraic rules that generalize familiar arithmetic. When you add two forces acting on an object, you are performing vector addition. When you ask whether two roads are perpendicular, you are implicitly computing a dot product. These operations give geometry an algebraic backbone: angles, lengths, projections, and areas can all be expressed as formulas involving vectors. This article covers the four fundamental vector operations — addition, scalar multiplication, the dot product, and the cross product — along with the angle relationships they reveal. Understanding these tools will prepare you for topics ranging from matrix multiplication to multivariable calculus and machine learning.

Key takeaways
  • Vector Addition and Subtraction
  • Scalar Multiplication
  • The Dot Product and Angles
  • The Cross Product (3D Only)

Vector Addition and Subtraction

Given two vectors u = (u₁, u₂, u₃) and v = (v₁, v₂, v₃) in ℝ³, their sum is computed component-wise: u + v = (u₁+v₁, u₂+v₂, u₃+v₃). Geometrically, place the tail of v at the tip of u; the resultant vector points from the tail of u to the tip of v. This is called the triangle rule (or parallelogram rule when you draw both vectors from the same point). Subtraction works identically: u − v = (u₁−v₁, u₂−v₂, u₃−v₃), which geometrically represents the vector from the tip of v to the tip of u when both start at the origin. Vector addition is both commutative (u + v = v + u) and associative ((u + v) + w = u + (v + w)).

Scalar Multiplication

Multiplying a vector v = (v₁, v₂, v₃) by a real number (scalar) c gives cv = (cv₁, cv₂, cv₃). Geometrically, this stretches or compresses the vector by the factor |c|; if c < 0, the direction reverses. For example, 3v is three times as long and points in the same direction, while −v is the same length but opposite in direction. The magnitude (length) of a vector is ||v|| = √(v₁² + v₂² + v₃²), so ||cv|| = |c|·||v||. A unit vector v̂ = v/||v|| has length 1 and points in the same direction as v.

The Dot Product and Angles

The dot product of u and v is the scalar u · v = u₁v₁ + u₂v₂ + u₃v₃. It satisfies the fundamental identity u · v = ||u|| ||v|| cos θ, where θ is the angle between the vectors (0 ≤ θ ≤ π). This lets you find angles directly: cos θ = (u · v)/(||u|| ||v||). Critical cases: if u · v = 0, the vectors are orthogonal (perpendicular); if u · v > 0, the angle is acute; if u · v < 0, the angle is obtuse. The dot product also enables scalar projection: the component of u along v is (u · v)/||v||, and the vector projection of u onto v is proj_v(u) = ((u · v)/||v||²) v. These projections are crucial in decomposing forces, computing work done by a force, and finding distances.

The Cross Product (3D Only)

The cross product u × v is defined only in ℝ³ and produces a new vector (not a scalar). Using the determinant formula: u × v = (u₂v₃ − u₃v₂, u₃v₁ − u₁v₃, u₁v₂ − u₂v₁). Its magnitude satisfies ||u × v|| = ||u|| ||v|| sin θ, which equals the area of the parallelogram spanned by u and v. The direction of u × v is perpendicular to both u and v, following the right-hand rule: curl the fingers of your right hand from u toward v, and your thumb points in the direction of u × v. Unlike the dot product, the cross product is anti-commutative: u × v = −(v × u). If u and v are parallel, u × v = 0. The cross product is essential in physics for computing torque (τ = r × F) and angular momentum.

The Key Equation

u⋅v=∥u∥∥v∥cos⁡θ=u1v1+u2v2+u3v3\mathbf{u} \cdot \mathbf{v} = \|\mathbf{u}\|\|\mathbf{v}\|\cos\theta = u_1 v_1 + u_2 v_2 + u_3 v_3
  • \mathbf{u} \cdot \mathbf{v} — Dot product (dimensionless (or product of input units)): A scalar quantity measuring the degree to which two vectors point in the same direction.
  • \|\mathbf{u}\|, \|\mathbf{v}\| — Magnitudes (norms) (same as vector components): The lengths of vectors u and v, computed as the square root of the sum of squared components.
  • \theta — Angle between vectors (radians or degrees): The angle formed between the two vectors when placed tail-to-tail at a common origin; ranges from 0 to π.
  • u_i, v_i — Vector components (varies): The individual coordinate values of each vector along each axis direction.

Worked Example

Problem. Let u = (3, −1, 2) and v = (1, 4, −2). (a) Compute u + v and 2u − v. (b) Find u · v. (c) Find the angle θ between u and v. (d) Find the vector projection of u onto v.

u+v=(4,3,0);u⋅v=−5;θ=arccos⁡ ⁣(−576)≈107∘;proj⁡vu=−521(1,4,−2)\mathbf{u}+\mathbf{v}=(4,3,0);\quad \mathbf{u}\cdot\mathbf{v}=-5;\quad \theta=\arccos\!\left(\frac{-5}{7\sqrt{6}}\right)\approx107^\circ;\quad \operatorname{proj}_{\mathbf{v}}\mathbf{u}=\tfrac{-5}{21}(1,4,-2)

Answer. u + v = (4, 3, 0); 2u − v = (5, −6, 6); u · v = −5; θ ≈ 106.97°; proj_v(u) = (−5/21, −20/21, 10/21)

Figure
Diagram
xy123451234Ou=(3,2)v=(1,3)u+v=(4,5)αβu·v = 3·1+2·3 = 9cos θ = 9/(√13·√10)θ ≈ 37.9°Vector Addition (Parallelogram Rule) in ℝ²
Origins · 1 minHermann Grassmann and how this was discovered
HG
Hermann Grassmann
1809–1877 · German

Grassmann developed the theory of vector spaces and what he called the 'exterior algebra' in his 1844 work Ausdehnungslehre (Theory of Extension). He introduced the idea of n-dimensional vector spaces long before the concept was mainstream, and his wedge product (a generalization of the cross product) underpins modern differential geometry and multilinear algebra. His work provided a rigorous foundation for operations between vectors and showed how area and volume could be computed algebraically. Grassmann's groundbreaking 1844 book was so abstract and ahead of its time that it was almost completely ignored by the mathematical community for decades. He spent much of his career as a high school teacher and also made significant contributions to Sanskrit linguistics.

  • Vector Magnitude and Direction — Understanding how to compute the length and direction of a vector is the prerequisite for all vector operations, particularly the dot product formula involving ||u|| and ||v||.
  • Matrix Multiplication — Matrix-vector multiplication generalizes scalar multiplication and the dot product; each row of the product is a dot product of a matrix row with the vector.
  • Linear Combinations and Span — Vector addition and scalar multiplication are exactly the two operations used to form linear combinations, which define the span and basis of a vector space.
  • Law of Cosines — The geometric interpretation of the dot product formula u·v = ||u||||v||cos θ is a direct algebraic restatement of the Law of Cosines applied to the triangle formed by u, v, and u−v.
  • Orthogonality and Projections — The dot product directly defines orthogonality (perpendicularity) and is used to compute vector projections, which are foundational for least-squares methods and Gram-Schmidt orthogonalization.