TITLE: How do Homology Groups work
QUESTION [8 upvotes]: How do homology groups work? Looking at the wikipedia article, it lists, for example, $H_k(S^1) = \mathbb Z$ for $k = 0,1$ and ${0}$ otherwise. It also says that $H_k(X)$ is the k-dimensional holes in $X$. Thus, there is a 0-d hole and a 1-d hole. I see a 2-d hole, but neither of 1-d nor 0-d. This trend continues for the other example listed. What is it that I am completely missing? Thank you.

REPLY [6 votes]: The $k$-th homology group measures how many $k$-dimensional subthings in $X$ are there which are not the boundary of $(k+1)$-dimensional subthings of $X$. I am not being precise in what a thing is in this, because that is difficult and, in a sense, the precise definition of a thing is what the actual definition of homology encodes.
One ideal realization of this would be the following: if $X$ is a space, we could define $H_k$ te the set of maps $f:M\to X$ from a $k$-dimensional manifold $M$ to $X$ which are not the restriction of a map $g:N\to X$ from a $(k+1)$-dimensional manifold with boundary $N$ to $X$ such that $\partial N=M$ and $g|_M=f$. Now this definition relfects the idea in the first paragraph but does not have the technical properties one needs to do anything sensible. So one has to adapt.
This idea is good enough to see why a torus $T$ has a $2$-whole: the identity map $id:T\to T$ does not extend to any $3$-manifold $N$ with boundary $\partial N=T$. Of course, how do you prove this? Well, the great minds of the people that developed homology theory devised the actual definition so as to be able to prove this!
Later. The above idea does not work. One way to improve it is the following. Let $Z_k(X)$ be the free abelian group with basis the set of all maps $f:M\to X$ defined on a $k$-dimensional orientable and oriented manifold $M$ (we call such maps $k$-cycles in $X$) and now declare two such $k$-cycles $f_1:M_1\to X$ and $f_2:M_2\to X$ to be equivalent (homologous is the usual term) if there is a map $g:N\to X$ from a $(k+1)$-dimensional manifold $N$ with boundary, such that the boundary $\partial N$ is the disjoint union of $M_1$ and $M_2$, and such that the restriction of $g$ to $\partial N$ coincides with $f_1$ and $f_2$ (I am not giving all details here...) Let $H_k(X)$ now be the quotint of $Z_k(X)$ by that relation. This is a much better approximation to the actual homology (it is even equal to it in some cases, iirc)