# Degree of a continuous mapping

In topology, the degree of a continuous mapping between two compact oriented manifolds of the same dimension is a number that represents the number of times that the domain manifold wraps around the range manifold under the mapping. The degree is always an integer, but may be positive or negative depending on the orientations.
The degree of a map between general manifolds was first defined by Brouwer, who showed that the degree is homotopy invariant and used it to prove the Brouwer fixed point theorem. Less general forms of the concept existed before Brouwer, such as the winding number and the Kronecker characteristic (or Kronecker integral).
In modern mathematics, the degree of a map plays an important role in topology and geometry. In physics, the degree of a continuous map (for instance a map from space to some order parameter set) is one example of a topological quantum number.

## Definitions of the degree
### From S$^n$ to S$^n$

The simplest and most important case is the degree of a continuous map from the $n$-sphere $S^{n}$ to itself (in the case $n=1$, this is called the winding number):
Let $f\colon S^{n}\to S^{n}$ be a continuous map. Then $f$ induces a pushforward homomorphism $f_{*}\colon H_{n}\left(S^{n}\right)\to H_{n}\left(S^{n}\right)$, where $H_{n}\left(\cdot \right)$ is the $n$th homology group. Considering the fact that $H_{n}\left(S^{n}\right)\cong \mathbb {Z}$, we see that $f_{*}$ must be of the form $f_{*}\colon x\mapsto \alpha x$ for some fixed $\alpha \in \mathbb {Z}$. This $\alpha$ is then called the degree of $f$.

### Between manifolds
#### Algebraic topology

Let X and Y be closed connected oriented m-dimensional manifolds. Poincare duality implies that the manifold's top homology group is isomorphic to Z. Choosing an orientation means choosing a generator of the top homology group.
A continuous map f : X →Y induces a homomorphism f$_∗$ from H$_m$(X) to H$_m$(Y). Let [X], resp. [Y] be the chosen generator of H$_m$(X), resp. H$_m$(Y) (or the fundamental class of X, Y). Then the degree of f is defined to be f$_*$([X]). In other words,
    $f_{*}([X])=\deg(f)[Y]\,.$
If y in Y and f $^{−1}$(y) is a finite set, the degree of f can be computed by considering the m-th local homology groups of X at each point in f $^{−1}$(y). Namely, if $f^{-1}(y)=\{x_{1},\dots ,x_{m}\}$, then
    $\deg(f)=\sum _{i=1}^{m}\deg(f|_{x_{i}})\,.$

#### Differential topology

In the language of differential topology, the degree of a smooth map can be defined as follows: If f is a smooth map whose domain is a compact manifold and p is a regular value of f, consider the finite set
    $f^{-1}(p)=\{x_{1},x_{2},\ldots ,x_{n}\}\,.$
By p being a regular value, in a neighborhood of each x$_i$ the map f is a local diffeomorphism. Diffeomorphisms can be either orientation preserving or orientation reversing. Let r be the number of points x$_i$ at which f is orientation preserving and s be the number at which f is orientation reversing. When the codomain of f is connected, the number r − s is independent of the choice of p (though n is not!) and one defines the degree of f to be r − s. This definition coincides with the algebraic topological definition above.
The same definition works for compact manifolds with boundary but then f should send the boundary of X to the boundary of Y.
One can also define degree modulo 2 (deg$_2$(f)) the same way as before but taking the fundamental class in Z$_2$ homology. In this case deg$_2$(f) is an element of Z$_2$ (the field with two elements), the manifolds need not be orientable and if n is the number of preimages of p as before then deg$_2$(f) is n modulo 2.
Integration of differential forms gives a pairing between (C$^∞$-)singular homology and de Rham cohomology: ⟨c, ω⟩=∫$_c$ω{\textstyle \langle c, \omega \rangle =\int _{c}\omega }, where $c$ is a homology class represented by a cycle $c$ and $\omega$ a closed form representing a de Rham cohomology class. For a smooth map f: X →Y between orientable m-manifolds, one has
    $\left\langle f_{*}[c],[\omega ]\right\rangle =\left\langle [c],f^{*}[\omega ]\right\rangle ,$
where f$_∗$ and f$^∗$ are induced maps on chains and forms respectively. Since f$_∗$[X] = deg f · [Y], we have
    $\deg f\int _{Y}\omega =\int _{X}f^{*}\omega \,$
for any m-form ω on Y.

### Maps from closed region

If $\Omega \subset \mathbb {R} ^{n}$ is a bounded region, $f:{\bar {\Omega }}\to \mathbb {R} ^{n}$ smooth, $p$ a regular value of $f$ and $p\notin f(\partial \Omega )$, then the degree $\deg(f,\Omega ,p)$ is defined by the formula
    $\deg(f,\Omega ,p):=\sum _{y\in f^{-1}(p)}\operatorname {sgn} \det(Df(y))$
where $Df(y)$ is the Jacobian matrix of $f$ in $y$.
This definition of the degree may be naturally extended for non-regular values $p$ such that $\deg(f,\Omega ,p)=\deg \left(f,\Omega ,p'\right)$ where $p'$ is a point close to $p$. The topological degree can also be calculated using a surface integral over the boundary of $\Omega$, and if $\Omega$ is a connected n-polytope, then the degree can be expressed as a sum of determinants over a certain subdivision of its facets.
The degree satisfies the following properties:
* If $\deg \left(f,{\bar {\Omega }},p\right)\neq 0$, then there exists $x\in \Omega$ such that $f(x)=p$.
* $\deg(\operatorname {id} ,\Omega ,y)=1$ for all $y\in \Omega$.
* Decomposition property: $\deg(f,\Omega ,y)=\deg(f,\Omega _{1},y)+\deg(f,\Omega _{2},y),$ if $\Omega _{1},\Omega _{2}$ are disjoint parts of $\Omega =\Omega _{1}\cup \Omega _{2}$ and $y\not \in f{\left({\overline {\Omega }}\setminus \left(\Omega _{1}\cup \Omega _{2}\right)\right)}$.
* Homotopy invariance: If $f$ and $g$ are homotopy equivalent via a homotopy $F(t)$ such that $F(0)=f,\,F(1)=g$ and $p\notin F(t)(\partial \Omega )$, then $\deg(f,\Omega ,p)=\deg(g,\Omega ,p)$.
* The function $p\mapsto \deg(f,\Omega ,p)$ is locally constant on $\mathbb {R} ^{n}-f(\partial \Omega )$.
These properties characterise the degree uniquely and the degree may be defined by them in an axiomatic way.
In a similar way, we could define the degree of a map between compact oriented manifolds with boundary.

## Properties

The degree of a map is a homotopy invariant; moreover for continuous maps from the sphere to itself it is a complete homotopy invariant, i.e. two maps $f,g:S^{n}\to S^{n}\,$ are homotopic if and only if $\deg(f)=\deg(g)$.
In other words, degree is an isomorphism between $\left[S^{n},S^{n}\right]=\pi _{n}S^{n}$ and $\mathbf {Z}$.
Moreover, the Hopf theorem states that for any $n$-dimensional closed oriented manifold M, two maps $f,g:M\to S^{n}$ are homotopic if and only if $\deg(f)=\deg(g).$
A self-map $f:S^{n}\to S^{n}$ of the n-sphere is extendable to a map $F:B_{n+1}\to S^{n}$ from the n+1-ball to the n-sphere if and only if $\deg(f)=0$. (Here the function F extends f in the sense that f is the restriction of F to $S^{n}$.)

## Calculating the degree

There is an algorithm for calculating the topological degree deg(f, B, 0) of a continuous function f from an n-dimensional box B (a product of n intervals) to $\mathbb {R} ^{n}$, where f is given in the form of arithmetical expressions. An implementation of the algorithm is available in TopDeg - a software tool for computing the degree (LGPL-3).