TITLE: Understanding cohomology with compact support
QUESTION [8 upvotes]: I am trying to understand the definition of (singular) cohomology with compact supports. 
My understanding of singular cohomology goes like this. Let $X$ be a topological space. Define the singular chain group $C_n(X)$ to be the free abelian group generated by singular n-simplicies, which are functions $\sigma : \Delta^n \to X.$ The homology of the complex $C_{\bullet}(X)$ is singular homology. If we define $C^n(X):= \operatorname{Hom}(C_n(X), \mathbb{Z})$ to be the dual of the singular cochain group we get singular co-chains. If we now take the cohomology of this new complex, we get singular cohomology. 
Now I am trying to understand cohomology with compact supports, which this source begins to define (on page 7 of the pdf) as such: 

Given a (singular, simplicial, cellular) cochain complex
  $C^{\bullet}$
  on a space
  $X$
  , consider the subcomplex
  $C^{\bullet}_c$
  of cochains
  which are compactly supported: each cochain is zero outside some compact subset of
  $X$
  . 

What does this last statement mean? Isn't a cochain a map from $C_n(X)$ to $\mathbb{Z}$? How can take have a support inside $X?$ Please help me clear my deep misunderstanding. Thank you.

REPLY [12 votes]: The idea is that a cochain $\varphi \in C^n(X)$ is compactly supported if there's a $K \subseteq X$ compact subset of $X$ such that $\varphi|_{C_n(X \setminus K)} = 0$. 
Edit a little remark: for every $K$ compact subset of $X$ there's an embedding $i \colon X \setminus K \hookrightarrow X$ which give rise to a injective embedding of chain complexes $i_* \colon C_\bullet(X \setminus K) \to C_\bullet (X)$, so we can think of $C_n(X \setminus K)$ as being a submodule of $C_n(X)$ and to be exact what I meant above by $\varphi|_{C_(X \setminus K)}$ should be written more formally as $\varphi|_{i_*(C_n(X \setminus K))}$.
So compactly supported co-chain of $X$ are those co-chains in $C^\bullet(X)$ that vanish on all the simplexes that have image contained in a subspace $X \setminus K$ (for some $K$ compact subset of $X$), i.e. those simplexes $\sigma \colon \Delta^n \to X$ that factors through the inclusion map $i \colon X \setminus K \to X$.
You can find out more about this in Hatcher's book Algebraic Topology.