# Why does this description of vector spaces include so many tedious/ seemingly obvious criteria?

I'm a CS student. I commonly notice that when I'm learning math-heavy topics (like machine learning) that the descriptions often seem overly tedious and unintuitive, like the one below.

Vector spaces are the basic setting in which linear algebra happens. A vector space $$V$$ is a set (the elements of which are called vectors) on which two operations are defined: vectors can be added together, and vectors can be multiplied by real numbers called scalars. $$V$$ must satisfy

1. There exists an additive identity (written $$0$$) in $$V$$ such that $$x + 0 = x$$ for all $$x\in V$$.
2. For each $$x\in V$$, there exists an additive inverse (written $$−x$$) such that $$x + (−x) = 0$$.
3. There exists a multiplicative identity (written $$1$$) in $$\mathbb{R}$$ such that $$1x = x$$ for all $$x\in V$$.
4. Commutativity: $$x + y = y + x$$ for all $$x,y\in V$$.
5. Associativity: $$(x + y) + z = x + (y + z)$$ and $$\alpha(\beta x) = (\alpha \beta)x$$ for all $$x,y,z\in V$$ and $$\alpha,\beta\in\mathbb{R}$$.
6. Distributivity: $$\alpha(x + y) = \alpha x + \alpha y$$ and $$(\alpha+\beta)x = \alpha x + \beta x$$ for all $$x,y\in V$$ and $$\alpha,\beta\in\mathbb{R}$$.

Why do we even need to specify these rules? It seems fairly obvious that in 1., $$x +0 =x$$. If fact, I can't think of a case where that wouldn't be true.

• What if $0$ is not in $V$? So for example $\mathbb R^{*}$ is not a vector space with basic addition and multiplication Commented Jan 30, 2023 at 17:08
• It's not that $0+x=x$ might fail (although it can happen that something called "$0$" doesn't behave as the identity element, e.g. in the real numbers with multiplication rather than addition as the main binary operation) - rather, it's that some structures (even structures of interest!) don't have any element $c$ satisfying $c+x=x$ for all $x$. When such an element is present it's natural to call it "$0$," but there's no guarantee that such a thing always exists. Commented Jan 30, 2023 at 17:18
• As a CS major, you will need to implement all the above rules when writing code to describe vector algebra. Commented Jan 30, 2023 at 17:54
• Unless someone has done the work for you (i.e. Fortran), your coding environment would not know how to handle Vector + 0. It will be up to you to implement the rules such that they are mathematically consistent and accurate. Commented Jan 30, 2023 at 18:25
• I think one thing you're seeing differently from a mathematician, that hasn't been addressed in the answers, is that this is not a description of a vector space. This is a definition of a vector space. These axioms create the concept of vector spaces from nothing. This list of six axioms (statements that we agree to accept as true) basically creates a "class" with "properties and methods". Now that we've defined the class, we can instantiate it and do math with it. Without defining the class first, we have no context to work with instances of that class. Commented Jan 31, 2023 at 3:30

Well, you might find it tedious, but what it is is complete.

It's too big to paste in here, but I invite you to contemplate the Python language specification. And if you check out any other computer language's, you'll start to realize what a model of brevity the definition of a vector space is. [A grammar specification isn't exactly the same beast as an axiom list for a mathematical structure, but they're at about the same level of detail.]

Now, as to the "obvious" part. First, math is a formalization of experience, so most axioms describe how things have "usually" behaved - it's just that mathematicians bother to write them down. And second, in the past (I'm looking at you, 19th century!), things that seemed obvious sometimes ended up not being true, or maybe not necessarily true. So, again, we bother to write them down, so we can see exactly what we've assumed.

Another point about the obviousness is that these rules have been around for a while, and have already influenced your education and the mathematical world you live in. If you go back far enough, you can find people who disputed that $$0$$ was even a number, and I'm sure they'd have issues with you adding it to another number. Whereas I'm guessing you saw $$x+0=x$$ for the first time at a very young age.

Also, as Noah indicated, there are much more exotic structures out there, but when we find something that "acts like $$0$$", we now automatically call it "$$0$$". Heck, when we first encounter something new, one of the first things we do is look to see if there is anything that acts like $$0$$.

$$\newcommand\R{\mathbb R}$$Consider the following:

Denote multiplication of $$a, b \in \R$$ by $$a\oplus b = ab$$ and denote exponentiatiob by $$a\otimes b = b^a$$. Then $$\R_{>0}$$, the set of all positive real numbers, is a vector space with addition $$\oplus$$ and scalar multiplication $$\otimes$$ over the field $$\R$$ with zero vector $$1$$ and multiplicative identity $$1$$. Following your numbering of the axioms:

1. $$x \oplus 1 = x1 = x$$ for all $$x \in \R_{>0}$$, so $$1 \in \R_{>0}$$ is the zero vector.
2. For each $$x \in \R_{>0}$$, consider that $$1/x \in \R_{>0}$$ and that $$x \oplus\frac1x = x\frac1x = 1$$. $$1$$ is the zero vector, so $$1/x$$ is the additive inverse of $$x$$.
3. $$1\otimes x = x^1 = x$$ for all $$x \in \R_{>0}$$, so $$1 \in \R$$ is the multiplicative identiy.
4. $$x\oplus y = xy = yx = y\oplus x$$ for all $$x, y \in \R_{>0}$$.
5. $$(x\oplus y)\oplus z = (xy)z = x(yz) = x\oplus(y\oplus z)$$ and $$\alpha\otimes(\beta\otimes x) = (x^\beta)^\alpha = x^{\beta\alpha} = (\alpha\beta)\otimes x$$ for all $$x, y, z \in \R_{>0}$$ and for all $$\alpha,\beta \in \R$$.
6. $$\alpha\otimes(x\oplus y) = (xy)^\alpha = x^\alpha y^\alpha = (\alpha\otimes x)\oplus(\alpha\otimes y)$$ and $$(\alpha+\beta)\otimes x = x^{\alpha+\beta} = x^\alpha x^\beta = (\alpha\otimes x)\oplus(\beta\otimes x)$$ for all $$x, y \in \R_{>0}$$ and $$\alpha, \beta \in \R$$.

What you seem to not understand is that the vector space axioms are not talking about "vectors", where I assume that your understanding of the word "vector" is "arrow in space with a definite length that can be represented as $$n$$ real numbers $$(\alpha_1,\dotsc,\alpha_n)$$, and we call $$n$$ the dimension of the space." Again, this is not what the vector space axioms are about.

The vector space axioms start with completely arbitrary and undefined symbols $$+$$, $$\cdot$$, $$0$$, $$1$$, and then give you rules for these completely arbitrary symbols to follow. If the completely arbitrary symbols follow the given rules, then we say that we have something that we have decided to call a "vector space".

In the above, I used the symbols $$\oplus$$ and $$\otimes$$ to give some semblance with addition and multiplication, but this was unnecessary; I could just as well have written $$xy$$ and $$x^\alpha$$ directly. The symbols used are entirely unimportant; what matters is that these symbols follow the vector space axioms.

This definition describes the structures where the theorems about vectors can be proved. One such important theorem describes the set of solutions to a set of linear equations as sums of solutions to the homogeneous equation added to a particular solution to the inhomogeneous equation. You need all those rules to establish that. There are many much deeper theorems, not at all obvious (and used in machine learning), that follow from the same properties.

I'm surprised that you find the axioms unintuitive. What about them violates your intuition? "Tedious" suggests that there are too many. I think there are very few given the depth of results that follow from them.

In answer to the particular question in the last paragraph, Axiom 1 asserts the existence of a vector with a certain property. It fails for the set of positive real numbers under addition, so that set with that operation can't be a vector space. The theorems about vector spaces fail there.

• To the upvoter : Please read the answer carefully before upvoting it. This does not mean that I disagree with the upvote. But take your time in the future. Commented Jan 30, 2023 at 17:18

These axioms are not a description of vectors, they are a set of requirements for what can be called a vector. The language used in the definition here are quite loaded, and so it may seem obvious that they act the way they are specified.

I'm going to rewrite your definition in a way that is less suggestive:

A real vector space $$(V,\star,\triangleright)$$ is a set $$V$$ (the elements of which are called vectors) on which two operations are defined

1. vectors can be composed together $$-$$ this is written $$x \star y \in V$$ for $$x, y \in V$$

2. vectors can be acted on by real numbers (called scalars) $$-$$ this is written $$\alpha \triangleright x \in V$$ for $$\alpha \in \Bbb R$$ and $$x\in V$$

and which satisfies the following conditions

1. There exists some $$\iota$$ in $$V$$ such that $$x \star \iota = x$$ for all $$x \in V$$

2. For each $$x \in V$$, there exists some $$y \in V$$ such that $$x \star y = \iota$$

3. The action of $$1\in\Bbb R$$ satisfies $$1\triangleright x = x$$ for all $$x \in V$$

4. Commutativity: $$x \star y = y \star x$$ for all $$x, y \in V$$

5. Associativity: $$(x \star y) \star z = x \star (y \star z)$$ and $$\alpha\triangleright (\beta \triangleright x) = (\alpha \cdot \beta) \triangleright x$$ for all $$x, y, z \in V$$ and $$\alpha,\beta \in \Bbb R$$

6. Distributivity: $$\alpha \triangleright (x \star y) = (\alpha \triangleright x) \star (\alpha\triangleright y)$$ and $$(\alpha + \beta)\triangleright x = (\alpha \triangleright x) \star (\beta\triangleright x)$$ for all $$x, y \in V$$ and $$\alpha,\beta\in\Bbb R$$

If $$(V,\star,\triangleright)$$ is a real vector space, we may make the following notation/terminology substitutions:

1. $$\star$$ will be called (vector) addition and written $$+$$, i.e. $$x + y := x\star y$$
2. $$\triangleright$$ will be called scalar multiplication and written using concatenation, i.e. $$\alpha v := \alpha \triangleright v$$
3. The element $$\iota$$ is called the additive inverse, and written $$0$$.
4. The element $$1\in\Bbb R$$ is called the scalar multiplicative identity.
5. For each $$x\in V$$, the $$y\in V$$ for which $$x+y = 0$$ is called the additive inverse of $$x$$, and is written $$-x$$.
6. The addition symbol may be omitted when the second addend is written as an additive inverse, i.e. $$x-y := x + (-y)$$, and called (vector) subtraction.
7. For nonzero $$\alpha\in \Bbb R$$, we may write $$v/\alpha := (1/\alpha)v$$, and call it scalar division.

We make these substitutions exactly because these notations and terminologies are so suggestive. By simply writing these symbols and using these words, it suddenly becomes extremely obvious how to do math on vector spaces. For example, the symbol $$+$$ is kind of a shorthand for "commutative, associative, has identity called $$0$$, each $$x$$ has inverse called $$-x$$", a.k.a. an abelian group.

This is what you're experiencing when you see these axioms as obvious. Hence, breaking it up into two steps (abstract definition, then notational substitution) hopefully helps you see more clearly why this definition isn't redundant.

I will start with the last statement:

Why do we even need to specify these rules? It seems fairly obvious that in (i), $$x +0 =x$$. If fact, I can't think of a case where that wouldn't be true.

The above is the definition for $$0$$ which is not "obvious" exactly for vectors. As a CS major if you want to program a vector structure that can handle the necessary algebra you will need to define a special vector 0 which obeys the above rule and use it in the algorithms.

Below is partial a C# example (which is nice because everything is explicitly described) implementing a Vector structure and only the + operation that implements rules i), iv) and v). I am omitting any storage-related code and only including the math parts

public class Vector
{

#region Algebra
// Design Decision: A vector is zero if it is empty
// or all the elements are of zero value.
public bool IsZero { get => data.Length == 0 || data.All(x => x == 0.0); }
public static Vector Zero { get; } = new Vector(0);
public static Vector operator +(Vector a, Vector b)
{
if (a.IsZero && b.IsZero) return Zero;
if (a.IsZero) return b;
if (b.IsZero) return a;
if (a.Size != b.Size)
{
throw new ArgumentException("Incompatible Sizes", nameof(b));
}
double[] result = new double[a.Size];
for (int index = 0; index < result.Length; index++)
{
result[index] = a[index] + b[index];
}
return new Vector(result);
}
#endregion
}


As you can see there is a need for the concept of a Zero vector (and also a way to check if a vector is zero). When adding two vectors, if one of the arguments is zero, it will return the other argument. If both arguments are zero it will return the zero vector.

Finally, elements are added 1:1 in operator + which implements the commutativity property a+b=b+a since internally C# implements this property for the underlying type of double.

Here is the example usage of the code above. Your code must be able to handle addition with the additive identity (zero) element also.

static class Program
{
static void Main(string[] args)
{
Vector x = new Vector(1.0, 2.0, 3.0);
Vector z = Vector.Zero;
Vector y = x + z;
}
}

• I like the idea of an answer that shows what a computer program does to implement vector arithmetic. I don't like the fact that this implementation assumes a vector is a tuple of numbers. This would be a better answer if you wrote an interface that any class would have to implement in order to claim it was implementing a vector space. Commented Jan 30, 2023 at 19:27
• @EthanBolker - internally the storage is an array and not a tuple if that makes a difference. Anyway, C# 11 allows static members and operators in interfaces so yes, this is doable. I will update my answer. I was also going to show the Fortran equivalent of a vector user type that holds an array and implements operators etc,. Commented Jan 30, 2023 at 19:31
• Any mention of arrays and internal storage should be irrelevant and a distraction. For example, a good interface would allow an implementation where the vectors were functions that accepted a real number as an argument and returned a real number. Commented Jan 30, 2023 at 19:51

Why do we even need to specify these rules? It seems fairly obvious that in (i), x +0 =x. If fact, I can't think of a case where that wouldn't be true.

Based on your question, it seems that you may be overlooking the importance of the quantifiers in these logical statements. I find this to be pretty common when students transition from something like elementary algebra courses to college-level mathematics.

To be clear, these are the existential quantifier ("there exists", symbol $$\exists$$), and the universal quantifier ("for all", symbol $$\forall$$), one of which is used in each of the vector-space axioms. Hopefully you have or will be taught about the logical meaning of these quantifiers. If you wrote each of these statements out in fully formal symbols, you'd find that the quantifier would be the very first (outermost) symbol in each case.

As an example, here's a set that fails axiom (i): the natural numbers (i.e., the positive integers). You can add natural numbers together, and the operation is closed: sums are always another natural number. But this set has no additive identity (zero element), which is what vector axiom (i) is demanding. (This is not a set that is closed under scalar multiplication by a real number, but other examples could provide that.)

It may possibly be helpful to browse through the larger menu of algebraic structures -- such as groups, rings, fields, lattices, algebras, as well as vector spaces -- and see how different structures are defined by mixing & matching similar axiom requirements. There's a nifty chart of group-like structure features here: note that an identity element like this is required for structures like groups and monoids; but not required for semigroups, magmas, etc.

You might think that this is all obvious if you think of $$\mathbb R^n$$ (or even just $$\mathbb R^3$$) as your "typical" vector space. But as a computer scientist (in particular if you deal with cryptography) you are quite likely to encounter exotic things such as vector spaces over finite fields, where your geometric intuition is not so reliable. You really do need the axioms to tell you that what you are dealing with there is a vector space, so that the machinery of vector spaces can be applied.

The definition of a vector space is boring. Knowing whether something is or isn't a vector space is useless if you don't know anything else about vector spaces. The only reason you'd care if some object is a vector space is if there's some fact you want to know about your object, and you know that fact is true about all vector spaces.

But lots of facts are true about all vector spaces. If you can prove that some object is a vector space, and you have lots of theorems about vector spaces, then you can use those theorems straight away, without checking them in your specific object. In particular, you can define linear maps between vector spaces, and linear maps have lots of useful properties (matrix representation, the rank-nullity theorem, eigenvalues and eigenvectors, etc.). It would be tedious to prove all of these separately for $$\mathbb{R}^n$$, and for matrices, and for finite fields, and for continuous functions, and so on. Proving those theorems for vector spaces, then proving that each of those is a vector space, is a shortcut.

So the reason you have to learn ten tedious facts about vector spaces is because learning those ten facts is less tedious than proving all your proofs five times over or more.

Edit: an example where there's no 0 for which $$x+0=x$$ is the natural numbers $$\mathbb{N}:=\{1,2,3,\ldots\}$$. You can add those together and multiply them by natural numbers, but there's no zero number. So lots of theorems about vector spaces don't apply to $$\mathbb{N}$$.

It seems fairly obvious that in (i), x +0 =x. If fact, I can't think of a case where that wouldn't be true.

Sure, I can give an example of a case where that isn't true.

I'm going to propose a definition of a vector space over the real numbers called $$W$$. Maybe my definition is valid, maybe it's invalid. We'll figure that out later.

Here are the components of my proposed definition:

• The elements of $$W$$ are real numbers.
• For all $$y$$ in $$W$$, define $$0 + y = 1$$.
• For all $$x \ne 0$$ in $$W$$, define $$x + 0 = 2$$.
• For all $$x \ne 0$$ and $$y \ne 0$$ in $$W$$, define $$x + y$$ as the ordinary sum of $$x$$ and $$y$$ as real numbers.
• For all real numbers $$a$$ and all elements $$x$$ of $$W$$, define $$a x$$ as the ordinary sum of $$a$$ and $$5$$ as real numbers.

"But wait," you may be thinking, "that definition is totally ridiculous!" And you're completely right. This definition that I just gave is obviously ridiculous. But math doesn't care about how ridiculous something is! Anything that satisfies the axioms of a vector space is a vector space, no matter how ridiculous it is.

Intuitively, it seems like $$W$$ is so ridiculous that it probably isn't really a vector space. But is that intuition correct? Or does it turn out that $$W$$ actually is a vector space, in spite of how ridiculous it is? In order to figure that out, we have to look at the axioms of a vector space and see whether or not $$W$$ obeys them.

Fortunately, if we look at the axioms, we find that $$W$$ does not obey all of them. (As a matter of fact, it doesn't obey any of them!) So it turns out that our intuition was correct: $$W$$ really isn't a vector space after all.

The point of such definitions is to be precise. Personally I find such "list of axiom" definitions somewhat obtuse pedagogically. There are many ways one might approach defining a vector space once some context has been established. For example I could say a vector space is

1. an Abelian group $$G$$ (the vectors)
2. a field $$F$$ (the scalars)
3. an action of $$F$$ on $$G$$ (scalar multiplication)

However I have not defined what an Abelian group or a field or an action is, so I will have to be more precise. For pedagogical purposes, I might introduce a group as the top of the following hierarchy of algebraic objects:

• (A) a magma is a set $$S$$ equipped with a binary operation $$S\times S \to S$$. (If I was pedantic I would say it is closed under the operation)
• (B) a semigroup is a magma where the binary operation is associative: $$a(bc) = (ab)c$$ where the binary operation is denoted by juxtaposition.
• (C) a monoid is a semigroup where there is an identity element, denoted $$e$$, such that $$ea = ae = a$$ for every $$a\in S$$.
• (D) a group is a monoid where every element has an inverse, denoted $$a^{-1}$$, such that $$a^{-1}a = a\, a^{-1} = e$$.
• (E) an Abelian group is a group for which the binary operation is commutative: $$ab=ba$$ for all $$a,b\in S$$.

Saying a vector space has an Abelian group structure, (1) above, already covers your properties (i) additive identity (C), (ii) additive inverse (D), (iv) commutativity (E), and (v) associativity (B).

We could now further define a ring, then a field, Your definition skips the properties of a field so I'm not going to list them, but a field has addition and multiplication that behave just like the real numbers: additive identity 0, multiplicative identity 1, both have inverses except division by 0. Both are associative and commutative.$$^{\dagger}$$

Then finally we define the action of scalar multiplication, which is a map $$F \times G \to G$$. This is where the last two properties come in,

• (iii) scalar identity: the multiplicative identity of the field acts like the additive identity of $$G$$.
• (vi) distributivity: scalar multiplication distributes over the Abelian group addition, in other words it is an Abelian group homomorphism.

This definition is still somewhat incomplete (e.g. what about multiplication by 0? It acts as the map sending every element of $$G$$ to the additive identity zero vector), but that covers the properties that you listed.

The point here is that a vector space has a lot of structure which makes it very nice to work with. With a bit of abstract algebra we can give names to those parts of the structure instead of listing them out axiomatically, because each of those structure was already defined axiomatically. Once we are familiar with the building blocks (Abelian groups, fields) then we can put them together to get a new composite structure (vector spaces). This is also not the only perspective to define vector spaces, one can look at them in different ways which reveals different aspects of their structure.

Listing a bunch of axioms is expedient, especially for someone without background in abstract algebra, but not particularly helpful in giving context of what a vector space is. Learning a little bit about other algebraic objects (groups, rings, and modules for example) gives you more context for what a vector space is not. But since vector spaces are so ubiquitous in applied fields like CS, engineering, and physics, it is more expedient to skip an intro to abstract algebra and just give you some axiomatic definitions for a vector space.

Notice that we didn't define what set is, or what a map between sets is, or what the Cartesian product of sets $$\times$$ is. I also didn't say what the symbols $$\in$$ means. All of this would be covered in an intro to set theory course, where you would learn about the axioms of Zermelo Frankel set theory, and about the Axiom of Choice (which is important for issues regarding infinite dimensional vector spaces). There are many levels of rigor one could take in being precise about what a vector space is, but for most applications we just need a working definition of the basic properties. Therefore a brief (and somewhat incomplete) list of axioms is useful for jumping right in, even if they lack context. This is one of many examples of "convenient lies" used in pedagogy.

$${}^{\dagger}$$ This is another fun structure example. A field is an Abelian group in two ways: it's an Abelian group under addition, and it's an Abelian group under multiplication if we remove the additive identity 0.