# Linear Algebra: What do vector spaces represent?

I understand what a vector can represent, but I still don't understand what a vector space represents. I understand that you can add two vectors and that becomes a vector space. What else can you do with them? What can you apply it to?

I am taking a linear algebra course right now and understand the calculation steps, but not really what these tools are for. I hope that adds some context to my strange and probably vague question. Thanks!

What is a vector space?

In short, a vector space is a place where we can add and scalar multiply vectors.

Why do we care about vector spaces?

Once you declare something has a vector space structure then we all know what that means. Moreover, all the myriad of examples of vector spaces share a common structure. So, once we prove something is true for a finite dimensional vector space then we don't have to prove it for polynomials, matrices, symmetric matrices, antisymmetric matrices, $n$-th order homogeneous ODE solution sets, sets of finitely many operators, multivariate polynomials, matrices of all of the above examples, tensor products of all of the above examples, linear transformations to and from all of the above examples etc... Once we prove a given fact is true for finite dimensional vector spaces then it is settled. We don't have to replicate the effort in every context.

The point of a vector space is to identify this common structure and clarify those truths which are common to all these examples. In short, it is a useful and commonly known abstraction.

"I understand that you can add two vectors and that becomes a vector space." This is not correct. A vector space is a certain set of vectors. Adding two vectors results in another vector (in the same vector space).

You are probably most familiar with the vector spaces $R^n$. $R^2$ is one vector space. $R^3$ is another. You can add two elements of $R^3$, but it doesn't make sense to add one element of $R^2$ to an element of $R^3$. Moreover, you know that when you add two elements from $R^2$, the result will still be in $R^2$. That's all a vector space is: a set of vectors you can add to each other and multiply by scalars, where the results of those operations stay in the same set.

Revisit the definition of a vector space: a set of vectors that is closed under vector addition and scalar multiplication.

To extrapolate: suppose we have a set of vectors in $R^n$, called "S." Vectors in this set are all kinds of vectors with variables $x_1, x_2,...,x_n,$ as long as for any two vectors $u,v \in S$, $\space \space \space u+v\in S$ as well, and for any scalar $k\in R$, $\space \space k\cdot u \in S$ also.

You could give set S any quality you like- that doesn't necessarily mean it is a vector space. Take, for example, the set of all vectors $(x_1, x_2,1)$. If I had two vectors in that form, they do not form a vector space- after all, here is a counter example: $(3,2,1)$ and $(5,4,1)$. Add them together and you get $(8,6,2)$, which doesn't have a "1" in the right-most entry.

So no, you don't just add two vectors to create a vector space (clearly, the one above fails). A vector space is defined by the constraint you put on it, as long as that constraint keeps the space closed under vector addition and scalar multiplication.

Vector spaces are useful for determining the visual representations of solutions to linear systems, and are a fundamental part of understanding not only linear algebra, but higher math topics (i.e., commutative algebra) as well. Best to get comfortable with them as soon as you can!

I'll try to explain it in less mathy terms.

In general, a vector space (or a vector subspace) is a set of rules, that must be satisfied for a set of vectors to call them a vector space. For example, to call a set of vectors a linear vector space, this set must satisfy all those conditions:

1. It must contain a zero-vector
2. It must be closed under scalar multiplication
3. It must be closed under vector addition

It may be a bit confusing, but often when people are saying "a vector space" they mean a linear vector space. But it's not the only vector space. For example, a Hilbert space defines another set of rules.

What does that mean? It means that vector space, generally speaking, is a set of axioms that have a special name (e.g. a linear vector space). Mathematicians do not explicitly tie it with any operations. But there is an implicit association with certain operations. For example, a Hilbert space "is equipped with an inner product, an operation that allows lengths and angles to be defined" (from Wikipedia).

What does it means and what are the implications? As a programmer, I like to think about those concepts as "interfaces". In programming terms, it means "interface IHilbertSpace extends ILinearSpace". When we deal with a linear vector space (euclidean), it does not allow lengths and angles to be defined. To define those operations, we have to prove that a vector space X is also a Hilbert vector space. Without proving it, we may try to, for example, calculate an angle between some vectors in a set, but there are no guarantees that we get a correct answer (important: we are not necessarily talking about vectors in R^n, we may want to calculate angles between vectors in a complex plane). But when we prove when some vector space is a Hilbert space, then we can be sure that while calculating angles we get a correct answer.

To summarize: vector spaces allow us to safely say: if this a vector space S, then we can perform operations X, Y, Z on vectors in this vector space and the results of those operations will be correct.