Skip to content

Instantly share code, notes, and snippets.

@hi-ogawa
Last active May 5, 2020 02:40
Show Gist options
  • Save hi-ogawa/250f2363b93b83aec636bba353f183d4 to your computer and use it in GitHub Desktop.
Save hi-ogawa/250f2363b93b83aec636bba353f183d4 to your computer and use it in GitHub Desktop.
Markdown TeX Demo
$$$
% Quick begin/end
\newcommand{\Ba}[0]{\begin{aligned}}
\newcommand{\Ea}[0]{\end{aligned}}
\newcommand{\Bc}[0]{\begin{cases}}
\newcommand{\Ec}[0]{\end{cases}}
\newcommand{\Bm}[0]{\begin{matrix}}
\newcommand{\Em}[0]{\end{matrix}}
\newcommand{\Bmp}[0]{\begin{pmatrix}}
\newcommand{\Emp}[0]{\end{pmatrix}}
% Others
\newcommand{\bb}[0]{\mathbf}
\newcommand{\del}[0]{\partial}
\newcommand{\xx}[0]{\times}
\renewcommand{\ll}[0]{\left}
\newcommand{\rr}[0]{\right}
\newcommand{\RR}[0]{\mathbb{R}}
\newcommand\ddfrac[2]{{\displaystyle\frac{\displaystyle #1}{\displaystyle #2}}}
$$$
## Stereographic projection
### Def. 1
We define $F$ as below:
$$
\begin{aligned}
F : \RR^{n + 1} \supset
S^n \setminus \{ (1, \bb{0}) \} &\to \RR^n \\
(x_0, \bb{x}) \quad\quad &\mapsto \bb{y} = \frac{\bb{x}}{1 - x_0}.
\end{aligned}
$$
### Prop. 2
The inverse of \(F\) is:
\[
\begin{aligned}
F^{-1}(\bb{y}) =
\left(
\frac{|\bb{y}|^2 - 1}{|\bb{y}|^2 + 1},
\frac{2 \bb{y}}{|\bb{y}|^2 + 1}
\right)
\equiv G(\bb{y}).
\end{aligned}
\]
***Proof***
Given $x_0^2 + |\bb{x}|^2 = 1$, we see:
$$
\begin{aligned}
\bb{y} = F(x_0, \bb{x}) = \frac{\bb{x}}{1 - x_0}
&\implies
|\bb{y}|^2
= \frac{|\bb{x}|^2}{(1 - x_0)^2}
= \frac{1 - x_0^2}{(1 - x_0)^2}
= \frac{1 + x_0}{1 - x_0} \\
&\implies
(1 - x_0) |\bb{y}|^2 = 1 + x_0 \\
&\implies
x_0 = \frac{|\bb{y}|^2 - 1}{|\bb{y}|^2 + 1}
= 1 - \frac{2}{|\bb{y}|^2 + 1}.
\end{aligned}
$$
And, we also have:
$$
\bb{x} = (1 - x_0) \bb{y} = \dfrac{2}{|\vec{y}|^2 + 1} \bb{y}.
$$
So, we have proved $F^{-1} \circ F = \text{id}$.
For the converse $F \circ F^{-1} = \text{id}$, we have:
$$
\begin{aligned}
\frac{\bb{x}}{1 - x_0}
=
\ddfrac
{ \frac{2 \bb{y}}{|\bb{y}|^2 + 1} }
{ 1 - \frac{|\bb{y}|^2 - 1}{|\bb{y}|^2 + 1} }
=
\dfrac
{ 2 \bb{y} }
{ |\bb{y}|^2 + 1 - (|\bb{y}|^2 - 1) }
= \bb{y}.
\end{aligned}
$$
### Prop. 3
For the Jacobian $J \equiv \bb{D}G|_{y} \in \RR^{(n + 1) \xx n}$,
we have $J^T J = \ll( \dfrac{2}{|\bb{y}|^2 + 1} \rr)^2 I$.
***Proof***
First we note:
$$
\del_y \dfrac{1}{|\bb{y}|^2 + 1}
= - 2 \dfrac{\bb{y}^T}{(|\bb{y}|^2 + 1)^2} \in \RR^{1 \xx n}.
$$
Thus, separating components as:
$$
J = \bb{D}G|_y
= \Bmp
\del_y x_0 &\in \RR^{1 \times n} \\
\del_y \bb{x} &\in \RR^{n \times n}
\Emp,
$$
we can see:
$$
\Ba
\del_y x_0
&= \del_y \ll( 1 - \frac{2}{|\bb{y}|^2 + 1} \rr)
= \dfrac{1}{(|\bb{y}|^2 + 1)^2} 4 \bb{y}^T, \\
\del_y \bb{x}
&= \del_y \frac{2 \bb{y}}{|\bb{y}|^2 + 1}
= 2 \ll(
\frac{1}{|\bb{y}|^2 + 1} I +
\bb{y} \; \del_y \frac{1}{|\bb{y}|^2 + 1}
\rr) \\
&= 2 \ll(
\frac{1}{|\bb{y}|^2 + 1} I
- 2 \frac{\bb{y} \bb{y}^T}{(|\bb{y}|^2 + 1)^2}
\rr) \\
&=
\frac{1}{(|\bb{y}|^2 + 1)^2}
2 \ll(
(|\bb{y}|^2 + 1) I
- 2 \bb{y} \bb{y}^T
\rr), \\
J &=
\frac{1}{(|\bb{y}|^2 + 1)^2}
\Bmp
4 \bb{y}^T \\
2 ( (|\bb{y}|^2 + 1) I - 2 \bb{y} \bb{y}^T )
\Emp.
\Ea
$$
Therefore:
$$
\Ba
J^T J &=
\Bmp
(\del_y x_0)^T \;
(\del_y \bb{x})^T
\Emp
\Bmp
\del_y x_0 \\
\del_y \bb{x}
\Emp
=
(\del_y x_0)^T \del_y x_0
+ (\del_y \bb{x})^T \del_y \bb{x} \\
&=
\frac{1}{(|y|^2 + 1)^4}
\ll(
16 \bb{y} \bb{y}^T
+ 4
\ll(
(|y|^2 + 1)^2 I
+ 4 |y|^2 \bb{y} \bb{y}^T
- 4 (|y|^2 + 1) \bb{y} \bb{y}^T
\rr)
\rr) \\
&=
\frac{1}{(|y|^2 + 1)^4} 4 (|y|^2 + 1)^2 I \\
&=
\frac{4}{(|y|^2 + 1)^2} I.
\Ea
$$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment