GCSE Link: None
A vector is simply a collection of numbers with a fixed size.
All of the numbers in a vector need to be from the same field of number, e.g. the natural numbers
(ℕ), the integers (ℤ), or the reals (ℝ). A vector containing 4 integers
would be notated as ℤ4.
Vectors can be represented in many different ways:
[123, -42,
314, -999]. This is the most common
representation.
{0: 123,
1: -42, 2: 314,
3: -999}. Each element can be
retrieved using its index.
f: {0,
1, 2, 3} →
ℤ. This is a function which takes an index and returns the element at
that index.
[x, y, z],
it could be represented on a 3-D graph as an arrow from (0,
0, 0) to (x,
y, z)
Two vectors of the same size can be added together element-wise: [a1,
b1, c1] +
[a2, b2,
c2] = [a1+a2,
b1+b2,
c1+c2]. Subtraction
also happens element-wise.
A vector can be multiplied by a scalar (a single number): k ×
[a, b, c] =
[ka, kb, kc].
This has the effect of making the arrow bigger or smaller (but keeping it in the same direction).
Two vectors can also be multiplied together to get the dot product:
[a1, b1,
c1] · [a2,
b2, c2] =
a1×a2 +
b1×b2 +
c1×c2
You can also find the magnitude (length) of a vector: | [a,
b, c] | =
√(a2 + b2 +
c2)
If we have two vectors u and v, then
u·v = |u|
|v| cos(θ) (where θ
is the angle between the two arrows).
Work out the angle between the vectors
u = [7, -5]
and v = [3, -6].
u·v = |u|
|v| cos(θ)
7×3 + (-5)×(-6)
= √(72 + (-5)2)
× √(32 + (-6)2)
× cos(θ)
cos(θ) = 51 /
√3330 ≈ 0.884
θ = cos-1(0.884)
≈ 27.9°