A vector space $V$ is a set of objects which can be added and multiplied by numbers, in such a way that the sum of two elements of $V$ is again an element of $V$, the product of an element of $V$ by a number is an element of $V$, and the following properties are satisfied:
VS 1. Given $u,v,w\in V$, we have
$$(u+v)+w=u+(v+w).$$
VS 2. There is an element $O\in V$ such that
$$O+u=u+O=u$$
for all $u\in V$.
VS 3. Given $u\in V$, the element $(-1)u$ is such that
$$u+(-1)u=(-1)u+u=O.$$
$(-1)u$ is simply written as $-u$.
VS 4. For all $u,v\in V$, we have
$$u+v=v+u.$$
VS 5. If $c$ is a number, then $c(u+v)=cu+cv$.
VS 6. If $a,b$ are two numbers, then $(a+b)v=av+bv$.
VS 7. If $a,b$ are two numbers, then $(ab)v=a(bv)$.
VS 8. For any $u\in V$, we have $1u=u$.
The axioms VS 1-VS 4 say that $(V,+)$ is an abelian group. The elements of vector space $V$ are called vectors. One can easily verify that vectors in $\mathbb{R}^n$ satisfy the axioms VS 1-VS 8 and hence $\mathbb{R}^n$ is a vector space.
Example. Let $M(m,n)$ denote the set of all $m\times n$ matrices. Then $M(m,n)$ is a vector space. Using the identification
$$\begin{pmatrix}a_{11} & a_{12} & \cdots & a_{1n}\\a_{21} & a_{22} & \cdots & a_{2n}\\\vdots &\vdots& \ddots&\vdots\\a_{m1} & a_{m2} & \cdots & a_{mn}\end{pmatrix}\longleftrightarrow(a_{11},\cdots,a_{1n};a_{21},\cdots,a_{2n};\cdots;a_{m1},\cdots,a_{mn}),$$
we see that $M(m,n)$ may be identified with $\mathbb{R}^{mn}$ as a vector space.
Example. Let $\mathcal{F}$ be the set of all functions from $\mathbb{R}$ to $\mathbb{R}$. For any $f,g\in\mathcal{F}$, define $f+g$ by
$$(f+g)(x)=f(x)+g(x)$$
for all $x\in\mathbb{R}$. For any $f\in\mathbb{R}$ and for any number $c$, define $cf$ by
$$(cf)(x)=cf(x)$$
for all $x\in\mathbb{R}$. Then $\mathcal{F}$ is a vector space called a function space.
Example. Let $V=\{ae^t+be^{2t}: a,b\in\mathbb{R}\}$. Then $V$ is a vector space. Note that $V$ is the set of all solutions of the second order linear differential equation $\frac{d^2x}{dt^2}-3\frac{dx}{dt}+2x=0$.
Subspaces
A subset $U$ of a vector space $V$ is said to be a subspace if $U$ itself is also a vector space. For $U$ to be a vector space, it suffices to satisfy that
(i) For any $v,w\in U$, $v+w\in U$.
(ii) If $v\in U$ and $c$ is a number, $cv\in U$.
(iii) The identity element $O$ of $V$ is also an element of $U$.
Proposition. A nonempty subset $U$ of a vector space $V$ is a subspace if and only if $av+bw\in U$ for any $v,w\in U$ and numbers $a,b$.
Proof. Exercise
Example. Let $U$ be the set of vectors in $\mathbb{R}^n$ whose last coordinate is $0$. Then $U$ is a subspace of $\mathbb{R}^n$. $U$ may be identified with $\mathbb{R}^{n-1}$.
Example. Let $A$ be a vector in $\mathbb{R}^n$. Let $U$ be the set of all vectors $B$ in $\mathbb{R}^n$ such that $B\cdot A=0$ i.e. $B$ is perpendicular to $A$. Then $U$ is a subspace of $V$.
Example. Let $U$ and $W$ be subspaces of a vector space $V$. Then $U\cap W$ is also a subspace of $V$.
Example. Let $U$ and $W$ be subspaces of a vector space $V$. Define the sum of $U$ and $W$
$$U+W=\{u+w: u\in U\ \rm{and}\ w\in W\}.$$
Then $U+W$ is a subspace.