% !TEX root = ../thesis.tex

\chapter{The Hopf map}
\label{chap:the-hopf-map}
\newcommand*{\hquat}{h_\textup{quat}}
\newcommand*{\hproj}{h_\textup{proj}}
The different definitions of $S^3$ and $S^2$ that were explored in the previous chapter
go along with different definitions of the Hopf map.
In this chapter we will give those definitions,
and show that they are equivalent in the following sense:
if $\hproj$ and $\hquat$ represent the projective and quaternionic definition of the Hopf map respectively,
then the following diagram commutes:

\vspace{-\parskip}
\begin{center}
\begin{tikzcd}
\SC \ar[r, two heads, "\hproj"]
    \ar[d, leftrightarrow] &
\PC \ar[d, leftrightarrow] \\
S^3 \ar[r, two heads, "\hquat"] &
S^2
\end{tikzcd}
\end{center}

$S^3$ and $S^3_\C$ were shown to be homeomorphic in proposition~\ref{prop:s3-equivalence}.
In theorem~\ref{thm:s2-homeom-p1c} it was stated that $\PC$ and $S^2$ are homeomorphic,
which we will be able to prove at last.
Finally, the group actions explored in the previous chapter will be used to examine the fibres of the Hopf map.

\section{The projective Hopf map}
\label{sec:hopf-projective}
As we saw in section \ref{sec:projective-space},
$\PC$ can be defined as a quotient of $\CZ$ with respect to the action of $\C^*\!$.
Because $\C^* \cong \Rpos \times S^1\!$,
the quotient map factors over $\SC$ by theorem~\ref{thm:quotient-map-factors},
where $\SC = \CZ \, / \, \Rpos$ as in definition \ref{def:s3-complex}.
This allows us to define the Hopf map:

\definition[def:hopf-projective]
The \emph{Hopf map} is the unique continuous map $h : \SC \surj \PC$
that makes the following diagram commute:
\begin{center}
\begin{tikzcd}[column sep = small] &
\CZ \ar[dl, "r", two heads, swap]
    \ar[dr, "q", two heads] & \\
\SC \ar[rr, "h", two heads] & &
\PC
\end{tikzcd}
\end{center}
By theorem~\ref{thm:quotient-map-factors},
the Hopf map is the quotient map of the $S^1$-action on $\SC$.

This definition tells a lot about the Hopf map already.
It shows that its \emph{fibres} — the inverse images of points in $\PC$ —
are orbits of the $S^1$-action;
the fibres can be parametrised by $S^1\!$.
In section~\ref{sec:fibres} we will explore the geometry of the fibres,
which will turn out to be great circles on $S^3\!$.
Furthermore,
because $h$ is the quotient map of a group action,
it is surjective, continuous, and open by proposition~\ref{prop:open-quotient-map}.

\section{The quaternionic Hopf map}
\label{sec:hopf-quaternionic}
In section \ref{sec:quaternions} we defined $S^3$ and $S^2$ as subsets of $\H$,
with $S^3$ acting on $S^2\!$.
With this action,
we can define the Hopf map as follows:

\definition[def:hopf-quaternionic]
The \emph{Hopf map} is the map
\[ h : S^3 \longto S^2,
   \quad q \longmapsto q^{-1} \cdot i \]
Recall that ‘${}\cdot{}$’ denotes the action,
$q^{-1} \cdot i = q^{-1} i q$.
For quaternion multiplication we will simply use juxtaposition.
The reason that we choose $q^{-1} \cdot i$ here instead of $q \cdot i$,
will become clear in theorem \ref{thm:hopf-map-equivalence}.
An other way to think of this,
is that $h$ is the map $q \mapsto i \cdot q = q^{-1} i q$,
where $\H^*$ acts \emph{from the right} on $\H$.
The quaternionic definition is more suitable for doing computations
than the projective definition,
because it allows us to work with Cartesian coordinates on $S^2\!$.
The image of the quaternion $q = a + bi + cj + dk \in S^3$
under the Hopf map is given by
\begin{equationref}
\label{eqn:hopf-coordinates}
\begin{aligned}
h(q) &= q^{-1} \cdot i = q^{-1} \, i \, q = \overline{q} \, i \, q
  \\ &= (a - bi - cj - dk) \, i \, (a + bi + cj + dk)
% \\ &= (a - bi - cj - dk) (ai - b + ck - dj)
% \\ &= a^2 i - ab + ack - adj + (- bi - cj - dk) (ai - b + ck - dj)
% \\ &= a^2 i - ab + ack - adj + ab + b^2i + bcj + bdk + (- cj - dk) (ai - b + ck - dj)
% \\ &= a^2 i - ab + ack - adj + ab + b^2i + bcj + bdk + ack + bcj - c^2i - cd + (- dk) (ai - b + ck - dj)
% \\ &= a^2 i - ab + ack - adj + ab + b^2i + bcj + bdk + ack + bcj - c^2i - cd - adj + bdk + cd - d^2i
% \\ &= (a^2 + b^2 - c^2 - d^2) i - ab + ack - adj + ab + bcj + bdk + ack + bcj - cd - adj + bdk + cd
% \\ &= (a^2 + b^2 - c^2 - d^2) i + (ab - ab) + ack - adj + bcj + bdk + ack + bcj - cd - adj + bdk + cd
% \\ &= (a^2 + b^2 - c^2 - d^2) i + (ab - ab) + (cd - cd) + ack - adj + bcj + bdk + ack + bcj - adj + bdk
% \\ &= (a^2 + b^2 - c^2 - d^2) i + (ab - ab) + (cd - cd) + (ack + ack) - adj + bcj + bdk + bcj - adj + bdk
% \\ &= (a^2 + b^2 - c^2 - d^2) i + (ab - ab) + (cd - cd) + (ack + ack) + (bcj + bcj) - adj + bdk - adj + bdk
% \\ &= (a^2 + b^2 - c^2 - d^2) i + (ab - ab) + (cd - cd) + (ack + ack) + (bcj + bcj) + (bdk + bdk) - (adj + adj)
% \\ &= (a^2 + b^2 - c^2 - d^2) i + (ack + ack) + (bcj + bcj) + (bdk + bdk) - (adj + adj)
% \\ &= (a^2 + b^2 - c^2 - d^2) i + 2ack + 2bdk + (bcj + bcj) - (adj + adj)
% \\ &= (a^2 + b^2 - c^2 - d^2) i + 2ack + 2bdk + 2bcj - 2adj
  \\ &= (a^2 + b^2 - c^2 - d^2) i + 2 (bc - ad) j + 2 (ac + bd) k
\end{aligned}
\end{equationref}
Because $h$ is given by polynomial equations on every coordinate,
it is continuous.
Because $S^3$ acts transitively on $S^2$ by corollary~\ref{cor:transitive-s3-action},
$h$ is surjective.

The projective definition of the Hopf map in section \ref{sec:hopf-projective}
emphasises that the fibres of the Hopf map are orbits of a group action.
The quaternionic definition given here,
instead emphasises \emph{stabilisers} of a group action.
The fibre above $i$ consists of all $q \in S^3$ with $q^{-1} \cdot i = i$,
the stabiliser $S^3_i$ of $i$.
The fibre above $p \in S^2$ is a right coset of the stabiliser.
Because $S^3$ acts transitively on $S^2$ by corollary~\ref{cor:transitive-s3-action},
there exists an $x \in S^3$ such that $p = x \cdot i$.
The fibre above $p$ consists of all $q \in S^3$ such that $q^{-1} \cdot i = p$.
It follows that $q \cdot x \cdot i = q \cdot p = i$,
thus $qx$ stabilises $i$ and $h^{-1}(p) = S^3_i x^{-1}$.

At present, it is not at all obvious that the Hopf map as defined in
definition~\ref{def:hopf-projective} is related to the Hopf map as defined in definition~\ref{def:hopf-quaternionic}.
On the contrary: we have not even proven that the codomains $\PC$ and $S^2$ are homeomorphic.
Fortunately, we can prove both statements at once.

\theorem[thm:hopf-map-equivalence]
Denote by $\SC$ and $S^3$ the three-sphere as defined by
definition~\ref{def:s3-complex} and \ref{def:s3-real} respectively.
Let $\Psi : \CZ \to \H^*$ be the restriction
of the $\R$-linear isomorphism $(z_1, z_2) \mapsto z_1 + z_2 j$.
From proposition~\ref{prop:s3-equivalence} it follows that
$\Psi$ descends to $\psi : \SC \to S^3\!$.
Denote by $r$ the quotient map,
by $s$ projection onto $S^3\!$,
and by $\hproj$ and $\hquat$ the Hopf map as defined in
definition~\ref{def:hopf-projective} and \ref{def:hopf-quaternionic} respectively.
Then there exists a unique homeomorphism $\phi : \PC \to S^2$
that makes the following diagram commute:

\begin{center}
\begin{tikzcd}
\CZ  \ar[r, two heads, "r"]
     \ar[d, "\Psi"] &
\SC  \ar[r, two heads, "\hproj"]
     \ar[d, "\psi"] &
\PC  \ar[d, dashed, "\exists_! \phi"] \\
\H^* \ar[r, two heads, "s"] &
S^3  \ar[r, two heads, "\hquat"] &
S^2
\end{tikzcd}
\end{center}

\proof
We will show that $\Phi = \hquat \circ s \circ \Psi$ is compatible
with the quotient map $\CZ \surj \PC$.
Let $(z_1, z_2) \in \CZ$ and $z \in \C^*\!$,
such that $(z_1 : z_2) = (zz_1 : zz_2)$.
Because $\C^*$ stabilises $i \in S^2\!$,
we have
\begin{align*}
\Phi(z z_1, z z_2)
\, = \, (z z_1 + z z_2 j)^{-1} \cdot i
\, = \, (z_1 + z_2 j)^{-1} \cdot (z^{-1} \cdot i)
\, = \, (z_1 + z_2 j)^{-1} \cdot i
\, = \, \Phi(z_1, z_2)
\end{align*}
By the universal property of the quotient topology (theorem \ref{thm:universal-property-quotient-topology}),
there exists a unique continuous map $\phi$ that makes the diagram commute.

To give the inverse of $\phi$,
let a point $p \in S^2$ be given.
We saw before that there exists an $x \in S^3$ with $p = x \cdot i$,
such that $\hquat^{-1}(p) = S^3_i x^{-1}$.
Because $S^3_i = S^1 \subseteq \C^*\!$,
we can write every point in $S^3$ that maps to $p$ as $zx^{-1}$ for some $z \in S^1$,
and we can write $x^{-1}$ as $z_1 + z_2 j$ for some $z_1, z_2 \in \C$.
Therefore, all points in the fibre above $p$ map to $(z_1 : z_2)$
under $\hproj \circ \psi^{-1}$.
To show that this does not depend on the choice of $x$,
note that if we had $y \in S^3$ with $p = y \cdot i$,
then $x = yz^{-1}$ for some $z \in S^1\!$,
so $x^{-1} = z y^{-1}$.

Recall that $S^3_\C$ is compact by proposition \ref{prop:s3-equivalence},
so $\PC$ is compact,
for it is the continuous image of a compact space.
$S^2$ is Hausdorff because it is a subspace of $\H$,
which is Hausdorff.
Therefore, $\phi$ is a continuous bijection from a compact space to a Hausdorff space.
It follows that $\phi$ is a homeomorphism.
(See for instance theorem 3.3.11 of \parencite[p.~81]{runde2005}.)
\qed

Using equation~\ref{eqn:hopf-coordinates},
we can give an explicit expression for $\phi$.
Using equation~\ref{eqn:transitive-s3-action},
we can give an explicit expression for $\phi^{-1}$:
\begin{equationref}
\begin{aligned}
(a + bi : c + di) &\longmapsto (a^2 + b^2 - c^2 - d^2) i + 2 (bc - ad) j + 2 (ac + bd) k \\
(i + \alpha i : \beta + \gamma i) &\longmapsfrom \alpha i + \beta j + \gamma k
\end{aligned}
\end{equationref}
It is assumed here that $a^2 + b^2 + c^2 + d^2 = 1$
and $\alpha^2 + \beta^2 + \gamma^2 = 1$,
with $\alpha \neq -1$.
For $\alpha = -1$, we have $\phi^{-1}(-i) = (0 : 1)$.
Note that it is impossible to give a globally valid expression for $\phi^{-1}$:
the map $\phi \circ h : S^3_\C \surj S^2$ does not admit a global continuous section.
If it did, this would imply that $S^3 = S^2 \times S^1\!$,
which is not the case.

\subsection*{Informal summary}
In this section and in the previous section,
we have given two definitions of the Hopf map.
The projective definition as given in definition~\ref{def:hopf-projective}
can be written as $h : \SC \surj \PC$, $(z_1, z_2) \mapsto (z_1 : z_2)$.
Recall that if $z_2$ is nonzero, $(z_1 : z_2)$ may be thought of as $z_1 / z_2$.
This shows that multiplying $z_1$ and $z_2$ by $e^{it}$ for any $t \in \R$
does not change the image under the Hopf map.
It follows that the fibres of the Hopf map are circular,
a feature that will be explored further in the next section.
Definition~\ref{def:hopf-quaternionic} gives an alternative
definition of the Hopf map based on quaternions.
This definition is useful for doing computations,
because it allows us to work with Cartesian coordinates on $S^2\!$.
Theorem~\ref{thm:hopf-map-equivalence} shows that both definitions are equivalent.
This theorem also shows that $\PC$ and $S^2$
are \emph{homeomorphic},
meaning that for topological purposes
they are indistinguishable.

\section{Fibres}
\label{sec:fibres}
The Hopf map,
a surjective, continuous map from $S^3$ to $S^2\!$,
is interesting for many reasons.
The primary reason that we are interested in it here,
are its fibres.
Those are circles in $S^3$ that — as we will see in section~\ref{sec:linking} —
are linked, like keyrings can be linked.
Moreover, \emph{all} fibres are linked with \emph{every} other fibre.
Before we can study linking however,
we will first introduce the tools for studying the fibres.

In section~\ref{sec:hopf-quaternionic},
we saw already that the fibre above $p \in S^2$
is given by $S^1 x^{-1}$,
where $x \in S^3$ is such that $x \cdot i = p$.
In combination with equation~\ref{eqn:transitive-s3-action}
(an expression for $x$),
this allows us to explicitly parametrise the fibres of the Hopf map.
While such an expression is useful for computations,
it does not give us any geometrical insight.
Therefore, we will study the fibes of the Hopf map in a different way.
For this,
we will first revisit the $\GLC$ action on $\CZ$.

In section~\ref{sec:projective-space} we saw how $\GLC$ acts on $\CZ$.
Every element of $\GLC$ induces a homeomorphism $\CZ \to \CZ$.
These homeomorphisms are restrictions
of $\C$-linear (and thereby also $\R$-linear) automorphisms $\C^2 \to \C^2\!$,
which means the action descends to $S^3_\C$ and $\PC$.

\proposition[prop:gl2c-induces-actions]
Let $\alpha : \C^2 \to \C^2$ be a $\C$-linear automorphism.
Then there exist unique homeomorphisms $\beta, \gamma, \delta$
that make the following diagram commute:
\begin{center}
\begin{tikzcd}
\C^2   \ar[d, "\alpha"] &
\CZ    \ar[d, dashed, "\exists_! \, \beta"]
       \ar[l, hook, swap, "i"]
       \ar[r, two heads, "r"]
       \ar[rr, two heads, bend left, "q"{pos = 0.525}] &
S^3_\C \ar[d, dashed, "\exists_! \, \gamma"]
       \ar[r, two heads, "h"] &
\PC    \ar[d, dashed, "\exists_! \, \delta"] \\
\C^2   &
\CZ    \ar[l, hook, swap, "i"]
       \ar[r, two heads, "r"]
       \ar[rr, two heads, bend right, swap, "q"{pos = 0.525}] &
S^3_\C \ar[r, two heads, "h"] &
\PC
\end{tikzcd}
\end{center}
Here $q$ and $r$ denote the quotient maps,
$i$ denotes the inclusion,
and $h$ denotes the Hopf map.

\proof
The map $\beta$ is the restriction of $\alpha$ to $\CZ$.
The map $r \circ \beta$ is compatible with $r$
because $\beta$ is $\R$-linear;
if two elements are equivalent in $\CZ$,
then their images under $\beta$ are also equivalent.
By the universal property of the quotient topology
(theorem~\ref{thm:universal-property-quotient-topology}),
we get a unique continuous map $\gamma$.
By applying this argument to $\beta^{-1}$,
we find a unique continuous map $\gamma^{-1}$ which is the inverse of $\gamma$,
so $\gamma$ is a homeomorphism.
Similarly,
the map $q \circ \beta$ is compatible with $q$,
because if two elements in $\CZ$ differ by a factor $\lambda \in \C^*\!$,
then their images under $\beta$ differ by a factor $\lambda$,
as $\beta$ is $\C$-linear.
By the universal property of the quotient topology
we get a unique homeomorphism $\delta$ that makes the diagram commute.
\qed

This proposition tells us that the action of $\GLC$
descends naturally to $S^3_\C$ and $\PC$
by letting $g \in \GLC$ act on a representative.
Beware that although $\GLC$ acts on $\CZ$ by linear automorphisms,
the induced automorphisms are \emph{not} linear;
in general they are not linear automorphisms of $\R^4$ and $\R^3$
restricted to $S^3$ and $S^2\!$.

The general linear group $\GLR$ also acts on $\C^2\!$,
and by restriction on $\CZ$
when $\C^2$ is considered a four-dimensional real vector space.
This action induces an action of $\GLR$ on $S^3_\C$;
the same argument as before holds.
However, this action does \emph{not} induce an action on $\PC$,
because elements of $\GLR$ are not $\C$-linear automorphisms in general.

We saw already that the fibres of the projective hopf map are the
orbits of the $S^1$-action on $\CZ$.
This allows us to parametrise fibres easily.
For $(z_1 : z_2) \in \PC$,
if we assume that $|z_1|^2 + |z_2|^2 = 1$,
and if we work with $S^3$ instead of $S^3_\C$ by taking representatives of unit length,
we have:
\[ h^{-1}(z_1 : z_2) = \set{ (e^{it} z_1, e^{it} z_2) \in S^3 \mid t \in \R } \]
For the fibres above $(1 : 0)$ and $(0 : 1)$,
the geometrical picture is clear:
the fibres are unit circles in the planes spanned by $(1, 0)$ and $(i, 0)$,
and $(0, 1)$ and $(0, i)$ respectively.
Because the circles have unit radius,
they are great circles on $S^3\!$.
An other way to state this,
is that the fibres are precisely the intersections of $S^3$ with complex linear subspaces of dimension one
(in particular those are intersections of $S^3$ with real linear subspaces of dimension two).
For other points on $\PC$ however,
it is not immediately clear what the fibres look like.
This is where the $\GLC$-action is useful.
Via the homeomorphism $S^3_\C \to S^3$ from proposition~\ref{prop:s3-equivalence},
$\GLC$ acts on $S^3\!$.
If $g \in \GLC$ maps $(0 : 1)$ to $(z_1 : z_2)$,
then commutativity of the diagram in proposition~\ref{prop:gl2c-induces-actions}
means that $g$ maps the fibre above $(0 : 1)$ into the fibre above $(z_1 : z_2)$.
The fibre above $(0 : 1)$ is the intersection of a linear subspace
with $S^3\!$,
and because $g$ is linear,
the fibre above $(z_1 : z_2)$ is also the intersection of a linear subspace
with $S^3\!$.
Therefore it is a great circle as well.

\proposition[prop:glc-acts-transitively]
$\GLC$ acts transitively on $\PC$.

\proof
$\GLC$ acts transitively on $\CZ$.
Because $\PC$ is a quotient space of $\CZ$,
every element can be represented by an element of $\CZ$,
and because $\GLC$ acts transitively,
every representative can be reached from e.g. $(0, 1)$.
\qed

\corollary
All fibres of the Hopf map are great circles on $S^3\!$.
We saw already that for all $g \in \GLC$,
the fibre above $g \cdot (0 : 1)$ is a great circle,
and because $\GLC$ acts transitively,
every point in $\PC$ is of this form.

\section{Stereographic projection}
The fibres of the Hopf map that we investigated in the previous section
are subsets of $S^3\!$.
But $S^3$ can be hard to visualise;
it is a subset of a four-dimensional space.
Furthermore, with the goal of constructing a vector field on $\R^3$ in mind,
we somehow have to get to $\R^3\!$.
The way we can move between $\R^3$ and $S^3$ is by stereographic projection.
Given that $S^3$ and $\R^3$ are not homeomorphic,
we will have to make some concessions.
Fortunately $S^3$ is the one-point compactification of $\R^3\!$,
so if we want to go from $S^3$ to $\R^3$
we only loose a single point.
Nevertheless, this discrepancy will turn out to introduce some artefacts,
but these will in turn help to understand the geometry of $S^3\!$.

\definition
The \emph{stereographic projection} from $S^n$ onto $\R^n\!$,
with projection point $p \in S^n$ is given by
\[ \pi : S^n \setminus \set{p} \longto \R^n,
   \quad x \longmapsto \overline{px} \cap \R^n \]
Here we embed $\R^n$ in $\R^{n + 1}$ as $p^\perp\!$,
and $\overline{px}$ denotes the line connecting $p$ and $x$.

We will use coordinates $x_0, \ldots, x_n$ on $\R^{n + 1}$
and coordinates $x_1, \ldots, x_n$ on $\R^n\!$.
Setting $p = (1, 0, \ldots, 0)$
fixes the embedding of $\R^n$ in $\R^{n + 1}$ via $(x_1, \ldots, x_n) \mapsto (0, x_1, \ldots, x_n)$.
The connection line $\overline{px}$ can then be parametrised as $p + \lambda(x - p)$ for $\lambda \in \R$.
Intersecting this line with the hyperplane $x_0 = 0$ by setting
$p_0 + \lambda(x_0 - p_0) = 0$ yields $\lambda = - \frac{1}{x_0 - 1}$,
where the subscript zero denotes the first coordinate.
Substituting $\lambda$, we find the projection of $x$:
\begin{equationref}
\label{eqn:stereographic-projection}
   \pi(x_0, \ldots, x_n)
 = \left(-\frac{x_1}{x_0 - 1}, \ldots, -\frac{x_n}{x_0 - 1} \right)
 = \left(\frac{x_1}{1 - x_0}, \ldots, \frac{x_n}{1 - x_0} \right)
\end{equationref}
Conversely, if we have a point $x \in \R^n\!$,
then we can embed it in $\R^{n + 1}$ and parametrise the line through $x$ and $p$
as $p + \lambda(x - p)$ for $\lambda \in \R$.
This time we want to find the intersection with $S^n\!$,
so we must solve $\nsq{p + \lambda(x - p)} = 1$.
This yields $\lambda = \frac{2}{\nsq{x} + 1}$.
Substituting $\lambda$, we find the inverse image of $x$:
\begin{equationref}
\label{eqn:inverse-stereographic-projection}
    \pi^{-1}(x_1, \ldots, x_n)
% = \left(1 - \frac{2}{\nsq{x} + 1}, \frac{2x_1}{\nsq{x} + 1}, \ldots, \frac{2x_n}{\nsq{x} + 1} \right)
  = \frac{1}{\nsq{x} + 1} \left(\nsq{x} - 1, \, 2x_1, \, \ldots, \, 2x_n \right)
\end{equationref}
From equation~\ref{eqn:stereographic-projection} and \ref{eqn:inverse-stereographic-projection}
it is clear that $\pi$ and $\pi^{-1}$ are continuous.
It follows that $\pi$ is a homeomorphism between $S^n \setminus \set{p}$ and $\R^n\!$.

It turns out that the stereographic projection of a circle on $S^n$
is a circle in $\R^n\!$,
a property that will be useful when studying the fibres of $h \circ \pi^{-1}$.
To see why this is the case,
we will first study the more general mapping of spheres.

\definition
A \emph{sphere} in $S^n$ is the intersection of $S^n$
with a hyperplane given by $\inp{x}{\hat{n}} = t$,
where $\hat{n} \in S^n$ is a normal vector of the hyperplane,
and $t \in (-1, 1)$ is its offset to the origin.
We choose $|\,t\,| < 1$ such that the intersection is not empty or finite.

\example
A sphere in $S^2$ is simply a circle.
If $t = 0$, it is a great circle.

\definition
A \emph{sphere} in $\R^n$ with centre $x_c \in \R^n$ and radius $r \in \Rpos$
is the set
\[ \set{ x \in \R^n \mid r^{\,2} = \nsq{x - x_c} } \]
Note that a sphere in $S^n$ is the intersection of a sphere in $\R^{n + 1}\!$ with $S^n\!$.
By expanding the square,
we may alternatively write a sphere in $\R^n$
with centre $x_c$ and radius $r$ as
\begin{equationref}
\label{eqn:hypersphere}
\set{ x \in \R^n \mid r^{\,2} - \nsq{x_c} = \nsq{x} - 2 \inp{x}{x_c} }
\end{equationref}
Now we can turn to the relation between spheres in $S^n$ and in $\R^n\!$.

\proposition
Let $B \subseteq S^n$ be a sphere defined by the normal vector $\hat{n} \in S^n$
and offset $t \in (-1, 1)$.
Then for its image under the stereographic projection $\pi : S^n \setminus \set{p} \to \R^n\!$,
the following holds:
\begin{enumerate}
\item If $p \notin B$, $\pi(B)$ is a sphere in $\R^n\!$.
\item If $p \in B$, $\pi(B \setminus \set{p})$ is a hyperplane in $\R^n\!$.
\end{enumerate}

\proof
The image of $B$ or $B \setminus \set{p}$ when $p \in B$,
is given by the set of $x \in \R^n$ such that $\pi^{-1}(x) \in B$.
Embed $\R^n$ in $\R^{n + 1}$ as the hyperplane $x_0 = 0$.
Then we can write
\[ \pi(B)
\ = \ \set{x \in \R^n \mid \inp{\pi^{-1}(x)}{\hat{n}} = t }
\ = \ \set{x \in \R^n \mid n_0(\nsq{x} - 1) + \inp{x}{\hat{n}} = t } \]
Here $n_0$ denotes the first coordinate of $\hat{n}$.
If $n_0 \neq 0$,
we recognise equation~\ref{eqn:hypersphere},
so $\pi(B)$ is a sphere in $\R^n\!$.
If $n_0 = 0$,
then the predicate reduces to $\inp{x}{\hat{n}} = t$,
which is the equation for a hyperplane in $\R^n$ with normal $\hat{n}$
and offset $t$ to the origin.
Furthermore, $n_0 = 0$ if and only if $p \in B$.
\qed

\proposition
Let $n \geq 2$ and let $C \subseteq S^n$ be a circle,
the nonempty intersection of $n - 1$ spheres
defined by hyperplanes with linearly independent normal vectors.
Then for its image under the stereographic projection $\pi : S^n \setminus \set{p} \to \R^n\!$,
the following holds:
\begin{enumerate}
\item If $p \notin C$, $\pi(C)$ is a circle in $\R^n\!$.
\item If $p \in C$, $\pi(C \setminus \set{p})$ is a line in $\R^n\!$.
\end{enumerate}

\proof
We use the fact that for $U, V \subseteq S^n\!$,
we have $\pi(U \cap V) = \pi(U) \cap \pi(V)$.
As $C$ is the intersection of $n - 1$ spheres,
its image is the intersection of $n - 1$ spheres or hyperplanes.
These all lie in distinct hyperplanes with linearly independent normal vectors,
so the image is a subset of a two-dimensional plane in $\R^n\!$.
If $p \notin C$ then at least one of the images will be a sphere,
so $\pi(C)$ is a circle.
If $p \in C$ then all of the images will be distinct hyperplanes,
the intersection of which is a line.
\qed

\corollary[cor:circles-and-axis]
The fibres of $h \circ \pi^{-1}$ are all circles in $\R^3\!$,
except for the fibre above $(1 : 0)$ which is the $x_1$-axis.
Furthermore, from equation~\ref{eqn:stereographic-projection} it is clear
that the fibre above $(0 : 1)$ is the unit circle in the $x_2 x_3$-plane.
This has been visualised in figure~\ref{fig:two-fibres}.

\begin{figure}
\definecolor{f1c}{hsb}{0.6, 0.6, 0.5}
\definecolor{f2c}{hsb}{0.0, 0.8, 0.6}
\margincaption[3em]{\label{fig:two-fibres}
Fibres of the Hopf map visualised through stereographic projection;
the fibre above $ i \in S^2$ is the $x_1$-axis (coloured {\color{f2c}•}),
the fibre above $-i \in S^2$ is the unit circle in the plane $x_1 = 0$
(coloured {\color{f1c}•}).
See also figure~\ref{fig:more-fibres}.}
\begin{python}
from hopf import *
from math import pi
pr         = orthographic_projection(pi * 0.42, pi * -0.1)
fibre_x2x3 = [compose(pr, projected_fibre_from_spherical([-pi * 0.5, 0.0])), 'f1f', 'back']
fibre_x1_b = [compose(pr, projected_fibre_from_degenerate(-1.6, -1.4)), 'f2f-dot', 'back']
fibre_x1   = [compose(pr, projected_fibre_from_degenerate(-1.4,  1.4)), 'f2f', 'back']
fibre_x1_e = [compose(pr, projected_fibre_from_degenerate( 1.4,  1.6)), 'f2f-dot', 'back']
cmds = generate_raw_draw_2d(0.5, [fibre_x2x3, fibre_x1, fibre_x1_b, fibre_x1_e])
box  = generate_raw_box_2d([1.5, 1.5, 1.5], pr, 'box')
write_items('generated/two-fibres-box.tikz', cons(box, cmds))

latm   = generate_raw_latitude_2d(0.0, pr, 'dashed')
points = [[[-pi * 0.5, 0.0], 'f1c'], [[pi * 0.5, 0.0], 'f2c']]
cmds   = generate_raw_points_2d(pr, points, '1.3pt')
write_items('generated/two-fibres-sphere.tikz', cons(latm, cmds))
\end{python}
\begin{center}
\tikzexternalenable
\tikzsetnextfilename{two-fibres}
\begin{tikzpicture}
\tikzstyle{back} = [white, line width = 3pt];
\tikzstyle{f1f} = [f1c, line width = 1pt];
\tikzstyle{f2f} = [f2c, line width = 1pt];
\tikzstyle{f2f-dot} = [f2f, dotted, line cap = round];
\tikzstyle{box} = [line width = 0.47pt];
\coordinate (D) at (-3, 0);
\coordinate (C) at ( 3, 0);

\begin{scope}[shift = {(D)}, scale = 1.2, local bounding box = {domain}]
\input{generated/two-fibres-box.tikz}
\end{scope}

% Draw S^2.
\begin{scope}[shift = {(C)}, scale = 1.5, local bounding box = {codomain}]
\draw[line width = 0.47pt] (0, 0) circle (1);
\input{generated/two-fibres-sphere.tikz}
\end{scope}

% Draw an arrow from the plot to S^2 with tikzcd arrow style.
\begin{scope}[commutative diagrams/every diagram]
\path let \p1 = (domain.east) in node (from) at (\x1 + 1em, 0) {};
\path let \p1 = (codomain.west) in node (to) at (\x1 - 1em, 0) {};
\path[commutative diagrams/.cd, every arrow, every label]
  (from) edge [commutative diagrams/maps to] node {$h \circ \pi^{-1}$} (to);
\end{scope}
\end{tikzpicture}
\end{center}
\end{figure}

\section{Linking}
\label{sec:linking}
The fibres of the Hopf map — circles, as shown in the previous section — possess an interesting property:
they are all linked with every other fibre.
In this section we will give a formal definition of linking,
and prove linkedness of the fibres.
In section~\ref{sec:linked-and-knotted-fields} we will explore a physical application of linking.

Linking is a property of a pair of closed curves
that is not intrinsic to the curves as topological spaces themselves,
but rather to their embedding in a surrounding space.
Considering this, it makes sense to look at the complement of the curves.
By studying the fundamental group of the complement,
we can tell different situations apart.
For instance,
the fundamental group of the complement of two linked circles in $\R^3$
is the free abelian group on two generators,
whereas the fundamental group of the complement of two unlinked circles
is the free \emph{nonabelian} group on two generators.
(See \parencite[p.~46]{hatcher2002}.
Incidentally, Hatcher introduces linking
as one of the main motivations for studying the fundamental group.)

\definition
Let $X$ be a topological space.
An \emph{$n$-link} in $X$ is an ordered collection of $n$ continuous maps $\sigma_i : S^1 \to X$,
such that the images of $\sigma_1, \ldots, \sigma_n$ are disjoint.
The link is called \emph{proper} if every $\sigma_i$ is a homeomorphism onto its image.

This definition is based on \parencite{milnor1954}.
Because in a proper link every $\sigma_i$ is a homeomorphism onto its image,
the components of the link do not self-intersect.
Because the images are disjoint,
they do not intersect eachother.

\definition
Two $n$-links $(\sigma_1, \ldots, \sigma_n)$ and $(\tau_1, \ldots, \tau_n)$
are said to be \emph{homotopic}
if there exist homotopies $H_i : [0, 1] \times S^1 \to X$ from $\sigma_i$ to $\tau_i$,
such that for all $t \in [0, 1]$,
the images of $H_i(t, {}\cdot{})$ are disjoint.
The links are said to be \emph{properly homotopic} if
for all $t \in (0, 1)$ the maps $H_i(t, {}\cdot{})$ are homeomorphisms onto their images.
Homotopy and proper homotopy define two equivalence relations on the set of $n$-links.
We call a proper $n$-link \emph{trivial}
if it is properly homotopic to an $n$-link of $n$ distinct constant functions.

A homotopy between links captures the idea of links being “the same”.
Homotopy enables us to tell apart many different types of links,
but there is one caveat:
a homotopy from one link into another might have self-intersecting components
at some point in time.
For instance, the Whitehead link is homotopic to two unlinked circles,
but it can only be unlinked if the components are allowed to self-intersect.
\marginfigure{
\tikzexternalenable
\tikzsetnextfilename{whitehead-link}
\begin{center}
\hspace{-1em}
\begin{tikzpicture}[baseline={(C.base)}]
\tikzstyle{back} = [line width = 4.94pt, black]
\tikzstyle{knot} = [line width = 4.0pt, white]
\setlength{\kr}{2em}
\coordinate (A) at ( 45 : 2\kr);
\coordinate (B) at (-45 : 2\kr);
\coordinate (C) at ($ (A) !.5! (B) $); % Half-way between (A) and (B).

\useasboundingbox let \p1 = (A), \p2 = (B) in
            (\x1 - \kr - 2.5pt, \y1 + \kr + 2.5pt) rectangle
            (\x2 + \kr + 2.5pt, \y2 - \kr - 2.5pt);

\draw[back] (C) circle (\kr);
\draw[knot] (C) circle (\kr);

\draw[back] ($(B) + (270 : \kr)$) arc (270 : 135 : \kr) -- (C) --
            ($(A) + (-45 : \kr)$) arc (-45 :  90 : \kr);
\draw[knot] ($(B) + (270 : \kr)$) arc (270 : 135 : \kr) -- (C) --
            ($(A) + (-45 : \kr)$) arc (-45 :  90 : \kr);

\draw[back] ($(A) + (89 : \kr)$) arc (89 : 225 : \kr) -- (C) --
            ($(B) + (45 : \kr)$) arc (45 : -91 : \kr);
\draw[knot] ($(A) + (88 : \kr)$) arc (88 : 225 : \kr) -- (C) --
            ($(B) + (45 : \kr)$) arc (45 : -92 : \kr);

\draw[back] ($(C) + (120 : \kr)$) arc (120 : 150 : \kr);
\draw[knot] ($(C) + (119 : \kr)$) arc (119 : 151 : \kr);

\draw[back] ($(C) + (-30 : \kr)$) arc (-30 : -60 : \kr);
\draw[knot] ($(C) + (-29 : \kr)$) arc (-29 : -61 : \kr);
\end{tikzpicture}
\end{center}
\vspace{1em}
\caption{The Whitehead link.}}
With the notion of proper homotopy we can also differentiate between
the Whitehead link and and unlinked circles:
the unlinked circles are trivial,
but the Whitehead link is not.
These types of links are beyond the scope of this thesis though;
for the fibres of the Hopf map
the notion of homotopy will be sufficient.
To determine whether two closed curves are linked,
we will examine the fundamental group of the complement of \emph{one} curve.
The other curve then determines an element of the fundamental group.
If the fundamental group happens to be $\Z$,
we can quantify linking with an integer.

\definition
Let $(\sigma_1, \sigma_2)$ be a proper two-link in a topological space $X$.
Suppose that $G_1 = \pi_1(X \setminus \im \sigma_1,\, \sigma_2(0)) \cong \Z$.
Then $[\sigma_2]$ is an element of $G_1$,
so under an isomorphism $G_1 \to \Z$ it maps to an integer $n$.
Its absolute value $|n|$ is independent of the choice of isomorphism.
This $|n|$ is the \emph{linking number} of $\sigma_2$ with $\sigma_1$.

This definition of linking number is not symmetric with regard to $\sigma_1$ and $\sigma_2$:
we require only the complement of $\sigma_1$ to have a fundamental group isomorphic to $\Z$.
Even in $\R^3\!$, the fundamental group of such a complement can be quite surprising.
For example, the fundamental group of the complement of an $(m, n)$ torus knot
is shown in \parencite[p.~47]{hatcher2002} to be the quotient group
of the free group with generators $a$ and $b$,
where $a^m$ and $b^n$ are identified.
\marginfigure{
\tikzexternalenable
\tikzsetnextfilename{trefoil-knot}
\begin{center}
\hspace{0.5em}
\begin{tikzpicture}[baseline={(C.base)}]
\tikzstyle{back} = [line width = 4.94pt, black]
\tikzstyle{knot} = [line width = 4.0pt, white]
\setlength{\kr}{2em}
\coordinate (A) at ( 90 : 0.7\kr);
\coordinate (B) at (210 : 0.7\kr);
\coordinate (C) at (330 : 0.7\kr);
\coordinate (Z) at ($(B) !.5! (C) + (90 : \kr)$);

\useasboundingbox let \p1 = (A), \p2 = (B), \p3 = (C) in
            (\x2 - \kr - 2.5pt, \y1 + \kr + 2.5pt) rectangle
            (\x3 + \kr + 2.5pt, \y3 - \kr - 2.5pt);

\draw[back] ($(C) + (330 : \kr)$) arc (-30 :  90 : \kr) -- (Z);
\draw[knot] ($(C) + (330 : \kr)$) arc (-30 :  90 : \kr) -- (Z);
\draw[back] ($(B) + (210 : \kr)$) arc (210 : 330 : \kr) --
            ($(A) + (330 : \kr)$) arc (-30 :  90 : \kr);
\draw[knot] ($(B) + (210 : \kr)$) arc (210 : 330 : \kr) --
            ($(A) + (330 : \kr)$) arc (-30 :  90 : \kr);
\draw[back] ($(A) + ( 89 : \kr)$) arc ( 89 : 210 : \kr) --
            ($(C) + (210 : \kr)$) arc (210 : 331 : \kr);
\draw[knot] ($(A) + ( 88 : \kr)$) arc ( 88 : 210 : \kr) --
            ($(C) + (210 : \kr)$) arc (210 : 332 : \kr);
\draw[back] (Z) + (0.1pt, 0) -- ($(B) + ( 90 : \kr)$) arc ( 90 : 211 : \kr);
\draw[knot] (Z) + (0.5pt, 0) -- ($(B) + ( 90 : \kr)$) arc ( 90 : 212 : \kr);
\end{tikzpicture}
\end{center}
\vspace{1em}
\caption{A 2,3 torus knot, also called a \emph{trefoil knot}.}}
This means that the linking number of a nontrivial torus knot with a circle
is well-defined,
but the linking number of the circle with the knot is not.
This problem can be alleviated by considering the first homology group
instead of the fundamental group,
an approach that is taken in \parencite[p.~132]{rolfsen2003}.
Rolfsen also relates the linking number as defined here to other definitions,
such as the \emph{Gauss linking integral}.
In the remainder of this section,
we will only consider curves of which the fundamental group of the complement is isomorphic to $\Z$.
For curves in $\R^3$ or $S^3\!$,
it is shown in theorem~6 of \parencite[p.~135]{rolfsen2003}
that the linking number
does not depend on the order of $\sigma_1$ and $\sigma_2$,
nor on their orientation.
This means that the we can quantify the linking of $\set{\im \sigma_1, \im \sigma_2}$
with a unique nonnegative integer.
A nonzero linking number implies that two curves are linked,
but the converse does not hold:
the Whitehead link has linking number zero,
but it is not trivial.
In any case,
the linking number suffices to show that the fibres of the Hopf map are linked.
Before we prove the general case
we will demonstrate linkedness of two particular fibres.
By using the action of $\GLC$
this proof can be extended to the general case.

As shown in section~\ref{sec:fibres},
the fibres of the Hopf map above $(1 : 0)$ and $(0 : 1)$ may be parametrised as
\[ \sigma_1: [0, 1] \longto S^3, \quad t \longmapsto (e^{2\pi i t}, 0)
   \quad \textup{and} \quad
   \sigma_2: [0, 1] \longto S^3, \quad t \longmapsto (0, e^{2\pi i t}) \]
In corollary~\ref{cor:circles-and-axis} we saw that under stereographic projection,
$\sigma_1$ maps to the $x_1$ axis
and $\sigma_2$ maps to the unit circle in the $x_2 x_3$-plane.

\proposition
Let $\sigma_1$ and $\sigma_2$ be as introduced above.
Then $\sigma_2$ is linked once with $\sigma_1$ in $S^3\!$.

\proof
Restricted to $S^3 \setminus \im \sigma_1$,
the stereographic projection $\pi : S^3 \setminus\set{p} \to \R^3$
is a homeomorphism onto $\R^3 \setminus \pi(\im \sigma_1)$,
because the projection point $p = (1, 0)$ lies on the image of $\sigma_1$.
Therefore, it induces an isomorphism
$\pi_1(S^3 \setminus \im \sigma_1, \, \sigma_2(0)) \to \pi_1(\R^3 \setminus \pi(\im \sigma_1), \, \pi(\sigma_2(0)))$
on fundamental groups.
As we saw before, $\pi(\im \sigma_1)$ is the $x_1$-axis in $\R^3\!$,
so the space $\R^3 \setminus \pi(\im \sigma_1)$ deformation retracts onto $\R^2$ minus the origin
by projecting on the $x_2 x_3$-plane.
This induces an isomorphism
$\pi_1(S^3 \setminus \im \sigma_1, \, \sigma_2(0)) \to \pi_1(\R^2 \setminus \set{0},\, (1, 0))$.
(See for example proposition~1.17 of \parencite[p.~31]{hatcher2002}.)
Because the image of $\pi \circ \sigma_2$ lies in the $x_2x_3$ plane,
$[\pi \circ \sigma_2]$ is an element of $\pi_1(\R^2 \setminus \set{0},\, (1, 0))$.
This fundamental group is of course isomorphic to $\Z$,
and $\pi \circ \sigma_2$ is a curve that goes around the origin once,
so it is a generator of the fundamental group.
It follows that $\sigma_2$ is linked once with $\sigma_1$.
\qed

To demonstrate that any two fibres are linked,
we will improve upon the result of proposition~\ref{prop:glc-acts-transitively},
which stated that $\GLC$ acts transitively on $\PC$.
In fact, the stabiliser $\GLC_p$ of a point $p \in \PC$
still acts transitively on $\PC \setminus \set{p}$.

\proposition[prop:glc-acts-doubly-transitive]
Let $(z_1 : z_2)$ and $(\nu_1 : \nu_2) \in \PC$ be distinct points.
Then there exists a $g \in \GLC$,
such that $g \cdot (1 : 0) = (z_1 : z_2)$ and $g \cdot (0 : 1) = (\nu_1 : \nu_2)$.

\proof
Consider the matrix
\[ g = \begin{pmatrix}z_1 & \nu_1 \\ z_2 & \nu_2 \end{pmatrix} \]
The columns of this matrix are linearly independent by assumption,
so its determinant is nonzero.
It follows that $g \in \GLC$,
and clearly $g \cdot (1 : 0) = (z_1 : z_2)$
and $g \cdot (0 : 1) = (\nu_1 : \nu_2)$.
\qed

\corollary
Any two fibres of the Hopf map are linked in $S^3$:
proposition~\ref{prop:glc-acts-doubly-transitive} tells us that the situation
of any two fibres can be transformed into the situation of $(1 : 0)$ and $(0 : 1)$
by a homeomorphism,
and the linking number is invariant under such a homeomorphism.

\begin{figure}
\margincaption[0.5em]{\label{fig:more-fibres}
Linked fibres of the Hopf map visualised through stereographic projection.
Fibres above points near $ i \in S^2$ (the north pole) are circles with a large radius in $\R^3\!$,
close to the $x_1$-axis (truncated here).
Fibres above points near $-i \in S^2$ (the south pole) are circles close to the unit circle in the $x_2 x_3$-plane.}
\begin{python}
from hopf import *
from math import pi
interval5 = interval_open(5)
interval3 = interval_open(3)
points_a  = [[[-pi * 0.3, (t * 0.7 + 0.30) * pi], 'a{0}'.format(i)] for (i, t) in enumerate(interval5)]
points_b  = [[[-pi * 0.1, (t * 0.4 + 0.50) * pi], 'b{0}'.format(i)] for (i, t) in enumerate(interval5)]
points_c  = [[[ pi * 0.3, (t * 0.5 + 1.50) * pi], 'c{0}'.format(i)] for (i, t) in enumerate(interval3)]
points_ab = points_a + points_b
points    = points_ab + points_c
pr        = orthographic_projection(pi * 0.42, pi * -0.1)
def limited(x):
    f = compose(pr, projected_fibre_from_spherical(x))
    return lambda t: f((0.910 + t * (1.590 - 0.921)) % 1) # Tweaked to the box boundaries.
fibres_ab = [[compose(pr, projected_fibre_from_spherical(x)), 'front, ' + st, 'back'] for [x, st] in points_ab]
fibres_c  = [[limited(x), 'front, ' + st, 'back'] for [x, st] in points_c]
fibres    = fibres_ab + fibres_c
cmds      = generate_raw_draw_2d(0.1, fibres)
box       = generate_raw_box_2d([1.636, 1.636, 1.636], pr, 'box')
write_items('generated/more-fibres-box.tikz', cons(box, cmds))

lat_a   = generate_raw_latitude_2d(-pi * 0.3, pr, 'dashed')
lat_b   = generate_raw_latitude_2d(-pi * 0.1, pr, 'dashed')
lat_c   = generate_raw_latitude_2d( pi * 0.3, pr, 'dashed')
cmds    = generate_raw_points_2d(pr, points, '1.3pt')
write_items('generated/more-fibres-sphere.tikz', cat([lat_a, lat_b, lat_c], cmds))

colours_a = generate_colours('a', [[  0.0 + h * 0.4,  0.6, 0.6] for h in interval5])
colours_b = generate_colours('b', [[  0.5 + h * 0.4,  0.6, 0.6] for h in interval5])
colours_c = generate_colours('c', [[-0.05 + h * 0.27, 0.9, 0.9] for h in interval3])
colours   = cat(cat(colours_a, colours_b), colours_c)
write_items('generated/more-fibres-colours.tikz', colours)
\end{python}
\begin{center}
\tikzexternalenable
\tikzsetnextfilename{more-fibres}
\begin{tikzpicture}
\input{generated/more-fibres-colours.tikz}
\tikzstyle{back}  = [line width = 3pt, white];
\tikzstyle{front} = [line width = 1pt];
\tikzstyle{box} = [line width = 0.47pt];
\coordinate (D) at (-3, 0);
\coordinate (C) at ( 3, 0);

\begin{scope}[shift = {(D)}, scale = 1.1, local bounding box = {domain}]
\input{generated/more-fibres-box.tikz}
\end{scope}

% Draw S^2.
\begin{scope}[shift = {(C)}, scale = 1.5, local bounding box = {codomain}]
\draw[line width = 0.47pt] (0, 0) circle (1);
\input{generated/more-fibres-sphere.tikz}
\end{scope}

% Draw an arrow from the plot to S^2 with tikzcd arrow style.
\begin{scope}[commutative diagrams/every diagram]
\path let \p1 = (domain.east) in node (from) at (\x1 + 1em, 0) {};
\path let \p1 = (codomain.west) in node (to) at (\x1 - 1em, 0) {};
\path[commutative diagrams/.cd, every arrow, every label]
  (from) edge [commutative diagrams/maps to] node {$h \circ \pi^{-1}$} (to);
\end{scope}
\end{tikzpicture}
\end{center}
\end{figure}

Because the stereographic projection is a homeomorphism,
the projection of any two fibres in $S^3$ that do not pass through the projection point
will be a set of two linked circles in $\R^3\!$.
Even if one of the fibres passes through the projection point
(and thus projects to the $x_1$-axis),
there is a sense of linkedness in $\R^3$:
the fibre that does not pass through the projection point
will project to a circle around the $x_1$-axis.
A few of the fibres have been visualised in figure~\ref{fig:more-fibres}.

\subsection*{Informal summary}
In this section we used topology to quantify linkedness.
An \emph{$n$-link} is a collection of non-intersecting closed curves,
and for a \emph{proper $n$-link} the curves cannot be self-intersecting either.
If two links can be defomed into one another by bending and twisting but not intersecting,
the links are called \emph{homotopic}.
With homotopy we allow the curves to self-intersect in the process,
but for a \emph{proper homotopy} even this is disallowed.
If we want to know whether e.g. a collection of rubber bands can be unlinked,
we must ask whether the corresponding link is \emph{trivial}.
If it is, it is possible to separate all of the bands.
Because homotopy does not allow us to quantify linkedness,
we turn to another quantity: the \emph{linking number}.
The linking number of two closed curves $\sigma_1$ and $\sigma_2$
counts how many times $\sigma_2$ winds around $\sigma_1$,
a concept that can be made precise by using the fundamental group.
Finally, we showed that any two fibres of the Hopf map have linking number one in $S^3\!$.
Using stereographic projection,
we can see that the fibres are linked in $\R^3$ as well.


\section{More about Weierstrass' Elliptic Functions; Quotients}
\subsection{An Elliptic Curve}
We have seen two general constructions of Riemann surfaces with genus $1$:
The complex torus and the compactification of the Riemann surface associated with $w^2=z^3-z$.
These two constructions has to be related, but how?
Here, we shall prove that any complex torus is isomorphic to an algebraic construction.
This is a corollary of Proposition \ref{elliptic_wp}.
\begin{corollary}
    Let $\mathbb C/\Lambda$ be a complex torus, then there are constants $g_2,g_3$ such that $\mathbb C/\Lambda$ is biholomorphic to a one-point compactification of the graph $X'=\{(x,y)\in\mathbb C^2:y^2=4x^3-g_2x-g_3\}$.
\end{corollary}
\begin{proof}[Sketch of proof]
    Take $g_2,g_3$ exactly as in Proposition \ref{elliptic_wp}.
    Turns out $X'$ can be compactified into a Riemann surface $X=X'\cup\{\infty\}$ with charts provided by coordinate projection.
    Define $F:\mathbb C\to X$ via $z\mapsto(\wp(z),\wp^\prime(z))$ where $\wp=\wp_\Lambda$.
    Now $\operatorname{Im}F\subset X$ by Proposition \ref{elliptic_wp} and $F$ is analytic as the charts are coordinate projections.
    So via a quotient, we can use $F$ to induce $\Phi:\mathbb C/\Lambda\to X$.
    It remains to show that $\Phi$ is a conformal equivalence.
    As it is analytic, it suffices to show that it is bijective.
    It is surjective as it is nonconstant and everything is compact.
    To see it is injective, consider the period parallelogram centered at $0$, that is the parallelogram with vertices $(\omega_1+\omega_2)/2,(\omega_2-\omega_1)/2,(-\omega_1-\omega_2)/2,(\omega_1-\omega_2)/2$.
    It suffices to show that $F$ is injective in the interior of $P$, which will imply injectivity of $\Phi$ in general due to the valency theorem.
    Suppose $F(z)=F(z')$ for $z,z'\in P^\circ$, then $\wp(z)=\wp(z')$, so $z=\pm z'$ as $\wp$ is even and has degree $2$.
    But also $\wp^\prime(z)=\wp^\prime(z')=\pm \wp^\prime(z)$ as $\wp$ is odd, so $z=z'$ as the zeros of $\wp^\prime$ are not in $P^\circ$.
    This completes the proof.
\end{proof}


\chapter{Linear transformation of vector spaces}


\subsection{Topological nets}\label{subsec:topological_nets}

In this section, \( X \) will denote an arbitrary nonempty topological space.

\begin{definition}\label{def:topological_net}
  A \term{net} or \term{generalized \hyperref[def:sequence]{sequence}} or \term{Moore-Smith sequence} in a nonempty set \( S \) is a family of elements of \( S \) indexed by a nonempty \hyperref[def:cartesian_product/indexed_family]{directed set}, i.e. a function from a nonempty directed \hyperref[def:directed_set]{set} \( (\mscrK, \leq) \) to \( S \). We use the conventional notation for indexed families:
  \begin{equation*}
    \{ x_k \}_{k \in \mscrK},
  \end{equation*}
  because the preorder on the domain \( \mscrK \) is usually clear from the context.

  If we know that the net is a sequence, we will usually use the notation for sequences given in \fullref{def:sequence}.

  Note that this definition does not actually require a topology on \( S \). Some other important definitions also do not require topologies:
  \begin{thmenum}
    \thmitem{def:topological_net/frequently_in} We say that \( \{ x_k \}_{k \in \mscrK} \) is \term{frequently in} the set \( A \subseteq S \) if for every index \( k_0 \in \mscrK \) there exists an index \( k \geq k_0 \) such that \( x_k \in A \).

    \thmitem{def:topological_net/eventually_in} We say that \( \{ x_k \}_{k \in \mscrK} \) is \term{eventually in} the set \( A \subseteq S \) if there exists an index \( k_0 \) such that \( x_k \in A \) whenever \( k \geq k_0 \). This is obviously a stronger condition.

    \thmitem{def:topological_net/subnet}\mcite[50]{Engelking1989}We say that the net \( \{ y_m \}_{m \in M} \subseteq S \) is a \term{subnet} of \( \{ x_k \}_{k \in \mscrK} \subseteq S \) if there exists an embedding function \( \varphi: M \to \mscrK \) such that
    \begin{thmenum}
      \thmitem{def:topological_net/subnet/directed} To every \( k \in \mscrK \) there corresponds \( m \in M \) such that \( \varphi(m) \geq k \).
      \thmitem{def:topological_net/subnet/identity} For every \( m \in M \) we have \( x_{\varphi(m)} = y_m \).
    \end{thmenum}
  \end{thmenum}
\end{definition}

\begin{proposition}\label{thm:def:topological_net}
  \hyperref[def:topological_net]{Nets} have the following basic properties:

  \begin{thmenum}
    \thmitem{thm:def:topological_net/eventually_in_implies_frequently_in} \enquote{\hyperref[def:topological_net/eventually_in]{Eventually in}} implies \enquote{\hyperref[def:topological_net/frequently_in]{frequently in}}.

    \thmitem{thm:def:topological_net/net_eventually_in_iff_not_frequently_in_complement} The net \( \{ x_k \}_{k \in \mscrK} \subseteq S \) is eventually in \( A \subseteq S \) if and only if it is not frequently in \( S \setminus A \).
  \end{thmenum}
\end{proposition}
\begin{proof}
  \SubProofOf{thm:def:topological_net/eventually_in_implies_frequently_in} Suppose that the net \( \{ x_k \}_{k \in \mscrK} \subseteq S \) is eventually in \( A \subseteq S \). Then there exists an index \( k_0 \) such that \( x_k \in A \) for all \( k \geq k_0 \).

  Given any index \( k_1 \), we choose \( k_2 \) such that \( k_2 \geq k_0 \) and \( k_2 \geq k_1 \) (this is possible by the definition of a directed set). Then \( x_{k_2} \in A \) and \( k_2 \) satisfies the existence quantifier in \fullref{def:topological_net/frequently_in}.

  \SubProofOf{thm:def:topological_net/net_eventually_in_iff_not_frequently_in_complement} Suppose that \( \{ x_k \}_{k \in \mscrK} \) is both eventually in \( A \) and frequently in \( S \setminus A \).

  Since the net is eventually in \( A \), we can fix an index \( k_0 \) such that \( x_k \in A \) whenever \( k \geq k_0 \).

  Since the net is frequently in \( A \), we can fix an index \( k_1 \geq k_0 \) such that \( k_1 \in S \setminus A \), which is a contradiction.

  This proves that the two conditions are incompatible.
\end{proof}

\begin{definition}\label{def:net_convergence}
  Let \( X \) be a topological space and \( \{ x_k \}_{k \in \mscrK} \subseteq X \) be a net.

  \begin{thmenum}
    \thmitem{def:net_convergence/cluster} If the net is frequently in every neighborhood of \( x_0 \in X \), we say that \( x_0 \) is a \term{cluster point} or an \term{accumulation point} of \( \{ x_k \}_{k \in \mscrK} \subseteq X \).

    \thmitem{def:net_convergence/limit} If the net is eventually in every neighborhood of \( x_0 \in X \), we say that \( x_0 \) is a \term{limit point} of \( \{ x_k \}_{k \in \mscrK} \subseteq X \).
  \end{thmenum}

  In general, there can exist multiple limit points (see \fullref{ex:multiple_limit_points_of_net}) and even more cluster points (see \fullref{ex:cluster_points/sine}). In Hausdorff spaces, however, limits are unique by \fullref{thm:t2_iff_singleton_limits}.

  If \( \{ x_k \}_{k \in \mscrK} \subseteq X \) has a unique limit, we say that the net \term[bg=схожда,ru=сходится]{converges} to \( x_0 \) use the notation
  \begin{equation*}
    x_0 = \lim_{k \in \mscrK} x_k.
  \end{equation*}

  If the net is a \hyperref[def:sequence]{sequence}, we also use the following notations:
  \begin{itemize}
    \item \( x_0 = \lim_{k \to \infty} x_k \)
    \item \( x_0 = \lim x_k \)
    \item \( x_k \xrightarrow[k \to \infty]{} x_0 \)
    \item \( x_k \to x_0 \)
  \end{itemize}
\end{definition}

\begin{example}\label{ex:multiple_limit_points_of_net}
  Even limits of sequences need not be unique in arbitrary topological spaces. Let \( X = \{ y, z \} \) be a binary set with the indiscrete \hyperref[def:standard_topologies/indiscrete]{topology} \( \{ \varnothing, X \} \). L

  Define the following \hyperref[def:sequence]{sequence}
  \begin{balign*}
    x_k \coloneqq \begin{cases}
      y, & k \text{ is even}, \\
      z, & k \text{ is odd}.
    \end{cases}
  \end{balign*}

  The only neighborhood of \( y \), the whole space \( X \), contains all members of the sequence, therefore \( y \) is a limit point of the sequence. The same is true for \( z \), however.
\end{example}

\begin{example}\label{ex:cluster_points/sine}
  Consider the net \( \{ \sin(k) \}_{k \in \BbbR} \). It has no limit point, yet every real number in the interval \( [-1, 1] \) is a cluster point.
\end{example}

\begin{example}\label{ex:reverse_inclusion_net}
  A commonly used technique is to use a variation of a \term{reverse set inclusion net}.

  Fix an element \( x_0 \in X \) of any topological space and choose an element \( x_U \) our of every neighborhood \( U \) of \( x_0 \). Consider the directed set \( (\mscrT(x), \leq) \) consisting of all neighborhoods of \( x_0 \) ordered by \term{reverse inclusion}, i.e. \( U \leq V \iff U \supseteq V \).

  Choose an element \( x_U \) from each neighborhood \( U \) of \( x_0 \). Then, by construction, \( x_0 \) is a limit point of the net \( \{ x_U \}_{U \in T(x_0)} \).
\end{example}

\begin{proposition}\label{thm:def:net_convergence}
  Convergence of \hyperref[def:net_convergence]{nets} has the following basic properties:

  \begin{thmenum}
    \thmitem{thm:def:net_convergence/sequence_converges_iff_almost_entirely_in_neighborhood} The point \( x_0 \in X \) is a limit point of the sequence \( \{ x_k \}_{k=1}^\infty \subseteq X \) if and only if, given a neighborhood \( U \) of \( x_0 \), only finitely many elements of the sequence are outside \( U \).

    \thmitem{thm:def:net_convergence/limit_point_is_cluster_point} Every limit point is a cluster point.

    \thmitem{thm:def:net_convergence/cluster_point_iff_subnet_limit_point} A point \( x_0 \in X \) is a cluster point of the net \( \{ x_k \}_{k \in \mscrK} \subseteq X \) if and only if \( x_0 \) is a limit point of some subnet.

    \thmitem{thm:def:net_convergence/limit_implies_no_proper_cluster_points} If a net has a limit point, all of its cluster points are limit points.

    \thmitem{thm:def:net_convergence/unique_limit_point_iff_unique_cluster_point} A net has a unique limit point if and only if has a unique cluster point.

    \thmitem{thm:def:net_convergence/unique_limit_point_iff_subnets_have_same_limit} A net has a unique limit point if and only if all subnets have the same limit point.
  \end{thmenum}
\end{proposition}
\begin{proof}
  \SubProofOf{thm:def:net_convergence/sequence_converges_iff_almost_entirely_in_neighborhood} This is simply a restatement of \fullref{def:net_convergence/limit} for the special case of sequences.

  \SubProofOf{thm:def:net_convergence/limit_point_is_cluster_point} Follows from \fullref{thm:def:topological_net/eventually_in_implies_frequently_in}.

  \SubProofOf{thm:def:net_convergence/cluster_point_iff_subnet_limit_point}
  The definition of a cluster point (\fullref{def:net_convergence/cluster}) allows us to build a reverse inclusion net in the style of \fullref{ex:reverse_inclusion_net}.

  \SubProofOf{thm:def:topological_net/eventually_in_implies_frequently_in} Suppose that the net \( \{ x_k \}_{k \in \mscrK} \subseteq S \) is eventually in \( A \subseteq S \). Then there exists an index \( k_0 \) such that \( x_k \in A \) for all \( k \geq k_0 \).

  Given any index \( k_1 \), we choose \( k_2 \) such that \( k_2 \geq k_0 \) and \( k_2 \geq k_1 \) (this is possible by the definition of a directed set). Then \( x_{k_2} \in A \) and \( k_2 \) satisfies the existence quantifier in \fullref{def:topological_net/frequently_in}.

  \SubProofOf{thm:def:topological_net/net_eventually_in_iff_not_frequently_in_complement} Suppose that \( \{ x_k \}_{k \in \mscrK} \) is both eventually in \( A \) and frequently in \( S \setminus A \).

  Since the net is eventually in \( A \), we can fix an index \( k_0 \) such that \( x_k \in A \) whenever \( k \geq k_0 \).

  Since the net is frequently in \( A \), we can fix an index \( k_1 \geq k_0 \) such that \( k_1 \in S \setminus A \), which is a contradiction.

  This proves that the two conditions are incompatible.
\end{proof}

\begin{proposition}\label{thm:limit_point_iff_in_closure}\mcite[prop. 1.6.3]{Engelking1989}
  Fix a set \( A \subseteq X \). A point \( x_0 \in X \) belongs to \( \cl{A} \) if and only if there exists a net \( \{ x_k \}_{k \in \mscrK} \subseteq A \) for which \( x_0 \) is a limit point.

  By \fullref{thm:def:net_convergence/cluster_point_iff_subnet_limit_point}, we can consider cluster points of nets rather than limit points.
\end{proposition}
\begin{proof}
  The complement of the empty set is the empty set, hence the statement of the proposition holds vacuously. Assume that \( A \) is nonempty.

  \SufficiencySubProof Suppose that \( x_0 \in \cl{A} \). If \( x_0 \in A \), then the one-element net \( (x_0) \) converges to \( x_0 \).

  If \( x_0 \in \fr{A} \), by \fullref{def:topological_boundary/neighborhoods}, every neighborhood of \( x_0 \) contains points from \( A \). Therefore, we can build reverse inclusion net in the style of \fullref{ex:reverse_inclusion_net} that converges to \( x_0 \).

  \NecessitySubProof Let \( x_0 \) be a limit point of \( \{ x_k \}_{k \in \mscrK} \subseteq A \). We will show that \( x_0 \) belongs every closed set that contains \( A \).

  Let \( F \supseteq A \) be a closed set. Denote \( U \coloneqq X \setminus F \). Suppose that \( x_0 \in U \). Then \( U \) is a neighborhood \( x_0 \) and, by \fullref{def:net_convergence/cluster}, the net \( \{ x_k \}_{k \in \mscrK} \subseteq A \) is eventually in \( U \). But \( U \) does not contains \( A \).

  The obtained contradiction shows that \( x_0 \) belongs to every closed set containing \( A \) and hence to their intersection, the closure \( \cl A \).
\end{proof}

\begin{proposition}\label{thm:cluster_point_of_set_iff_limit_point_of_net}
  The point \( x_0 \in X \) is a cluster \hyperref[def:topological_derived_set/cluster_point]{point} of the set \( A \) if and only if it is a limit \hyperref[def:net_convergence/cluster]{point} of some net in \( A \setminus \{ x_0 \} \) (or, equivalently, a cluster point of some net in \( A \setminus \{ x_0 \} \)).
\end{proposition}
\begin{proof}
  \SufficiencySubProof Let \( x_0 \in \derived(A) \). By \fullref{thm:def:derived_set/cluster_via_neighborhoods}, every neighborhood \( U \) of \( x_0 \) intersects \( A \setminus \{ x_0 \} \). Choose \( x_U \in U \cap (A \setminus \{ x_0 \}) \) for every neighborhood \( U \) of \( x_0 \) and form the reverse inclusion \hyperref[ex:reverse_inclusion_net]{net} \( \{ x_U \}_{U \in T(x)} \). Then \( x_0 \) is a limit point of this net. Furthermore, the net is contained in \( A \setminus \{ x_0 \} \).

  \NecessitySubProof Conversely, if \( \{ x_k \}_{k \in \mscrK} \subseteq A \setminus \{ x_0 \} \) is a net and if \( x_0 \) is a limit point of this net, then for every neighborhood \( U \) of \( x_0 \) there exists an index \( k_U \) such that for \( k \geq k_U \) we have \(  x_k \in U \). In particular, \( U \cap A \) contains elements other than \( x_0 \). Since this is true for any neighborhood \( U \) of \( x_0 \), by \fullref{thm:def:derived_set/cluster_via_neighborhoods} we conclude that \( x_0 \) is a cluster point of the set\( A \).
\end{proof}

\begin{corollary}\label{thm:closed_iff_contains_all_net_cluster_points}
  A set is closed if and only if it contains the limit points of all of its nets (or, equivalently, the cluster points of all of its nets).
\end{corollary}
\begin{proof}
  By \fullref{thm:def:derived_set/closed_iff_contains_all_cluster_points}, the set \( A \) is closed if and only if it contains all of its cluster points. By \fullref{thm:cluster_point_of_set_iff_limit_point_of_net}, this is equivalent to \( A \) containing all limit points of its nets.
\end{proof}

\begin{proposition}\label{thm:net_convergence_via_subbases}
  Fix a topological space \( X \), a point \( x_0 \) and a local \hyperref[def:topological_local_subbase]{subbase} \( P(x_0) \). The point \( x_0 \) is a limit of the net \( \{ x_k \}_{k \in \mscrK} \subseteq X \) if and only if it is eventually in every element \( U_P \) of the local subbase \( P(x_0) \).
\end{proposition}
\begin{proof}
  \SufficiencySubProof Obvious consequence of the definition of local subbase.
  \NecessitySubProof Fix a neighborhood \( U \) of \( x_0 \). By \fullref{def:topological_local_subbase}, there exists a finite family \( \{ U_k \}_{k=1}^n \subseteq P(x_0) \) such that \( \bigcap_{k=1}^n U_k \subseteq U \). Since the net \( \{ x_k \}_{k \in \mscrK} \subseteq X \) is eventually in each of \( U_k, k = 1, \ldots, n \), from transitivity of inclusion it follows that the net is eventually in \( U \).
\end{proof}

\begin{definition}\label{def:sequential_topological_closure_operator}
  In analogy to \fullref{def:topological_closure_operator}, we define the \term{sequential closure operator}
  \begin{balign*}
     & \cl^S: \pow(X) \to \pow(X)                                                                                \\
     & \cl^S(A) \coloneqq \left\{ x \in X \colon x \text{ is a limit point of some sequence } \{ x_k \}_{k=1}^\infty \subseteq A \right\}.
  \end{balign*}

  If \( \cl^S(A) = A \), we say that \( A \) is \term{sequentially closed}.
\end{definition}

\begin{definition}\label{def:sequential_space}
  A topological space is called \term{sequential} if every sequentially \hyperref[def:sequential_topological_closure_operator]{closed} set is closed.
\end{definition}

\begin{remark}\label{rem:sequential_spaces}
  By \fullref{thm:limit_point_iff_in_closure}, in a \hyperref[def:sequential_space]{sequential space}, a set is closed if and only if it is sequentially closed.

  By \fullref{thm:closed_iff_contains_all_net_cluster_points}, a set is closed if and only if it contains the limit points of all of its nets.

  Therefore, a set in a sequential space is closed if and only if it contains the limit points of all of its sequences.

  Since we are able to define a topology in terms of closed sets, this means that the topology in a sequential space is completely determined by convergent sequences rather than convergent nets as in general topological spaces.

  This allows us to restrict ourselves only to sequences rather than arbitrary nets in certain spaces like \hyperref[def:metric_space]{metric spaces}.
\end{remark}

\begin{lemma}\label{thm:sequential_space_convergence}
  Let \( X \) be a sequential space and \( x_0 \) limit point of the net \( \{ x_k \}_{k \in \mscrK} \), then we can define a sequence
  \begin{equation*}
    \{ x_k \}_{k=1}^\infty \subseteq \{ x_k \colon k \in \mscrK \},
  \end{equation*}
  consisting of members of the net, for which \( x_0 \) is a limit point.
\end{lemma}
\begin{proof}
  Let \( X \) be a first-countable space and let \( x_0 \) be a limit point of the net \( \{ x_k \}_{k \in \mscrK} \).

  Since \( X \) is a first countable space, we can fix a countable local \hyperref[def:topological_local_base]{base} \( \{ U_k \}_{k=1}^\infty \) at \( x_0 \). For each \( k = 1, 2, \ldots \), define the neighborhood \( V_k \coloneqq \bigcap_{m=1}^k U_m \), so that \( V_k \subseteq V_m \) whenever \( k \geq m \).

  For each neighborhood \( V_k \), since \( \{ x_k \}_{k \in \mscrK} \) is eventually in \( V_k \), there exists an index \( k_k \) such that \( x_{k_k} \in V_k \).

  Thus, we obtain a sequence \( \{ x_{k_k} \}_{k=1}^\infty \) that is eventually in every neighborhood of the local base \( \{ V_k \}_{k=1}^\infty \) of \( x_0 \), which by \fullref{thm:net_convergence_via_subbases} is sufficient for \( x_0 \) to be a limit point of the sequence.
\end{proof}

\begin{proposition}\label{thm:first_countable_spaces_are_sequential}
  Every first-countable space is sequential.
\end{proposition}
\begin{proof}
  Let \( X \) be a first-countable space and let \( A \subseteq X \) be a sequentially \hyperref[def:sequential_topological_closure_operator]{closed} set. We must show that it is closed.

  Fix a point \( x_0 \in \cl(A) \). We will show that \( x_0 \in A \). By \fullref{thm:limit_point_iff_in_closure}, there is a net \( \{ x_k \}_{k \in \mscrK} \subseteq A \) for which \( x_0 \) is a limit point.

  By \fullref{thm:sequential_space_convergence}, we can choose a sequence \( \{ x_k \}_{k=1}^\infty \) that converges to \( x_0 \) out of elements of the net. But since \( X \) is a sequential space, the limit points of any sequence are contained in the sequentially closed set \( A \).

  We showed that \( A = \cl(A) \). Since \( A \) was an arbitrary sequentially closed set, we conclude that the space \( X \) is sequential.
\end{proof}


Total Variation\subsection{Example: Thermal Conductivity on a 1D Heat Rod}\label{ex:heat-set-sample-accuracy}

Consider the one-dimensional heat equation with homogeneous Neumann boundary conditions on the unit interval presented in \ref{ex:heat-set-sample}.

The quantities of interest we study are four point-evaluations of the state variable, at spatial location 0.25, 0.51, 0.67, and 0.98 along the rod.
Choosing any pair of them for the inversion yields six possible quantities of interest maps.
As before, we demonstrate that some choices appear to have advantages over others.

From the prior examples, we would suspect that choosing the QoI map with lower skewness results in lower Total Variations.
However in the earlier experiments we utilized maps that inverted into sets of identical size, which is not the case in this nonlinear example; each QoI map scales sets differently depending on the location in the parameter space.
To isolate this scaling effect, we attempt to compare QoIs that invert into sets of similar size \emph{on average} but have differing average skewness.

This is what motivated our specific choice of spatial locations at which to measure the state variable $T$.
Our first QoI $\qoiA$ uses measurements at 0.25 and 0.51, and has average skewness of 1.08, and our second $\qoiB$ uses measurements at 0.67 and 0.98, with average skewness 1.56.
While we would have liked to use a map with average skewness of 2 for a more similar comparison to the prior examples, this was the best range we could find where the maps inverted into sets of comparable size on average\footnote{average local scaling is $1.99$ for $\qoiA$ and $2.19$ for $\qoiB$.}.

Owing to the nonlinearity of the problem, the Total Variations between reference and estimated probability measures now have an inherent dependence on the location of the point $\param$ in the parameter space.
We ran the simulations for a regular $3\times3$ grid exploring the interior of the parameter space and present two of the nine reference points that illustrate the differences in the nonlinear case from the linear examples.
Most notably, the location of truth will impact our ability to approximate the solution to the SIP.

In the two-dimensional data spaces $\dspaceA$ and $\dspaceB$, our uncertainty is a uniform box centered at $\qoiA(\paramref)$ with side-lengths of 0.1.
When $\paramref$ is the bottom-left corner of our $3\times3$ grid, the two maps produce very different results, with $\qoiA$ outperforming $\qoiB$ in a similar manner as we saw in the linear examples (see Fig.~\ref{fig:NLbotleft}).
When $\param_{\text{ref}}$ is in the upper-center of the grid, the inverse images are similar, as shown in Fig.~\ref{fig:NLtopmid}, and so which map to use forinversion into this part of the parameter spaces is not a clear choice. We might even be tempted to use the more-skewed (on average) map since it inverts into a set with smaller support.

\begin{figure}[h]
  \includegraphics[width=\linewidth]{./images/pt0Plot-reg_BigN_40000_reg_M_1_rand_I_100000}
  \caption{Convergence in TV metric for the bottom left reference value in a 3x3 grid in $\pspace$. There is a notable difference in the accuracy of the measure recovered depending on which QoI map is used.}
  \label{fig:NLbotleft}
\end{figure}

\begin{figure}[h]
  \includegraphics[width=\linewidth]{./images/pt5Plot-reg_BigN_40000_reg_M_1_rand_I_100000}
  \caption{Convergence in TV metric for the top-middle reference value in a 3x3 grid in $\pspace$. For this value of truth, there is no distinguishable difference between the solutions that come from using either QoI map. The location in parameter space of truth will impact how sensitive experimental designs are to approximation errors in limited exploration of $\pspace$.}
  \label{fig:NLtopmid}
\end{figure}

Of the nine reference $\param$'s we studied, $\qoiA$ yielded no considerable advantage in terms of the number of samples required to approximate the inverse images in three cases (the plots were similar to that in the right of Fig.~\ref{fig:NLHD}).
In three cases, $\qoiA$ performed better than $\qoiB$, (somewhere between the two figures in Fig.~\ref{fig:NLHD}).
In two cases, $\qoiA$ performed better than  $\qoiB$, as in the left of Fig.~\ref{fig:NLHD}.
In one case (with $\param$ in the bottom right corner), the difference was even more dramatic ($\qoiA$ yielded similar Total Variations with less than a fourth the samples).

\begin{figure}
\includegraphics[width=.45\linewidth]{examples/fig_heatrod_q1/HeatrodModel--set_N50_em.png}
\includegraphics[width=.45\linewidth]{examples/fig_heatrod_q1/HeatrodModel--sample_N50_mc.png}

\includegraphics[width=.45\linewidth]{examples/fig_heatrod_q1/HeatrodModel--set_N500_em.png}
\includegraphics[width=.45\linewidth]{examples/fig_heatrod_q1/HeatrodModel--sample_N500_mc.png}

\caption{The inverse image of the reference measure for $\qoiA$ for $\nsamps = 50$ (top) and $\nsamps = 500$ (bottom). }
\label{fig:heatrod-convergence-a}
\end{figure}

\begin{figure}
\includegraphics[width=.45\linewidth]{examples/fig_heatrod_q2/HeatrodModel--set_N50_em.png}
\includegraphics[width=.45\linewidth]{examples/fig_heatrod_q2/HeatrodModel--sample_N50_mc.png}

\includegraphics[width=.45\linewidth]{examples/fig_heatrod_q2/HeatrodModel--set_N500_em.png}
\includegraphics[width=.45\linewidth]{examples/fig_heatrod_q2/HeatrodModel--sample_N500_mc.png}

\caption{The inverse image of the reference measure for $\qoiB$ for $\nsamps = 50$ (top) and $\nsamps = 500$ (bottom). TK - need to remark about how this map may be more precise but it makes it harder to identify the set that contains truth when few model evaluations are available to us (low $\nsamps$). }
\label{fig:heatrod-convergence-b}
\end{figure}

These results motivate further study into utilizing different QoI maps (perhaps some of those other four combinations available to us in this example) depending on where the samples came from in the parameter space.
In general, we saw in this example that given that two maps invert into sets of similar size on average, using the one with lower skewness results in less samples required to accurately approximate the inverse image.
The maps we used had average skewnesses that differed by 0.5 (instead of by 1), and the trend from the linear examples still held in significant portions of the parameter space.


%&LaTeX

\section{Feed It Forward}

This lab covers the basic concepts of filtering and feedforward filters.
You may have also heard of feedforward filters referred to as
finite impulse response (FIR) filters. In this lab, we will cover the basic idea
of a filter, its mathematical representation (such as the defining equation,
frequency response, and transfer function), the relationship among
filter coefficients, zero placement, and filter type (low pass, high
pass, band reject), and some basic properties of filters.

\subsection{Overview of Filtering and Matlab}

A \emph{digital filter} is a signal processing operation that can be
  described equivalently by its \emph{defining
  equation}, \emph{transfer function}, or \emph{frequency response}.
  Each representation completely defines the filter. It is advantageous
  to use each of the different representations depending on whether you are
  \emph{implementing}, \emph{analyzing}, or \emph{designing} an FIR filter:
\begin{eqnarray*}
  y[n] &=& \underbrace{\sum_{k=0}^M b_k x[n-k]}_{\text{defining equation}} \\
  \hline \\
  Y &=& H(z) X\\
  H(z) &=& \underbrace{\sum_{k=0}^M b_k z^{-k}}_{ \text{transfer function} } \\
  \hline \\
  Y &=&  \mathcal{H}({\hat{\omega}}) X \\
  H(e^{j\hat{\omega}})  = \mathcal{H}({\hat{\omega}})
  &=& \underbrace{\sum_{k=0}^M b_k e^{-j \hat{\omega}k}}_{\text{frequency response}}
\end{eqnarray*}

In these equations, $x[n]$ and $y[n]$ are the $n^\mathrm{th}$ samples
from the input and output, respectively, while $X$ and $Y$ represent
the entire input and output signal (all of the samples in the
signal). A $k$-sample time delay of a signal is produced by
multiplication by the delay operator, $z^{-1} = e^{-j
  \hat{\omega}k}$. In all three cases (but most simply for the
transfer function), we can obtain insight into the filter's operation
from the \emph{coefficients}, $b_k$. We can do this by factoring the
transfer function polynomial: its roots are the \emph{zeros} of the
filter and they can be real or complex.  The placement of the zeros in
the complex plane (most usefully expressed in polar coordinates) will
tell us which frequencies are suppressed and to what extent those
frequencies are suppressed (we can calculate each using the angle and
magnitude of the zero, respectively).

Matlab has a modest set of functions related to filtering (a much more
substantial set of tools comes along with the Matlab Signal Processing
Toolbox, but we will confine ourselves here to using core Matlab). The
\verb|filter| function applies a general digital filter to a
signal. For this lab, we will stick using this filter as follows:
\begin{lstlisting}[style=Matlab-editor,basicstyle=\mlttfamily\small]
a = [1];              % This will be relevant later for feedback filters
b = [b0 b1 b2];       % Coefficients (remember, Matlab indices start at 1)
y = filter(b, a, x);  % x is input signal; y is output
\end{lstlisting}
This allows us to define the $b_k$ coefficients for a filter and provide
them to the filter function as a vector so that it can filter the
input signal.

We'd also like to specify a feedforward filter by indicating its zero
locations, which we can do by using the \verb|poly| function to
compute the coefficients from a set of roots. So, for example, if we
want a feedforward filter with zeros at $0.9 + 0j$ and $0.75e^{\pm j
\pi/4}$, we can compute the $b_k$ values as:
\begin{lstlisting}[style=Matlab-editor,basicstyle=\mlttfamily\small]
r = [ (0.9 + 0.0*j) (0.75*exp(j*pi/4)) (0.75*exp(-j*pi/4))];
b = poly(r);
a = [1];
y = filter(b, a, x);
\end{lstlisting}
(Where the definition of \verb|r| is written a bit more verbosely than
it has to be.) Note that, from the documentation for \verb|poly|, the
vector of coefficients it produces are ordered from highest to lowest
powers; this corresponds to the same order as the coefficients in the
\verb|b| vector, after dividing by $z^{-M}$, the highest delay
term.

You can visualize the zero locations with the following code:
\begin{lstlisting}[style=Matlab-editor,basicstyle=\mlttfamily\small]
plot(complex(r), 'o')
rectangle('Position', [-1 -1 2 2], 'Curvature', [1 1])
line([-1 1], [0 0], 'Color', [0 0 0])
line([0 0], [-1 1], 'Color', [0 0 0])
axis equal
\end{lstlisting}
Here, we use the unfortunately named \verb|rectangle| function to draw
the unit circle and the \verb|line| function to draw the real and
imaginary axes. Note also that we have to make sure that the value of
$r$ that we pass to the \verb|plot()| function is complex (since we
want to plot it on the complex plane) using the \verb|complex()|
function, because the roots of a polynomial can be real.

Finally, you can compute and plot the magnitude of the filter's
frequency response pretty directly in Matlab:
\begin{lstlisting}[style=Matlab-editor,basicstyle=\mlttfamily\small]
omegahat = [0: 0.01: pi];   % define the frequency axis
z = exp(j*omegahat);        % define the complex frequency axis
H = polyval(b, z);          % evaluate the transfer function polynomial
plot(omegahat, 20*log10(abs(H)/max(abs(H))));
xlabel('$\hat{\omega}$, radians','Interpreter', 'latex');
ylabel('$|\mathcal{H}(\hat{\omega})|$, dB','Interpreter', 'latex')
\end{lstlisting}
You'll note that the code above plots the ratio of the magnitude of
the frequency response to the maximum value of that magnitude. This is
done because it is convention to ignore whether a filter amplifies a
signal overall; what we are concerned with are the relative amounts
that different frequencies are passed or blocked.

Remember, we can define a specific filter using either of the methods
above. Sometimes it is easier to understand the filter using zeros and
sometimes it is easier to use the coefficients directly.  Either
method can be used to represent the same filter, and we can go back
and forth with the \verb|poly| and \verb|roots| functions (and back
and forth between polar and rectangular representations of complex
numbers with the \verb|abs|, \verb|angle|, and \verb|exp| functions).

\subsubsection{From Filter Coefficients to Transfer Function and Frequency Response}

Given the coefficients of an FIR filter we can solve for the zero
locations and the frequency response.  For example the two-point
averaging system is given by:
\begin{equation}
y[n] = \frac{1}{2}x[n] + \frac{1}{2}x[n-1]
\label{eq:two-point-filter}
\end{equation}
we can find the transfer function by rewriting the filter using the
delay operator, $z$:
\begin{eqnarray}
  Y    & = & \frac{1}{2} X + \frac{1}{2} z^{-1} X \\
  H(z) & = & \frac{Y}{X} = \frac{1}{2} (1 +  z^{-1})
\end{eqnarray}
If we're interested in the \emph{zero location} we can then multiply
$H(z)$ by $z/z$ to obtain:
\begin{equation}
  H(z) = \frac{\frac{1}{2} (z + 1)}{z}
\end{equation}
The root of the numerator, $z=-1$ is the location of the only zero
(the root(s) of the denominator for an FIR filter are always at $z=0$,
and do not affect the frequency response). We can also derive the
frequency response from this by remembering that $H(e^{j\hat{\omega}})
= \mathcal{H}({\hat{\omega}})$ or that $z=e^{j\hat{\omega}}$. From the
zero location, $z=-1$, we can immediately tell that the frequency
response is zero at $e^{j\hat{\omega}}=-1$ or $\hat{\omega}=\pi$. With
a zero at an angle of $\hat{\omega}=\pi$, this is a low-pass
filter. As a warm-up, use Matlab and the coefficients of
equation~\ref{eq:two-point-filter} to verify the expected zero
placement and frequency response.

\subsubsection{From Zero Placement to Filter Coefficients}

When we are given the zero placement, we can very easily determine the
filter coefficients because those zeros are the roots of a factored
polynomial. For example, given two complex conjugate zeros, $z_1$ and
$z_2$ (i.e., the real parts are equal, $\Real[z_{1}] = \Real[z_{2}] =
\Real[z_{1,2}] $, and the imaginary parts are negatives of one another
$ \Imag[z_{1}] = -\Imag[z_{2}] $ or, equivalently in polar
coordinates, $z_{1} = r e^{j\hat{\omega_0}}$ and $z_{2} = r
e^{-j\hat{\omega_0}}$), the transfer function is:
\begin{eqnarray}
  H(z) & = & (z - z_1)(z - z_2)/z^2 \\
  & = & (z^2 - (z_1 + z_2) z + z_1 z_2)/z^2 \\
  & = & 1 - 2 \Real[{z_{1,2}}] z^{-1} + r^2 z^{-2} \\
  & = & 1 - 2 \Real[r(\cos(\omega_0) \pm j\sin(\omega_0))] z^{-1} + r^2 z^{-2} \\
  & = & \underbrace{1}_{b_0} -\underbrace{2 r\cos(\omega_0)}_{b_1} z^{-1} + \underbrace{r^2}_{b_2} z^{-2}
\end{eqnarray}
At this point, we can rewrite the transfer function as the filter's
generating equation, using the delay operator $z^{-k}$, $y[n] = x[n] -
2 r\cos(\omega_0)x[n-1] + r^2 x[n-2]$. This allows us to read off the
filter coefficients: $b_0 = 1$, $b_1 = -2 r\cos(\omega_0)$, and $b_2 =
r^2$.

\subsection{Frequency Response and Pole-Zero Plots}

\paragraph{Step 1.1} Consider a filter that computes a running average
of three points of our input signal (a \emph{three-point averager}):
\begin{equation}
y[n] = \frac{1}{3} \sum_{k=0}^2 x[n-k]
     = \frac{1}{3}x[n] + \frac{1}{3}x[n-1] + \frac{1}{3}x[n-2]
\end{equation}

\begin{enumerate}\renewcommand{\theenumi}{\alph{enumi}}
\item Draw a block diagram for this filter.

\item How many zeros will this filter have?

\item Find and sketch the zero locations using pencil and paper, then
  use Matlab to verify this.

\item From the plot of zero locations, sketch the magnitude of the
  frequency response as a function of $\hat{\omega}$ by hand and
  verify this using Matlab. How does the minimum of the magnitude of
  the frequency response relate to the polar representation of the
  zero locations?  What kind of filter would you say this is?

\end{enumerate}

\paragraph{Step 1.2} A \emph{first-difference} filter is an
approximation to a discrete derivative operation. Its defining
equation is:
\begin{equation}
  y[n] = x[n] - x[n-1]
\end{equation}

\begin{enumerate}\renewcommand{\theenumi}{\alph{enumi}}

\item Draw a block diagram for this filter.

\item Derive the transfer function, $H(z)$, for this filter. From
	  this, determine the expression for the frequency response,
	  $\mathcal{H}(\hat{\omega})=H(e^{j\hat{\omega}})$.

\item From the transfer function, determine the filter's zero
	locations and sketch them. Check your results with Matlab.

\item From the zero plot, sketch the magnitude of the filter's
	  frequency response as a function of $\hat{\omega}$. Use Matlab to
	  check your results. What kind of filter would you say this is?

\item Use Matlab to compute this filter's response to the following
	  input. Generate an analog signal that is a sinusoid with
          amplitude of 1, frequency of 2, and duration of 1. Sample
          it at 32 samples/second and quantize it using 16
          bits. What is the digital frequency, $\hat{\omega}$, of this
          $f=2$Hz sinusoid?

\item Produce a figure with two plots: the top should be the
          original digital signal, $X$, and the bottom should be the
          filtered signal, $Y$.

\item Examine the plots of $X$ and $Y$. Note that $Y$ appears
	  to be a scaled and shifted sinusoid of the same frequency as
	  $X$. The exception is the first point, $y[0]$. Explain why $y[0]$ is
	  different (if you are unsure, consider the defining equation
          and the input values to it for $n=0$).

\item Estimate the frequency, amplitude, and phase of $Y$ directly
	  from its plot (ignoring $y[0]$).

\item To compare these measurements to theory, use your
          expression for the filter's frequency response to calculate
          the amplitude and phase at the digital frequency
          $\hat{\omega}$ you determined above. How do these compare to
          what you determined from the Matlab plots?

\end{enumerate}

\paragraph{Step 1.3} Just as we can compute a discrete first
derivative with a first-difference filter, we can compute a discrete
second derivative with a \emph{second difference filter}.

\begin{enumerate}\renewcommand{\theenumi}{\alph{enumi}}
\item Use your expression for the transfer function of the first
	  difference filter and your knowledge that the combined transfer
	  function of two filters cascaded, or connected in series, is the
	  product of their individual transfer functions to determine the
	  transfer function for a second-difference filter.

\item Draw a block diagram for this filter.

\item Determine the filter's zero locations and sketch them. Check
	  your results using Matlab.

\item From the zero plot, sketch the magnitude of the filter's
          frequency response as a function of $\hat{\omega}$. Use
          Matlab to check your results. What kind of filter would you
          say this is?

\end{enumerate}

\paragraph{Step 1.4} Consider a feedforward filter with complex
conjugate zeros at $z_{1,2} = -0.5 \pm j 0.5$.

\begin{enumerate}\renewcommand{\theenumi}{\alph{enumi}}
\item Determine the filter coefficients.

\item Use Matlab to plot the frequency response of the filter.

\item What are the effects of the zeros on the frequency response?
	  What kind of filter would you call this?

\end{enumerate}

\subsection{Linearity and Cascading Filters}

\paragraph{Step 2.1} A system is called \emph{linear} if a sum of
different inputs produces an output that is the sum of the outputs for
the inputs taken individually.  Perform a simple test of the linearity
of the filter from step 1.2 by doubling the input amplitude in Matlab
($X' = 2X = X + X$). How does the new output amplitude compare to the
old one?

\paragraph{Step 2.2} In one of the self-test exercises in the
textbook, two filters with transfer functions $H_1(z) = b_0 +
b_1z^{-1}$ and $H_2(z) = b'_0 + b'_1z^{-1}$ were connected in series,
and it was shown that they could be connected in either order to
produce the same composite effect (the same overall transfer
function). Redo this exercise using the \emph{defining equations} for
the two filters, i.e., $y_1[n] = F_1(x[n])$ for the filter with
transfer function $H_1(z)$ and $y_2[n] = F_2(x[n])$ for the filter
with transfer function $H_2(z)$. In other words, show that
$F_2(F_1(x[n])) = F_1(F_2(x[n]))$.

\paragraph{Step 2.3} Use Matlab to implement a 50\% duty cycle square
wave with amplitude 1, frequency 2Hz, and duration 1s. Sample and
quantize it appropriately (to make your figures look nicer, feel free
to chose a sampling rate much higher than the minimum). Send the
resultant digital signal through the previously-defined three-point
averager filter, and then the output of that filter through the first
difference filter. Plot the input and output. What does the output of
this combined filter look like?

\paragraph{Step 2.4} Now, switch the order you apply the filters so
that the first difference filter is first and the three-point averager
is second. Plot the input and output. How does the output of this
configuration compare to that of the preceding step? Does this match
what you expected? Why or why not?

% LocalWords:  WebQ MATLAB


% Ref fra reliability prob
\chapter{Nonhomogenous Poisson process}
\section{Introduction}
In this chapter we introduce the nonhomogenous Poisson process(NHPP) and its sufficient statistics.
The case to be studied is a nonhomogenous Poisson process, NHPP. This is when the rate function for a poisson process is dependent on time. A NHPP is first of all a counting process. The following definitions are from \cite{rausand2004system}. The definition of a counting process is as follows
\begin{defn}
A stochastic process $\{N(t), t \geq 0 \}$ is said to be a counting process $N(t)$ satisfies:
\begin{enumerate}
\item $N(t)\geq 0$.
\item $N(t)$ is integer valued.
\item If $s<t$, then $N(s) \leq N(t)$.
\item For $s<t$, $[N(t) - N(s)]$ represents the number of failures that have occured in the interval $(s,t]$.
\end{enumerate}
\end{defn}
Then the definition of a NHPP is as given below
\begin{defn} % S 277
A coutning process $\{ N(t), t \geq 0 \}$ is a nonhomogeneous (or nonstationary) Poisson process with rate function $\lambda (t)$ for $t \geq 0 $, if
\begin{enumerate}
\item $N(0) = 0$.
\item $\{N(t), t \geq 0\}$ has independent increments.
\item $Pr(N(t + \Delta t) - N(t) \geq 2) = o(\Delta t)$, which meansthat the system will not experience more than one failure at the same time.
\item $Pr(N(t + \Delta t) - N(t) = 1) = \lambda(t) \Delta t + o(\Delta t)$
\end{enumerate}
\end{defn}
For this NHPP we are going to use a rate function which is a combination of power-law and log-linear. The rate function is as follows,
\begin{equation}
\lambda (t) = abt^{b-1}e^{ct},
\label{eq:rate}
\end{equation}
where $a$, $b$ and $c$ are parameters of the model. The parameter for the NHPP can be denoted
\begin{equation}
\Lambda(t) = \int_{0}^{t} \lambda(u) du.
\label{eq:largelambda}
\end{equation}
The NHPP model is given by,
\begin{equation}
P(N(t) = n) = \frac{\Lambda(t)^n}{n!}e^{-\Lambda(t)} \quad n=0,1,... \quad 0\leq t \leq \tau.
\end{equation}
To generate data it is recommended to have around 30 data points or above. This means that the parameters of the NHPP must be chosen to fullfill this. From a NHPP we have that the expected number of events within a time $t$ is $\Lambda(t)$. Since we have assumed that all values are between 0 and 1, the expected number of events is
\begin{equation}
E[events] = \Lambda(1).
\end{equation}

\section{Parameters for rate function}
Since the rate function is a combination of log-linear and power-law, as seen in equation \ref{eq:rate}, the shape of the function can vary a lot. The parameters $b$ and $c$ are the one to take notice of. The parameter $a$ is just for scaling number of events. By testing for different parameters we have chosen six shapes of the rate function to be used. These shapes are denoted as model 1 through 6. The different models can be viewed in figures \ref{fig:SmallLambdaA10B04C2}, \ref{fig:SmallLambdaA160B2CM3}, \ref{fig:SmallLambdaA20B2C1}, \ref{fig:SmallLambdaA30B07C0} \ref{fig:SmallLambdaA50B2CM1} and \ref{fig:SmallLambdaA6B3C2}. From these figues we see that model 2 and 4 are close to gamma distributions \cite{stacy1962generalization}.
\includefigure[width=0.9\textwidth]{fig/SmallLambdaA10B04C2.png}{fig:SmallLambdaA10B04C2}{Plot of rate function for model 1 given $a = 10$, $b = 0.4$ and $c = 2$.}
\includefigure[width=0.9\textwidth]{fig/SmallLambdaA160B2CM3.png}{fig:SmallLambdaA160B2CM3}{Plot of rate function for model 2 given $a = 160$, $b = 2$ and $c = -3$.}
\includefigure[width=0.9\textwidth]{fig/SmallLambdaA20B2C1.png}{fig:SmallLambdaA20B2C1}{Plot of rate function for model 3 given $a = 20$, $b = 2$ and $c = 1$.}
\includefigure[width=0.9\textwidth]{fig/SmallLambdaA30B07C0.png}{fig:SmallLambdaA30B07C0}{Plot of rate function for model 4 given $a = 30$, $b = 0.7$ and $c = 0$.}
\includefigure[width=0.9\textwidth]{fig/SmallLambdaA50B2CM1.png}{fig:SmallLambdaA50B2CM1}{Plot of rate function for model 5 given $a = 50$, $b = 2$ and $c = -1$.}
\includefigure[width=0.9\textwidth]{fig/SmallLambdaA6B3C2.png}{fig:SmallLambdaA6B3C2}{Plot of rate function for model 6 given $a = 6$, $b = 3$ and $c = 2$.}

%


\subsection{Projection algorithm}
\paragraph{}
In the proposed method, the mesh is generated by method introduced in \cite{Liu2017} where intersections are calculated between the edge of the element and the triangular surface.
These triangular surfaces extracted from the STL files are an approximation of the exact geometry.
In order to retain the exact geometry, point projection algorithm is required to find the nearest point in parameter $(u, v)$ on the NURBS surface of the intersection point.
Some $O(logN)$ algorithms were developed \citep{Edelsbrunner:1985:CED:4007.4011, Chin1983OptimalAF} while presumably large number of tests on polygons is imposed.
Furthermore, the accuracy is out of satisfactory for computer graphics and CAD communities.
As a consequence, a projection algorithm \citep{MA200379} using Newton-Raphson method is introduced to tackle this problem.

\paragraph{}
For a given point $P=(x,y,z)$, its projection on the surface $S(u, v)$ so that the distance $|P-S(u,v)|$ is minimum is targeted.
However, in the proposed method, the existence of numerous possible surfaces increases the computational cost significantly.
The projection point of the test point $P$ for every existing surface need to be determined and the one with the smallest minimum distance will be selected.
One possible improvement could be limit the candidate surfaces to only a few by utilizing its strong convex hull property and the fact that the NURBS surfaces have been divided into multiple sub-surfaces without interior knot in Sec.~\ref{oct_sc:surface_division}.
Another property that can be taken into account is that most of the tests point are expected to be extremely close to their projections on the surfaces.

\paragraph{}
The building of the convex hull is explained in detail in Sec.~\ref{oct_sec:convex_hull}.
The signed distance of the test point to all surfaces' convex hull is calculated and only the surfaces with negative signed distance which indicates that the point is contained in the convex hull will be selected as candidate.
If no negative distance is detected, a few number (taken as $3$ in the proposed method) of surfaces with minimum signed distance will be selected.

\paragraph{}
In order to find the projection of the test point $P$ on the surface $S$, the vector $r$ is defined as
\begin{equation}
    \mathbf{r} (u, v) =
    \mathbf{S} (u, v) -
    \mathbf{P}
\end{equation}
%
and two scalars $f$ and $g$ are defined as
\begin{equation}
    \left\{
        \begin{array}{rl}
            f (u, v) =
            \mathbf{r}(u, v) \mathbf{\cdot} \mathbf{S}_u (u, v)
            = 0 & \\
            g (u, v) =
            \mathbf{r}(u, v) \mathbf{\cdot} \mathbf{S}_v (u, v)
            = 0 &
        \end{array}
    \right.
\label{oct_eq:projection_function}
\end{equation}
%
In order to solve Eq.~\ref{oct_eq:projection_function}, several notations are introduced
\begin{align*}
    \delta_i &=
        \begin{bmatrix}
            \Delta u \\
            \Delta v
        \end{bmatrix} =
        \begin{bmatrix}
            u_{i+1} - u_i \\
            v_{i+1} - v_i
        \end{bmatrix} \\
    J_i &=
        \begin{bmatrix}
            f_u & f_v \\
            g_u & g_v
        \end{bmatrix} =
        \begin{bmatrix}
            \boldmath
            |S_u|^2 + r \cdot S_{uu}        &       S_u \cdot S_v + r \cdot S_{uv} \\
            S_u \cdot S_v + r \cdot S_{uv}  &       |S_v|^2 + r \cdot S_{vv}
        \end{bmatrix} \\
    \kappa_i & = -
        \begin{bmatrix}
            f(u_i, v_i) \\
            g(u_i, v_i)
        \end{bmatrix}
\end{align*}
%
Where all values in matrix $j_i$ can be evaluated at $(u_i, v_i)$.
$2$ by $2$ matrix $\delta_i$ can be determined at step $i$ as
\begin{equation}
    J_i \delta_i = \kappa_i
\end{equation}
%
It can be derived by utilizing $\delta_i$ so that
\begin{subequations}
\begin{align}
    u_{i+1} & = u_i + \Delta u \\
    v_{i+1} & = v_i + \Delta v
\end{align}
\label{oct_eq:projection_iteration}
\end{subequations}
%
The iteration can be concluded as
\paragraph{1}
Is the point coincide with $S(u_i, v_i)$ ?
\begin{equation*}
    |\mathbf{S} (u_i, v_i) - \mathbf{P}| \leq \epsilon_1
\end{equation*}
%
where $\epsilon_1$ stands for the tolerance for distance in Euclidean space.
\paragraph{2}
Is the cosine zero ?
\begin{align*}
    \frac{
        |\mathbf{S}_u (u_i, v_i) \cdot
        \left(
            \mathbf{S}(u_i, v_i) - \mathbf{P}
        \right)|
    }{
        |\mathbf{S}_u (u_i, v_i)|
        |\mathbf{S}(u_i, v_i) - \mathbf{P}|
    } & \leq \epsilon_2 \\
    \frac{
        |\mathbf{S}_v (u_i, v_i) \cdot
        \left(
            \mathbf{S}(u_i, v_i) - \mathbf{P}
        \right)|
    }{
        |\mathbf{S}_v (u_i, v_i)|
        |\mathbf{S}(u_i, v_i) - \mathbf{P}|
    } & \leq \epsilon_2
\end{align*}
%
where $\epsilon_2$ stands for the tolerance for cosine.
If either of these conditions are met, the iteration is terminated.
Otherwise Eq.~\ref{oct_eq:projection_iteration} is performed to find the parameters $u_{i+1}$ and $v_{i+1}$ for next iteration.
\paragraph{3} ?
Make sure $u$ and $v$ are within there domains
\begin{align*}
    u_{i+1} & \in [a,b] \\
    v_{i+1} & \in [c,d]
\end{align*}
%
where $a$, $b$, $c$ and $d$ are the lower and upper bounds for the knot vectors of surface $S$.
If the surface is open in $u$ direction
\begin{equation}
    \left\{
        \begin{array}{rl}
            u_{i+1} = a & u_{i+1} < a \\
            u_{i+1} = b & u_{i+1} > b
        \end{array}
    \right.
\end{equation}
%
If the surface is open in $v$ direction
\begin{equation}
    \left\{
        \begin{array}{rl}
            v_{i+1} = c & v_{i+1} < c \\
            v_{i+1} = d & v_{i+1} > d
        \end{array}
    \right.
\end{equation}
%
If the surface is closed in $u$ direction
\begin{equation}
    \left\{
        \begin{array}{rl}
            u_{i+1} = b - ( a - u_{i+1} ) & u_{i+1} < a \\
            u_{i+1} = a + ( u_{i+1} - b ) & u_{i+1} > b
        \end{array}
    \right.
\end{equation}
%
If the surface is closed in $v$ direction
\begin{equation}
    \left\{
        \begin{array}{rl}
            v_{i+1} = d - ( c - v_{i+1} ) & v_{i+1} < c \\
            v_{i+1} = c + ( v_{i+1} - d ) & v_{i+1} > d
        \end{array}
    \right.
\end{equation}
%
\paragraph{4}
The difference between the new parameters $u_{i+1}$ and $v_{i+1}$ and the old ones $u_i$ and $v_i$ is insignificant ?
\begin{equation*}
    |u(i+1) - u_i| \mathbf{S}_u (u_i, v_i) +
    (v_{i+1} - v_i) \mathbf{S}_v (u_i, v_i) |
    \leq \epsilon_1
\end{equation*}
The iteration will be terminated if this condition is met.