Why do we need "rank" and "dim" in linear algebra? After learning the concepts of "rank" and "dim" in my linear algebra course at university I am trying to understand why we need them and how I can visualize them, I will be happy if someone could help me :)
Thanks 
 A: Surely you can appreciate why the cardinality of a set is useful. When using finite sets, cardinality is especially useful since you can combine the sets in different ways and predict the cardinality of the new sets. 
For example, if $|A|=n$ and $|B|=m$, then $|A\times B|=mn$, $|A\cup B|=m+n-|A\cap B|$, etc. he cardinality of the Cartesian product is still manageable when the cardinalities are infinite, but the cardinality of the union becomes less convenient to state.
Now in general, the size of a vector space (say $\Bbb R^n$) is frequently going to be infinite (e.g. when the base field is infinite.) So when thinking about constructions with vector spaces like $V\times W$ and $V/U$, cardinality isn't a very useful piece of data.
Luckily, the structure of a vector space makes it possible to boil down the cardinality into a different concept: dimension. You can think of finite dimension as being analogous to finite sets among all sets. The arithmetic of finite dimensions works out very nicely and is more useful than arithmetic of cardinalities among vector spaces. 
That's why we can say things like $\dim(V\times W)=\dim (V) +\dim (W)$ and $\dim(V/U)=\dim(V)-\dim(U)$ for finite dimensional $V$, even though the vector spaces themselves can have infinite cardinalities.

To summarize somewhat, you can consider that both "cardinality" and "dimension" are measures of size of something. Being able to measure things in terms of finite size is more desirable than juggling infinite sizes.

Rank of a linear transformation (on a finite dimensional space) is just a natural number that gives you some information about the transformation. In this case, it is just the dimension of its image. Through the rank-nullity theorem, you can relate this number to the dimensions of the domain and codomain of the transformation.
Another angle on dimension that works for $\Bbb R^n$ is dimension in the geometric sense. I'm sure you can find many resources that discuss developing intuition for $2$, $3$ and $n$ dimensions. The classic introduction to this sense of dimension is Flatland by E. A. Albott
A: $\dim$ corresponds to our intuitive notion of dimension. Lines are one-dimensional, planes are two-dimensional, space is three-dimensional.
$$\dim(\mathbb{R}^3) = 3$$
$$\dim(\{(x, y, z) \mid x - y + 3z = 8\}) = 2$$
$$\dim(\{(2t, t + 4, t) \mid t \in \mathbb{R}\}) = 1$$
These examples are all for $\mathbb{R}^n$, but we can also use dimension on other vector spaces. We define it the way we do (number of basis vectors) so that it works in general, but the way to visualize it, in my opinion, is always on $\mathbb{R}^n$.
Here's how I think about rank: if you think of your matrix as a linear transformation from vector spaces $V \rightarrow W$, then it eats any vector in $V$ and spits out a vector in $W$.
Now think about the dimension of the set of places you could land in $W$. This is called the image of the transformation. If the transformation is surjective, you can land anywhere, so it's just the dimension of $W$. On the opposite extreme, if your transformation just sends everything to $0$, then it's $0$. You might always land in a certain line, a certain plane, etc.
The dimension of the image of the transformation is the rank. It measures "how big is the area I could land in when I go through this transformation"?
