Topological degree (source code)

= Topological degree
{title2=$\deg f$}
{wiki}

For a <continuous map> $f:M\to N$ between connected closed oriented <manifolds> of the same positive dimension $n$, the <topological degree> is the <integer> determined by
$$
f_*[M]=(\deg f)[N]\quad\text{in }H_n(N;\mathbb Z).
$$
The chosen <fundamental classes> fix the signs. This <homology> definition makes sense without differentiability and is invariant under <homotopy>. For <spheres>, it is the <integer> by which the induced map multiplies their top <homology group>.<Algebraic Topology by Allen Hatcher>[Section 2.2, degree and local degree, pages 134–136]{ref}

If $f$ is smooth and $y$ is a <regular value>, the finite preimage gives
$$
\deg f=\sum_{x\in f^{-1}(y)}\operatorname{sgn}(\det df_x),
$$
where the sign compares the chosen <orientations> in source and target. Thus opposite local signs can cancel: <topological degree> is a signed count, rather than the number of preimages.

For the <circle> map $z\mapsto z^k$, with $|z|=1$ and $k$ an <integer>, the <topological degree> is $k$. An orientation-reversing <reflection> has <topological degree> $-1$, while a constant map has <topological degree> zero. A nonzero <topological degree> forces <surjectivity>; a <homotopy> between <continuous maps> preserves their <topological degree>.