Menu (linked Index)
Vector Math
Last Update: June 20, 2025
Introduction
Vectors are mathematical constructs that indicate magnitude and time.
They are very useful in science and engineering fields.
In this post, we’ll cover the basic math of vectors.
Vectors and Scalars
- Intro vectors 1 ; Intro vectors 2 (khanacademy.org)
- Adding vectors (khanacademy.org); Subtracting vectors
- Multiplying a vector by a scalar (khanacademy.org)
- Vector dot product and vector length (khanacademy.org)
- Vector Cross product introduction (khanacademy.org)
Scalar
A scalar only has magnitude (size).
Example: Speed
Vector
A vector has magnitude (size) and direction.
Example: Velocity = Speed in a specified direction
Example: Force has magnitude and direction
Adding/Subtracting Vectors
- Vectors have magnitude and direction but graphically they don’t specifically place anywhere. i.e. they can be placed anywhere.
Vector Addition
To add vectors algebraically, sum their corresponding components.
- If a=(ax,ay,az) and b=(bx,by,bz), then: a+b=(ax+bx,ay+by,az+bz)
Vector Addition: Graphical (Tip-to-Tail / Triangle Rule):
- See graphical example below (2nd drawing) from https://en.wikipedia.org/wiki/Euclidean_vector
- Place the tail of the second vector (b) at the tip (arrowhead) of the first vector (a).
- The resultant sum vector (a+b) is drawn from the tail of the first vector to the tip of the second vector.
Vector Addition: Graphical (Parallelogram Rule):
- See graphical example above (1st drawing) from https://en.wikipedia.org/wiki/Euclidean_vector
- Draw both vectors (a and b) with their tails at the same starting point.
- Complete the parallelogram formed by these two vectors as adjacent sides.
- The resultant sum vector (a+b) is the diagonal of the parallelogram that starts from the common tail point.
Properties of Vector Addition:
For vectors a, b, c and the zero vector 0:
- Commutativity: The order of addition does not affect the sum. a + b = b + a
- Associativity: The grouping of vectors in addition does not affect the sum. (a + b) + c = a+(b + c)
- Identity Element (Zero Vector): Adding the zero vector to any vector leaves the vector unchanged: a+0 = a
- Inverse Element (Negative Vector): For every vector a, there exists a unique negative vector (−a) such that their sum is the zero vector: a+(−a)=0
- Closure: The sum of two vectors is always another vector.
Vector Subtraction
- Subtracting vector b from vector a, (a−b), is defined as adding vector a to the negative of vector b: (a+(−b)).
- The negative vector (−b) has the same magnitude as b but points in the exact opposite direction (i.e. flipped 180 degrees).
- Subtract the corresponding components of the vectors.
- If a=(ax,ay,az) and b=(bx,by,bz), then: a−b=(ax−bx,ay−by,az−bz)
- Graphical (tip to tip): If vectors a and b are drawn with their tails at the same starting point, the resultant vector a−b is drawn from the tip of b to the tip of a.
- Graphical (flip subtrahend vector and add): Flip the subtrahend vector 180 degrees and add this to the first vector
Vector Multiplication by a scalar
See the graphical example above below from https://en.wikipedia.org/wiki/Euclidean_vector
- Multiplying a vector by a positive scalar increases the magnitude of the vector
- Multiplying a vector by negative one, flips the direction by 180 degrees
Length (Magnitude of a vector)
The length or magnitude of a vector is a scalar quantity that represents the “size” or “extent” of the vector, without regard to its direction.
The magnitude of a vector v is typically denoted as ∥v∥ or ∣v∣.
For a vector in a coordinate system:
- In two dimensions (e.g., v=⟨x,y⟩): The magnitude is calculated using the Pythagorean theorem: ∥v∥=sqrt(x2+y2)
- In three dimensions (e.g., v=⟨x,y,z⟩): The magnitude is also found using a generalization of the Pythagorean theorem: ∥v∥=sqrt(x2+y2+z2)
This makes sense. Just plot
This concept extends to vectors in any number of dimensions, where the magnitude is the square root of the sum of the squares of all its components.
Vector Dot Product
The dot product (also known as the scalar product or inner product) of two vectors is an algebraic operation that takes two equal-length sequences of numbers (vectors) and returns a single number (a scalar).
Vector Dot Product Algebraic Definition
Given two vectors a=⟨a1,a2,…,an⟩ and b=⟨b1,b2,…,bn⟩ in n-dimensional space,
- their dot product is the sum of the products of their corresponding components:
- that is, a⋅b=a1b1+a2b2+⋯+anbn=∑aibi for i = 1 to n
Vector Dot Product Geometric Definition
Given two vectors a and b in Euclidean space, their dot product is the product of their magnitudes and the cosine of the angle θ between them:
- a⋅b=∣a∣∣b∣cos(θ)
- where ∣a∣ is the magnitude (length) of vector a,
- and ∣b∣ is the magnitude of vector b.
Properties of the Dot Product:
Let u, v, and w be vectors, and c be a scalar.
- Commutative Property: The order of the vectors does not affect the result. u⋅v=v⋅u
- Distributive Property over Vector Addition: u⋅(v+w)=u⋅v+u⋅w
- Scalar Multiplication Property (Associative with Scalar Multiplication): (cu)⋅v=u⋅(cv)=c(u⋅v)
- Relationship with Magnitude (Squared Length): The dot product of a vector with itself gives the square of its magnitude. u⋅u=∣u∣2 .This also implies that ∣u∣=u⋅u.
- Orthogonality Condition: Two non-zero vectors are perpendicular (orthogonal) if and only if their dot product is zero. u⋅v=0⟺u⊥v (for non-zero u and v)
- Dot Product with the Zero Vector: The dot product of any vector with the zero vector is zero. u⋅0=0
These properties make the dot product a fundamental tool in various areas of mathematics, physics, and engineering, particularly for calculating angles, projections, and work done by forces.
Vector Cross Product
- The cross product (also known as the vector product) of two vectors, a and b is a binary operation.
- It is defined only in three-dimensional Euclidean space. (each vector can only have three components)
- Unlike the dot product, the result of a cross product is another vector, not a scalar and it is orthogonal to the the multiplicand vectors
It is denoted as a×b.
The cross product a×b is a vector c that possesses the following characteristics:
Direction: The vector c is perpendicular (orthogonal) to both a and .
Its direction is determined by the right-hand rule: If you curl the fingers of your right hand from the direction of a to the direction of b (through the smaller angle between them), your thumb will point in the direction of c.
Magnitude: The magnitude of c is given by the formula: ∥c∥=∥a∥∥b∥sin(θ) where θ is the angle between a and b (0≤θ≤π).
Geometrically, this magnitude represents the area of the parallelogram formed by vectors a and b when their tails are at the same point.
See the graphical example below from https://en.wikipedia.org/wiki/Euclidean_vector
Algebraic Definition (in Cartesian Coordinates)
Let a = three dimensional vector a and
let b = three dimensional vector b
a = (ax, ay, az)
b = (bx, by, bz)
c = a x b = a vector with three components that are computed as the determinants of three 2 x 2 matrices:
If you look at the a and b vectors as a collection of three columns of components: col1= ax/bx, col2 = ay/by and col3 = az/bz,
notice that the sequence of matrices to compute the determinant on are col2 with col3, then col3 with col1, then col 1 with col2 (a left to right sequence).
So,
c = a x b = (aybz – byaz, azbx – bzax, axby – bxay)
Disclaimer: The content of this article is intended for general informational and recreational purposes only and is not a substitute for professional “advice”. We are not responsible for your decisions and actions. Refer to our Disclaimer Page.