What exactly is a dimension? Maybe this is too broad a question, maybe I need to be more specific. I am just clearing my head here, feel free to ignore at your pleasure. In Linear Algebra, we learned that the dimension of a vector space is the number of vectors in its basis. This to me makes sense, since according to my understanding, the dimension of some space or some set with some 'structure' on it (Sorry, don't know how to put this) is the number of independent 'parameters' needed to specify each 'point' in it. Does this same understanding of dimension carry over to say a topological space or some other type of space? I read the following paragraph in Basic Topology by M.A. Armstrong

Taking the dimension of $X$ to be the least number of continuous parameters needed to specify each point of $X$ is no good. Peano's example shows that the square has dimension 1 under this definition.

This does my head in a little. What is the dimension of say a sphere or a torus? What does it mean to say that a surface is a two-dimensional, topological manifold? Or is it just the case that we have defined it to be that way, meaning that we say a set $A$ is said to have dimension $n$ if such and such is true? Is there some basic underlying principles guiding these definitons? The following definiton also confuses me if I think about it too much

Let $V$ be a vector space over an arbitrary ﬁeld F. The projective space
  $P(V)$ is the set of 1-dimensional vector subspaces of $V$ . If $dim(V ) = n + 1$, then the
  dimension of the projective space is $ n.$

In what sense does it have the dimension $n$? Why and how is it different from the orignal vector space? I'm cringing just thinking about it. Sorry, rambling now...
 A: There are a number of different definitions of dimension, depending on context. You are correct about the definition of the dimension of a vector space. Similarly, we often define the dimension of a manifold (something like a torus, a sphere, etc.) which locally looks like $\mathbb{R}^n$ to be $n$ for the same reason. If every point "locally requires $n$ parameters", we say it is $n$-dimensional.
However, defining dimension by saying that it "locally requires $n$ parameters" isn't actually a good definition, for the reason that you cite above. With the use a space-filling curve, you can actually describe a square as the image of a line under a continuous (if not very nice) function, and so you can describe a cube as the image of a line as well, and so on. So we have to be a bit more careful.
For manifolds, we describe dimension then by saying that our parameterization has to be sufficiently nice---that is, we need not just that we parameterize it by a continuous map, but that the continuous map be invertible as well! If you think about this, this makes sense, and is similar to what we use to describe vector spaces. A basis gives us a map
$$
\phi : V \to \mathbb{R}^n
$$
for some $n$ by taking
$$
\phi(a_1\vec{v_1} + \cdots a_n\vec{v_2}) = (a_1, \ldots a_n)
$$
which is pretty clearly invertible.
There are other notions of dimension that can be used for topological spaces, but for things like spheres, tori, etc., this works very well and agrees with our intuition.
Furthermore, regarding projective space, let's look at the simplest example: Consider $\mathbb{P}(\mathbb{R}^2)$, or the space of lines in the plane (which is 2-dimensional).
In such a case, lines are specified by picking a direction, which is almost the same as picking a vector, but we don't care about its length, and neither do we care about its orientation. So this is the same as picking a point on the unit circle, say, where we identify an element $(x,y)$ with its negative $(-x,-y)$ which, after all, defines the same line. Thus $\mathbb{P}(\mathbb{R}^2)$ can be seen to be the circle with antipodal points identified, which is 1-dimensional.
A: Regarding $P(V)$
All 1-dim subspaces of $\mathbb{R}^3$ are lines through the origin because zero has to belong to the subspace. The collection of lines (objects) are a vector space for appropriate definition of vector. Associate with each line its point of intersection with some plane, say $x=1$. Then these points constitute a $2$-dim vector space.
The argument would be similar for intersection of all $1$-dim subspaces of $\mathbb{R}^n$ (lines through the origin) with a plane of dim $n-1$.
