Vectors Calculator
Calculate vector operations for 2D and 3D vectors: addition, subtraction, scalar multiplication, magnitude, unit vector, dot product, angle between vectors, cross product, and midpoint. Full step-by-step working for UK A-Level Maths.
3D vectors only
Midpoint of two position vectors
Vectors in A-Level Maths
A vector is a mathematical quantity that has both magnitude (size) and direction. Vectors appear throughout A-Level Maths and A-Level Further Maths, describing positions, displacements, velocities and forces. In 2D, vectors are written as column vectors or as xi + yj. In 3D, they include a z-component: xi + yj + zk.
Vector Addition and Subtraction
Add or subtract vectors component by component: (a₁, a₂, a₃) + (b₁, b₂, b₃) = (a₁+b₁, a₂+b₂, a₃+b₃). Vector addition is commutative (a+b = b+a) and associative. Geometrically, addition corresponds to placing vectors tip to tail.
Magnitude and Unit Vectors
The magnitude of a = (x, y) is |a| = √(x² + y²). For 3D: |a| = √(x² + y² + z²). The unit vector in the direction of a is â = a/|a|. Unit vectors have magnitude 1 and are used to represent direction alone. The standard basis unit vectors are i = (1,0,0), j = (0,1,0), k = (0,0,1).
Dot Product (Scalar Product)
The dot product a·b = a₁b₁ + a₂b₂ + a₃b₃ gives a scalar. It also equals |a||b|cosθ, so:
- If a·b = 0 (and a, b ≠ 0): vectors are perpendicular (θ = 90°)
- If a·b > 0: acute angle between vectors
- If a·b < 0: obtuse angle between vectors
- θ = arccos(a·b / (|a||b|))
Cross Product (Vector Product)
The cross product a×b produces a vector perpendicular to both a and b. For 3D vectors: a×b = (a₂b₃−a₃b₂, a₃b₁−a₁b₃, a₁b₂−a₂b₁). The magnitude |a×b| = |a||b|sinθ equals the area of the parallelogram formed by a and b. Note: a×b = −(b×a).
Position Vectors and Midpoints
If A has position vector a and B has position vector b, the vector AB = b − a. The midpoint M of AB has position vector (a + b)/2. The section formula for point P dividing AB in ratio m:n gives position vector (nb + ma)/(m+n).
Frequently Asked Questions
A vector is a mathematical object that has both magnitude (size) and direction, unlike a scalar which has only magnitude. Vectors are written as column vectors or using i, j, k unit vector notation. In 2D, a vector (3, 4) means 3 units in the x-direction and 4 units in the y-direction. In A-Level Maths, vectors are used to describe positions, displacements, velocities and forces.
The magnitude (or modulus) of a vector a = (x, y) in 2D is |a| = √(x² + y²). For a 3D vector a = (x, y, z), the magnitude is |a| = √(x² + y² + z²). This is derived from Pythagoras' theorem. For example, if a = (3, 4), then |a| = √(9 + 16) = √25 = 5.
The dot product (scalar product) of vectors a = (a₁, a₂, a₃) and b = (b₁, b₂, b₃) is a·b = a₁b₁ + a₂b₂ + a₃b₃. The result is a scalar (number), not a vector. The dot product also equals |a||b|cosθ, where θ is the angle between the vectors. If a·b = 0 and both vectors are non-zero, the vectors are perpendicular.
Use the formula cosθ = (a·b) / (|a||b|), then find θ = arccos((a·b) / (|a||b|)). First calculate the dot product a·b, then calculate the magnitudes |a| and |b|, then divide and apply arccos. For example, if a = (1, 0) and b = (0, 1), the dot product is 0, so cosθ = 0, giving θ = 90°. The angle is always between 0° and 180°.
The cross product of 3D vectors a = (a₁, a₂, a₃) and b = (b₁, b₂, b₃) is a vector perpendicular to both: a×b = (a₂b₃−a₃b₂, a₃b₁−a₁b₃, a₁b₂−a₂b₁). Its magnitude |a×b| = |a||b|sinθ. The cross product is not commutative: a×b = −(b×a). If a×b = 0, the vectors are parallel. Cross products are used in A-Level Further Maths and physics.
A unit vector is a vector with magnitude 1. To find the unit vector in the direction of vector a, divide by its magnitude: â = a / |a|. For example, if a = (3, 4), |a| = 5, so the unit vector is (3/5, 4/5) = (0.6, 0.8). Unit vectors are used to represent direction without specifying magnitude. The standard unit vectors in 3D are i = (1,0,0), j = (0,1,0) and k = (0,0,1).
If A has position vector a and B has position vector b, the midpoint M of AB has position vector m = (a + b)/2. Simply add the corresponding components and divide by 2. For example, if a = (2, 4) and b = (6, 8), then m = ((2+6)/2, (4+8)/2) = (4, 6). The midpoint theorem for vectors states that the vector to M equals the average of the vectors to A and B.