What is the difference (or connection) between the dimension of a vector space and the dimension in terms of bases? What is the difference (or connection) between the dimension of a vector space and the dimension in terms of bases?
For instance, when we talk about the vector space $\mathbb{R}^3$, we are talking about a 3-dimensional vector space. This vector space contains vectors with three elements: $(x_1, x_2, x_3)$.
But we also know that the dimension of a vector space is equal to the number of vectors in its basis. For instance, let's say we have the basis $\{(1, 1, -2, 0, -1), (0, 1, 2, -4, 2), (0, 0, 1, 1, 0) \}$. These vectors contain 5 elements $(x_1, x_2, x_3, x_4, x_5)$, so the vector space is 5-dimensional or $\mathbb{R}^5$. But, by the definition of dimension in terms of bases, this vector space has a dimension of 3 since the basis contains 3 vectors; so the vector space should be $\mathbb{R}^3$?
I hope that I effectively conveyed my confusion. I would greatly appreciate it if people could please take the time to clarify my misunderstanding and elaborate on the differences and/or connections between these concepts.
 A: Consider the vectors $e_1 =(1,0,0)$, $e_2 = (0,1,0)$ and $e_3 = (0,0,1)$ in $\mathbf{R}^3$. Then the vectors $e_1, e_2, e_3$ form a basis for the whole space, which has dimension $3$. This case is not a problem for you.
But what about the vectors $e_1$ and $e_2$? This is more like the case that is not clear to you. In this case, the vectors $e_1$ and $e_2$ do not form a basis for the whole space. Instead, they form a basis for the plane with equation $z = 0$. In other words, they form a basis for a certain subspace of the whole space. Since this subspace is a plane, it should be unsurprising that it has dimension $2$.
A: Every $\mathbb R^n$ is a vector space (or at least can be a vector space),
but not every vector space is $\mathbb R^n.$
In your example with the three vectors $\{(1, 1, -2, 0, -1), (0, 1, 2, -4, 2), (0, 0, 1, 1, 0) \}$, the vectors belong to $\mathbb R^5,$
which we can consider to be a $5$-dimensional vector space,
but the span of the three vectors also is a vector space,
because it satisfies all of the criteria for the definition of a vector space.
Since these three vectors are independent, they form a basis
of a $3$-dimensional vector space.
Yet that vector space is most definitely not
$\mathbb R^3,$ since $(1, 1, -2, 0, -1)$, for example,
is not in $\mathbb R^3.$
In fact there are infinitely many $3$-dimensional vector spaces,
and only one of those is $\mathbb R^3.$
The only reason you hear so much about $\mathbb R^3$ is that we are so terribly prejudiced in its favor.
(It is relatively simple to work with, so there's some reason for the prejudice.)
A: The vector space $\Bbb R^n$ means exactly one thing: $n$-tuples of numbers with entries in $\Bbb R$. (This can be formalized by saying an element of $\Bbb R^n$ is really a function from $\{1, 2, \ldots, n\}$ to $\Bbb R$: For example the vector $(\sqrt{2}, -3, \pi)$ is really the function $1 \mapsto \sqrt{2},\, 2\mapsto -3,\, 3 \mapsto \pi$) although this isn't necessarily something you should worry about.)
Every $d$-dimensional subspace of $\Bbb R^n$ is isomorphic to ("functionally equivalent to") $\Bbb R^d$, although if $n \neq d$, it is not literally "equal to" $\Bbb R^d$: it doesn't consist of $d$-tuples of real numbers, but instead $n$-tuples.
