# Subspaces

Given some subset of numbers in an n-dimensional space, one of the questions you might get asked is whether or not those numbers make up a subspace.

To answer that question, it is worth defining what a subspace is in terms of its formal properties, then what it is in laymans terms, then the visual definition, showing why it is that those properties need to be satisfied.

For those unfamiliar, we will be using a little bit of set notation here - $\in $ stands for is a member of. When we use $(x,y,z):z=C(x,y)$ we are describing a set containing all three dimensional vectors that satisfy the condition that $z$ equals some function $C(x,y)$. We also often use letters from the greek alphabet to describe arbitrary constants, for instance alpha $\alpha $ and beta $\beta $.

The formal definition of a subspace is as follows:

- It must contain the zero-vector.
- It must be closed under addition: if ${v}_{1}\in S$ and ${v}_{2}\in S$ for any ${v}_{1},{v}_{2}$, then it must be true that $({v}_{1}+{v}_{2})\in S$ or else $S$ is not a subspace.
- It must be closed under scalar multiplication: if $v\in S$ then $\alpha v\in S$, else $S$ is not a subspace.

All of that was just a fancy way of saying that a subspace just needs to define some equal or lesser-dimensional space that ranges from positive infinity to negative infinity and passes through the origin.

So for instance, valid subspace for a three dimensional space might be $z=2x+3y$, which is a plane:

And does $(x,y,z):z=2x+3y$ satisfy our three propositions? Well, we can prove this with a bit of analysis:

- Is the zero vector a member of the space? Well:$0=2\times 0+3\times 0$, so yes, it is.
- Is it closed under addition? To work this out, we can take any two ${v}_{1}\in S$ and ${v}_{2}\in S$ and show that their sum, ${v}_{1}+{v}_{2}\in S$:

Or if we rearrange:

$$2{x}_{1}+2{x}_{2}+3{y}_{1}+3{y}_{2}-{z}_{1}-{z}_{2}=0$$$$2{x}_{1}+3{y}_{1}-{z}_{1}+2{x}_{2}+3{y}_{2}-{z}_{2}=0$$$$2{x}_{1}+3{y}_{1}-{z}_{1}=-2{x}_{2}-3{y}_{2}+{z}_{2}$$Now, if we recall that $2{x}_{1}+3{y}_{1}-{z}_{1}=0$ and $2{x}_{2}+3{y}_{2}-{z}_{2}=0$ , so what we really have is:

$$0=-0$$Which is always true, so we are closed under addition

- Now for being closed under multiplication. Again, we need to prove this by analysis:

And if ${v}_{1}\in S$ then $2{x}_{1}+3{y}_{1}=z$. So if we multiply through $\alpha $:

$$2\alpha x+3\alpha y=\alpha z$$And this is always true, since it is just a scalar.

Therefore, as the subset defined by$(x,y,z):2x+3y=z$is a subspace of the volume defined by the three-dimensional real numbers.

What about things that are not subspaces? For instance: $(x,y,z):|x+y+z|=1$

Well, this is actually a non-linear function, and we can show that it is not a subspace pretty easily through a counterexample, by showing that the set is not closed under addition.

$$(1,1,-1)\in S,|1+1-1|=1$$$$(-1,-1,1)\in S,|-1-1+1|=1$$$$(1,1,-1)+(-1,-1,1)\in S,|1+1-1-1-1+1|=0$$So $(x,y,z):|x+y+z|=1$ is not a subspace.