Vectors & SpacesTopic #2 of 30

Vector Operations

Vector addition, scalar multiplication, dot product, cross product, and their properties.

Overview

Vector operations allow us to combine and manipulate vectors. The fundamental operations are addition, scalar multiplication, and products.

Vector Addition

For vectors u=[u1u2un]\mathbf{u} = \begin{bmatrix} u_1 \\ u_2 \\ \vdots \\ u_n \end{bmatrix} and v=[v1v2vn]\mathbf{v} = \begin{bmatrix} v_1 \\ v_2 \\ \vdots \\ v_n \end{bmatrix}:

u+v=[u1+v1u2+v2un+vn]\mathbf{u} + \mathbf{v} = \begin{bmatrix} u_1 + v_1 \\ u_2 + v_2 \\ \vdots \\ u_n + v_n \end{bmatrix}

Properties of Addition

PropertyFormula
Commutativeu+v=v+u\mathbf{u} + \mathbf{v} = \mathbf{v} + \mathbf{u}
Associative(u+v)+w=u+(v+w)(\mathbf{u} + \mathbf{v}) + \mathbf{w} = \mathbf{u} + (\mathbf{v} + \mathbf{w})
Identityu+0=u\mathbf{u} + \mathbf{0} = \mathbf{u}
Inverseu+(u)=0\mathbf{u} + (-\mathbf{u}) = \mathbf{0}

Scalar Multiplication

For scalar cc and vector v\mathbf{v}:

cv=[cv1cv2cvn]c\mathbf{v} = \begin{bmatrix} cv_1 \\ cv_2 \\ \vdots \\ cv_n \end{bmatrix}

Properties

PropertyFormula
Distributivec(u+v)=cu+cvc(\mathbf{u} + \mathbf{v}) = c\mathbf{u} + c\mathbf{v}
Distributive(c+d)v=cv+dv(c + d)\mathbf{v} = c\mathbf{v} + d\mathbf{v}
Associativec(dv)=(cd)vc(d\mathbf{v}) = (cd)\mathbf{v}
Identity1v=v1\mathbf{v} = \mathbf{v}

Dot Product (Inner Product)

For vectors u\mathbf{u} and v\mathbf{v} in Rn\mathbb{R}^n:

uv=u1v1+u2v2++unvn=i=1nuivi\mathbf{u} \cdot \mathbf{v} = u_1v_1 + u_2v_2 + \cdots + u_nv_n = \sum_{i=1}^{n} u_i v_i

Properties of Dot Product

  • Commutative: uv=vu\mathbf{u} \cdot \mathbf{v} = \mathbf{v} \cdot \mathbf{u}
  • Distributive: u(v+w)=uv+uw\mathbf{u} \cdot (\mathbf{v} + \mathbf{w}) = \mathbf{u} \cdot \mathbf{v} + \mathbf{u} \cdot \mathbf{w}
  • Scalar: (cu)v=c(uv)(c\mathbf{u}) \cdot \mathbf{v} = c(\mathbf{u} \cdot \mathbf{v})
  • Self: vv=v2\mathbf{v} \cdot \mathbf{v} = \|\mathbf{v}\|^2

Geometric Interpretation

uv=uvcosθ\mathbf{u} \cdot \mathbf{v} = \|\mathbf{u}\| \|\mathbf{v}\| \cos\theta

where θ\theta is the angle between u\mathbf{u} and v\mathbf{v}.

Orthogonality

Two vectors are orthogonal (perpendicular) if:

uv=0\mathbf{u} \cdot \mathbf{v} = 0

Cross Product (3D Only)

For vectors u=[u1u2u3]\mathbf{u} = \begin{bmatrix} u_1 \\ u_2 \\ u_3 \end{bmatrix} and v=[v1v2v3]\mathbf{v} = \begin{bmatrix} v_1 \\ v_2 \\ v_3 \end{bmatrix}:

u×v=[u2v3u3v2u3v1u1v3u1v2u2v1]\mathbf{u} \times \mathbf{v} = \begin{bmatrix} u_2v_3 - u_3v_2 \\ u_3v_1 - u_1v_3 \\ u_1v_2 - u_2v_1 \end{bmatrix}

Properties of Cross Product

  • Anti-commutative: u×v=(v×u)\mathbf{u} \times \mathbf{v} = -(\mathbf{v} \times \mathbf{u})
  • Distributive: u×(v+w)=u×v+u×w\mathbf{u} \times (\mathbf{v} + \mathbf{w}) = \mathbf{u} \times \mathbf{v} + \mathbf{u} \times \mathbf{w}
  • Scalar: c(u×v)=(cu)×v=u×(cv)c(\mathbf{u} \times \mathbf{v}) = (c\mathbf{u}) \times \mathbf{v} = \mathbf{u} \times (c\mathbf{v})
  • Self: v×v=0\mathbf{v} \times \mathbf{v} = \mathbf{0}

Geometric Interpretation

  • u×v=uvsinθ\|\mathbf{u} \times \mathbf{v}\| = \|\mathbf{u}\| \|\mathbf{v}\| \sin\theta
  • Result is perpendicular to both u\mathbf{u} and v\mathbf{v}
  • Represents area of parallelogram formed by u\mathbf{u} and v\mathbf{v}

Examples

Example 1: Vector Addition

u=[23]\mathbf{u} = \begin{bmatrix} 2 \\ 3 \end{bmatrix}, v=[12]\mathbf{v} = \begin{bmatrix} 1 \\ -2 \end{bmatrix}

u+v=[2+13+(2)]=[31]\mathbf{u} + \mathbf{v} = \begin{bmatrix} 2+1 \\ 3+(-2) \end{bmatrix} = \begin{bmatrix} 3 \\ 1 \end{bmatrix}

Example 2: Dot Product

u=[123]\mathbf{u} = \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}, v=[456]\mathbf{v} = \begin{bmatrix} 4 \\ -5 \\ 6 \end{bmatrix}

uv=1(4)+2(5)+3(6)=410+18=12\mathbf{u} \cdot \mathbf{v} = 1(4) + 2(-5) + 3(6) = 4 - 10 + 18 = 12

Example 3: Cross Product

u=[100]\mathbf{u} = \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}, v=[010]\mathbf{v} = \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix}

u×v=[0(0)0(1)0(0)1(0)1(1)0(0)]=[001]\mathbf{u} \times \mathbf{v} = \begin{bmatrix} 0(0) - 0(1) \\ 0(0) - 1(0) \\ 1(1) - 0(0) \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix}