Vector Spaces: Definition & Properties

2330 words
12 min read
Python Week 1: the first filter for runtime behavior
Visual companion
Python
Type and operator map

Python Week 1: the first filter for runtime behavior

View
Revision summary

What this note is really saying

Short form

# Vector Spaces: Definition & Properties ## ๐ŸŽฏ Learning Objectives After this topic you will be able to: - State the eight vector space axioms - Determine whether a given set with operations is a vector space - Prove simple properties from the axioms - Recognise $\mathbb{R}^n$, $\mathbb{R}^{m \times n}$, and polynom...

Vector Spaces: Definition & Properties

๐ŸŽฏ Learning Objectives

After this topic you will be able to:
  • State the eight vector space axioms
  • Determine whether a given set with operations is a vector space
  • Prove simple properties from the axioms
  • Recognise Rn\mathbb{R}^n, Rmร—n\mathbb{R}^{m \times n}, and polynomial spaces as vector spaces
  • Identify when a set fails to be a vector space

๐Ÿ“‹ Prerequisites

  • Vectors Introduction (Week 1) โ€” vector operations in Rn\mathbb{R}^n
  • Matrices Introduction (Week 1) โ€” matrix algebra
  • Basic set notation โ€” set membership โˆˆ\in, subset โІ\subseteq, set builder {xโˆฃcondition}\{x \mid \text{condition}\}
  • Vector spaces are the universe in which all of linear algebra takes place

1. Intuition: What Makes a "Space"?

1.1 The Big Idea

Up to now, you've worked with vectors in R2\mathbb{R}^2, R3\mathbb{R}^3, and Rn\mathbb{R}^n. But vectors don't have to be nn-tuples. A vector could be a polynomial p(x)=a0+a1x+a2x2p(x) = a_0 + a_1 x + a_2 x^2, or a matrix
[abcd]\begin{bmatrix} a & b \\ c & d \end{bmatrix}
, or even a function like sinโก(x)\sin(x). The key question is:
Can we add two things of this type? Can we multiply one by a scalar? If the answer is yes and the operations behave nicely (commute, associate, distribute), then the set is a vector space. The eight axioms below capture this "nice behaviour" precisely. They are the rules of the game for linear algebra. (Diagram)

1.2 Why Axioms?

Axioms let us prove theorems that apply to all vector spaces at once. When we prove "every vector space has a basis" (Week 4), it applies to polynomials, matrices, and Rn\mathbb{R}^n simultaneously โ€” we don't need separate proofs for each.

2. The Eight Axioms

Definition (Vector Space). A vector space VV over the real numbers R\mathbb{R} is a set equipped with two operations:
  • Addition: +:Vร—Vโ†’V+ : V \times V \to V (maps two vectors to a vector)
  • Scalar multiplication: โ‹…:Rร—Vโ†’V\cdot : \mathbb{R} \times V \to V (maps a scalar and a vector to a vector)
satisfying the following eight axioms for all u,v,wโˆˆV\mathbf{u}, \mathbf{v}, \mathbf{w} \in V and all a,bโˆˆRa, b \in \mathbb{R}:
#AxiomNameWhat it means
1u+vโˆˆV\mathbf{u} + \mathbf{v} \in VClosure under additionAdding two vectors stays in the space
2u+v=v+u\mathbf{u} + \mathbf{v} = \mathbf{v} + \mathbf{u}Commutativity of ++Order doesn't matter
3(u+v)+w=u+(v+w)(\mathbf{u} + \mathbf{v}) + \mathbf{w} = \mathbf{u} + (\mathbf{v} + \mathbf{w})Associativity of ++Grouping doesn't matter
4โˆƒ0โˆˆV\exists \mathbf{0} \in V such that v+0=v\mathbf{v} + \mathbf{0} = \mathbf{v}Additive identityZero vector exists
5โˆ€v,โˆƒ(โˆ’v)\forall \mathbf{v}, \exists (-\mathbf{v}) with v+(โˆ’v)=0\mathbf{v} + (-\mathbf{v}) = \mathbf{0}Additive inverseNegatives exist
6cvโˆˆVc\mathbf{v} \in VClosure under scalar multiplicationScaling stays in the space
7a(bv)=(ab)va(b\mathbf{v}) = (ab)\mathbf{v}Associativity of scalar multiplication
81v=v1\mathbf{v} = \mathbf{v}Identity for scalar multiplication
9a(u+v)=au+ava(\mathbf{u} + \mathbf{v}) = a\mathbf{u} + a\mathbf{v}Distributive (scalar over vector addition)
10(a+b)v=av+bv(a+b)\mathbf{v} = a\mathbf{v} + b\mathbf{v}Distributive (scalar addition over vector)
Note: Some textbooks list 10 axioms (counting closure separately). Either way, all 10 rules must hold.

3. Examples of Vector Spaces

3.1 Rn\mathbb{R}^n โ€” Euclidean Space

Set: All nn-tuples x=(x1,โ€ฆ,xn)\mathbf{x} = (x_1, \dots, x_n) with xiโˆˆRx_i \in \mathbb{R}. Addition: Component-wise. Scalar multiplication: Component-wise. This is the vector space you already know. It satisfies all axioms (we verified them in Week 1).

3.2 Rmร—n\mathbb{R}^{m \times n} โ€” Matrices

Set: All mร—nm \times n matrices with real entries. Addition: Matrix addition (entry-wise). Scalar multiplication: Entry-wise. The zero vector is the mร—nm \times n zero matrix.

3.3 PnP_n โ€” Polynomials of Degree โ‰คn\leq n

Set: All polynomials p(x)=a0+a1x+a2x2+โ‹ฏ+anxnp(x) = a_0 + a_1 x + a_2 x^2 + \cdots + a_n x^n with real coefficients. Addition: (p+q)(x)=p(x)+q(x)(p+q)(x) = p(x) + q(x) (add coefficients of like powers). Scalar multiplication: (cp)(x)=cโ‹…p(x)(cp)(x) = c \cdot p(x). The zero vector is the zero polynomial p(x)=0p(x) = 0 (all coefficients zero).
Example 1: Polynomial vector space operations
Let p(x)=2+3xโˆ’x2p(x) = 2 + 3x - x^2, q(x)=1โˆ’2x+4x2q(x) = 1 - 2x + 4x^2 in P2P_2.
p+q=(2+1)+(3โˆ’2)x+(โˆ’1+4)x2=3+x+3x2p + q = (2+1) + (3-2)x + (-1+4)x^2 = 3 + x + 3x^2
โˆ’2p=โˆ’4โˆ’6x+2x2-2p = -4 - 6x + 2x^2

3.4 C[a,b]C[a,b] โ€” Continuous Functions

Set: All continuous functions f:[a,b]โ†’Rf: [a,b] \to \mathbb{R}. Addition: (f+g)(x)=f(x)+g(x)(f+g)(x) = f(x) + g(x). Scalar multiplication: (cf)(x)=cf(x)(cf)(x) = c f(x). The zero vector is the constant function f(x)=0f(x) = 0.

3.5 Rโˆž\mathbb{R}^\infty โ€” Sequences

Set: All infinite sequences (x1,x2,x3,โ€ฆโ€‰)(x_1, x_2, x_3, \dots) of real numbers. Addition and scalar multiplication: Component-wise.

4. Non-Examples (Failure Cases)

4.1 Zn\mathbb{Z}^n โ€” Integer Vectors

Set: nn-tuples of integers. Axiom 6 fails: scalar multiplication by 12\frac{1}{2} gives non-integer entries. 12(1,2)=(0.5,1)\frac{1}{2}(1, 2) = (0.5, 1) is not in Z2\mathbb{Z}^2. So Zn\mathbb{Z}^n is not a vector space over R\mathbb{R}.

4.2 First Quadrant in R2\mathbb{R}^2

Set: {(x,y)โˆฃxโ‰ฅ0,yโ‰ฅ0}\{(x,y) \mid x \geq 0, y \geq 0\}. Axiom 5 fails: (โˆ’1)v=โˆ’v(-1)\mathbf{v} = -\mathbf{v} has negative components (unless v=0\mathbf{v} = \mathbf{0}), which are not in the first quadrant.

4.3 Unit Circle

Set: {xโˆˆR2โˆฃโˆฅxโˆฅ=1}\{\mathbf{x} \in \mathbb{R}^2 \mid \|\mathbf{x}\| = 1\}. Axiom 1 fails: (1,0)+(1,0)=(2,0)(1,0) + (1,0) = (2,0) has length 22, not 11, so the sum is not on the unit circle. Axiom 6 also fails: 2(1,0)=(2,0)2(1,0) = (2,0) is not on the unit circle.

5. Simple Consequences of the Axioms

From the axioms we can prove:
PropertyStatementProof
Uniqueness of zeroThe zero vector is uniqueSuppose 0\mathbf{0} and 0โ€ฒ\mathbf{0}' are both zero vectors. Then 0=0+0โ€ฒ=0โ€ฒ\mathbf{0} = \mathbf{0} + \mathbf{0}' = \mathbf{0}'
Uniqueness of negativesFor each v\mathbf{v} , โˆ’v-\mathbf{v} is uniqueSimilar argument
** 0โ‹…v=00 \cdot \mathbf{v} = \mathbf{0} **Scalar zero times any vector is the zero vector0โ‹…v=(0+0)โ‹…v=0โ‹…v+0โ‹…v0\cdot\mathbf{v} = (0+0)\cdot\mathbf{v} = 0\cdot\mathbf{v} + 0\cdot\mathbf{v} , subtract 0โ‹…v0\cdot\mathbf{v}
** cโ‹…0=0c \cdot \mathbf{0} = \mathbf{0} **Any scalar times zero vector is zerocโ‹…0=cโ‹…(0+0)=cโ‹…0+cโ‹…0c\cdot\mathbf{0} = c\cdot(\mathbf{0}+\mathbf{0}) = c\cdot\mathbf{0} + c\cdot\mathbf{0} , subtract cโ‹…0c\cdot\mathbf{0}
** (โˆ’1)v=โˆ’v(-1)\mathbf{v} = -\mathbf{v} **โˆ’1-1 times a vector is its additive inversev+(โˆ’1)v=(1+(โˆ’1))v=0โ‹…v=0\mathbf{v} + (-1)\mathbf{v} = (1+(-1))\mathbf{v} = 0\cdot\mathbf{v} = \mathbf{0}
Proof: 0โ‹…v=00 \cdot \mathbf{v} = \mathbf{0}
>0โ‹…v=(0+0)โ‹…v(propertyย ofย realย numbers)=0โ‹…v+0โ‹…v(axiomย 10ย โ€”ย distributivity)>> \begin{aligned} 0 \cdot \mathbf{v} &= (0 + 0) \cdot \mathbf{v} \quad \text{(property of real numbers)} \\ &= 0 \cdot \mathbf{v} + 0 \cdot \mathbf{v} \quad \text{(axiom 10 โ€” distributivity)} \\ \end{aligned} >
Now subtract 0โ‹…v0 \cdot \mathbf{v} from both sides (axiom 5 says we can):
>0โ‹…vโˆ’0โ‹…v=(0โ‹…v+0โ‹…v)โˆ’0โ‹…v>> 0 \cdot \mathbf{v} - 0 \cdot \mathbf{v} = (0 \cdot \mathbf{v} + 0 \cdot \mathbf{v}) - 0 \cdot \mathbf{v} >
>0=0โ‹…v+(0โ‹…vโˆ’0โ‹…v)=0โ‹…v+0=0โ‹…v>> \mathbf{0} = 0 \cdot \mathbf{v} + (0 \cdot \mathbf{v} - 0 \cdot \mathbf{v}) = 0 \cdot \mathbf{v} + \mathbf{0} = 0 \cdot \mathbf{v} >
Thus 0โ‹…v=00 \cdot \mathbf{v} = \mathbf{0}. โˆŽ

6. Edge Cases & Gotchas

SituationWhat Happens
Empty setCannot be a vector space โ€” axiom 4 requires a zero vector
**Singleton set {0}\{\mathbf{0}\} **This is a vector space (the trivial space)
Different fieldsVector spaces can be defined over Q\mathbb{Q} or C\mathbb{C} , not just R\mathbb{R}
Axiom 4 and 5 must hold for all vectorsA zero vector must exist, but it must work for every vector

7. Common Pitfalls

โŒ Pitfall 1: Checking only closure

Students check axioms 1 and 6 (closure) and assume the rest follow. But the other 8 axioms are not automatic โ€” though in practice, if addition and scalar multiplication are defined component-wise (or coefficient-wise), the axioms usually hold.

โŒ Pitfall 2: Confusing the zero vector with the number 0

In a polynomial space, the "zero" is p(x)=0p(x) = 0 (all coefficients zero), not the number 0. In R2ร—2\mathbb{R}^{2 \times 2}, the zero is
[0000]\begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}
.

โŒ Pitfall 3: Thinking any subset of Rn\mathbb{R}^n is a vector space

Only subsets that are subspaces (closed under addition and scalar multiplication, contain zero) qualify. Most subsets fail at least one axiom.

8. Formula Summary Table

ConceptKey Idea
Vector spaceA set with addition and scalar multiplication satisfying 10 axioms
Axioms 1-5Addition forms a commutative group (closure, commutativity, associativity, identity, inverses)
Axioms 6-10Scalar multiplication interacts properly with addition
** Rn\mathbb{R}^n **The canonical vector space
** PnP_n **Polynomials of degree โ‰คn\leq n form a vector space
** Rmร—n\mathbb{R}^{m \times n} **Matrices form a vector space
Trivial space{0}\{\mathbf{0}\} is a vector space

9. ๐Ÿ“ Practice Questions

Q1: Verifying axioms for โ„ยฒ
Verify axiom 9 (a(u+v)=au+ava(\mathbf{u}+\mathbf{v}) = a\mathbf{u} + a\mathbf{v}) for u=(1,2)\mathbf{u} = (1,2), v=(3,4)\mathbf{v} = (3,4), a=5a = 5 in R2\mathbb{R}^2.
Solution: LHS: a(u+v)=5((1,2)+(3,4))=5(4,6)=(20,30)a(\mathbf{u}+\mathbf{v}) = 5((1,2)+(3,4)) = 5(4,6) = (20,30) RHS: au+av=5(1,2)+5(3,4)=(5,10)+(15,20)=(20,30)a\mathbf{u} + a\mathbf{v} = 5(1,2) + 5(3,4) = (5,10) + (15,20) = (20,30) LHS = RHS โœ“ Q2: Is this a vector space?
Is V={(x,y)โˆˆR2โˆฃx=y}V = \{(x,y) \in \mathbb{R}^2 \mid x = y\} a vector space with standard operations?
Solution: Yes. Check:
  • Closure under addition: (a,a)+(b,b)=(a+b,a+b)(a,a)+(b,b) = (a+b, a+b) โœ“ (first = second)
  • Closure under scalar multiplication: c(a,a)=(ca,ca)c(a,a) = (ca, ca) โœ“
  • Zero: (0,0)(0,0) is in VV โœ“
  • Negatives: โˆ’(a,a)=(โˆ’a,โˆ’a)-(a,a) = (-a,-a) is in VV โœ“
  • Other axioms inherited from R2\mathbb{R}^2
So VV is a vector space (it's the line y=xy = x). Q3: Is this a vector space?
Is V={(x,y)โˆˆR2โˆฃxy=0}V = \{(x,y) \in \mathbb{R}^2 \mid xy = 0\} a vector space?
Solution: No. Check closure under addition: (1,0)โˆˆV(1,0) \in V, (0,1)โˆˆV(0,1) \in V, but (1,0)+(0,1)=(1,1)(1,0)+(0,1) = (1,1) is not in VV because 1โ‹…1=1โ‰ 01\cdot1 = 1 \neq 0. Closure fails, so VV is not a vector space. Q4: Polynomial vector space
In P2P_2, compute 2pโˆ’3q2p - 3q where p(x)=x2โˆ’2x+1p(x) = x^2 - 2x + 1, q(x)=3x+2q(x) = 3x + 2.
Solution: 2p=2x2โˆ’4x+22p = 2x^2 - 4x + 2 3q=9x+63q = 9x + 6 2pโˆ’3q=2x2+(โˆ’4โˆ’9)x+(2โˆ’6)=2x2โˆ’13xโˆ’42p - 3q = 2x^2 + (-4-9)x + (2-6) = 2x^2 - 13x - 4 Q5: Zero vector in matrix space
What is the zero vector in R2ร—3\mathbb{R}^{2 \times 3}?
Solution: The 2ร—32 \times 3 matrix of all zeros:
>[000000]>> \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix} >
. Q6: Proof from axioms
Prove that cโ‹…0=0c \cdot \mathbf{0} = \mathbf{0} for any scalar cc.
Solution: cโ‹…0=cโ‹…(0+0)c \cdot \mathbf{0} = c \cdot (\mathbf{0} + \mathbf{0}) (axiom 4) =cโ‹…0+cโ‹…0= c \cdot \mathbf{0} + c \cdot \mathbf{0} (axiom 9) Subtract cโ‹…0c \cdot \mathbf{0} from both sides: cโ‹…0โˆ’cโ‹…0=(cโ‹…0+cโ‹…0)โˆ’cโ‹…0c \cdot \mathbf{0} - c \cdot \mathbf{0} = (c \cdot \mathbf{0} + c \cdot \mathbf{0}) - c \cdot \mathbf{0} 0=cโ‹…0+(cโ‹…0โˆ’cโ‹…0)=cโ‹…0+0=cโ‹…0\mathbf{0} = c \cdot \mathbf{0} + (c \cdot \mathbf{0} - c \cdot \mathbf{0}) = c \cdot \mathbf{0} + \mathbf{0} = c \cdot \mathbf{0} โœ“ Q7: Identifying axiom violations
Consider V=R2V = \mathbb{R}^2 with modified addition: (a,b)โŠ•(c,d)=(a+c+1,b+d)(a,b) \oplus (c,d) = (a+c+1, b+d). Is VV a vector space? If not, which axiom fails?
Solution: Let's check the zero vector. We need 0\mathbf{0} such that (a,b)โŠ•0=(a,b)(a,b) \oplus \mathbf{0} = (a,b). If 0=(z1,z2)\mathbf{0} = (z_1, z_2), then (a+z1+1,b+z2)=(a,b)(a+z_1+1, b+z_2) = (a,b). So a+z1+1=aโ‡’z1=โˆ’1a+z_1+1 = a \Rightarrow z_1 = -1, b+z2=bโ‡’z2=0b+z_2 = b \Rightarrow z_2 = 0. So 0=(โˆ’1,0)\mathbf{0} = (-1, 0).
But now axiom 1 (closure) and others might work... Let's check commutativity: (a,b)โŠ•(c,d)=(a+c+1,b+d)=(c+a+1,d+b)=(c,d)โŠ•(a,b)(a,b) \oplus (c,d) = (a+c+1, b+d) = (c+a+1, d+b) = (c,d) \oplus (a,b) โœ“.
What about axiom 4 with 0=(โˆ’1,0)\mathbf{0} = (-1,0)? (a,b)โŠ•(โˆ’1,0)=(aโˆ’1+1,b+0)=(a,b)(a,b) \oplus (-1,0) = (a-1+1, b+0) = (a,b) โœ“.
But axiom 2 (usual numbering) corresponds to existence of negatives: for (a,b)(a,b), we need (โˆ’aโˆ’2,โˆ’b)(-a-2, -b) because (a,b)โŠ•(โˆ’aโˆ’2,โˆ’b)=(a+(โˆ’aโˆ’2)+1,b+(โˆ’b))=(โˆ’1,0)=0(a,b) \oplus (-a-2, -b) = (a+(-a-2)+1, b+(-b)) = (-1, 0) = \mathbf{0} โœ“.
So this actually works! But wait โ€” is scalar multiplication standard? If scalar multiplication is also non-standard, we need to check.
If scalar multiplication is standard c(a,b)=(ca,cb)c(a,b) = (ca, cb), then check axiom 9: c((a,b)โŠ•(d,e))=c(a+d+1,b+e)=(c(a+d+1),c(b+e))=(ca+cd+c,cb+ce)c((a,b) \oplus (d,e)) = c(a+d+1, b+e) = (c(a+d+1), c(b+e)) = (ca+cd+c, cb+ce) c(a,b)โŠ•c(d,e)=(ca,cb)โŠ•(cd,ce)=(ca+cd+1,cb+ce)c(a,b) \oplus c(d,e) = (ca, cb) \oplus (cd, ce) = (ca+cd+1, cb+ce)
These are equal only if c=1c = 1! So the distributive axiom fails for cโ‰ 1c \neq 1.
Thus VV is not a vector space. Q8: Trivial vector space
Show that V={0}V = \{\mathbf{0}\} with 0+0=0\mathbf{0} + \mathbf{0} = \mathbf{0} and c0=0c\mathbf{0} = \mathbf{0} is a vector space.
Solution: All axioms hold trivially because every operation returns the only element 0\mathbf{0}. Q9: Function space
Is V={f:Rโ†’Rโˆฃf(0)=0}V = \{f: \mathbb{R} \to \mathbb{R} \mid f(0) = 0\} a vector space?
Solution: Yes.
  • Closure under addition: (f+g)(0)=f(0)+g(0)=0+0=0(f+g)(0) = f(0) + g(0) = 0 + 0 = 0 โœ“
  • Closure under scalar multiplication: (cf)(0)=cโ‹…f(0)=cโ‹…0=0(cf)(0) = c \cdot f(0) = c \cdot 0 = 0 โœ“
  • Zero function z(x)=0z(x) = 0 satisfies z(0)=0z(0) = 0 โœ“
  • Negative: (โˆ’f)(0)=โˆ’f(0)=0(-f)(0) = -f(0) = 0 โœ“ Q10: Non-example with wrong scalar field
Explain why V={(x,y)โˆฃx,yโˆˆQ}V = \{(x,y) \mid x,y \in \mathbb{Q}\} (vectors with rational entries) is not a vector space over R\mathbb{R}.
Solution: Scalar multiplication by an irrational cc (e.g., 2\sqrt{2}) gives 2(1,0)=(2,0)\sqrt{2}(1,0) = (\sqrt{2}, 0), and 2\sqrt{2} is not rational. So closure under scalar multiplication fails when the scalars are R\mathbb{R}.
(Note: VV is a vector space over Q\mathbb{Q}, but the course uses R\mathbb{R} as scalars.)

๐Ÿ”— Cross-References

  • Next topic: Subspaces โ€” smaller vector spaces inside larger ones
  • Week 4 (Basis & Dimension): Every vector space has a basis
  • Week 5 (Linear Transformations): Maps between vector spaces
  • BSMA1001 (Maths 1): Functions, sets, and basic algebra
  • BSCS2004 (ML Foundations): Feature spaces are vector spaces Join Discord Previous2.2 Cramer's Rule & InversesNext3.2 Subspaces
Document outline

Keep your place and jump directly to a heading.

Table of contents

No note selected

Open a chapter to see its outline, backlinks, and sources here.