Proving things in Economics

I recently transferred schools. New schools seems pretty fun and it’s full of cool people.

Anyhow, I recently came across this thing I did while taking Economics at my old school (I had a lot of free time). My professor was discussing shifting things in supply and demand charts and how the equilibrium point moves around — and having been really bored in the course, I decided to take a rigorous approach and prove how the equilibrium point moves when supply/demand/both shift. It surprisingly took more time than I anticipated.

Anyhow, I don’t have the TeX document but I do have the PDF. I believe I wrote this in early October…

Here’s the link if you want to see it!

Wrapping the Real Numbers Around a Circle… of Radius 1

I’d like to thank my amazing Calculus III instructor, Professor Wolfson, for showing me this. Undoubtedly will always be my favorite professor and I only wish to someday be a quarter as knowledgeable as him. Anyhow! Let’s jump right in.

What if I told you that you can wrap the entire real number line, every point on it, around a circle of radius 1? Go ahead, choose whether I’m a loony or not now before continuing to read.

Did you choose? Alright. Now look at the animated graph below.

Circle has radius 1, line is in the form y=mx+1 with -10<m<10.

I’m going to try to motivate you to sort of “prove” this in your head before I get into the mathematics behind it. While looking at the gif, just note the following:

1. Consider the very top point of the circle, the point (0,1), as undefined.
2. Note that as the slope changes, where the line intersects the circle and the x-axis changes as well. In a single snapshot of the gif, let’s call the point it intersects on the x-axis as $(x_0, 0)$ or just $x_0$ for short. Call the point it intersects on the circle $(x_c,y_c)$
3. Now try to imagine this: in that random snapshot of the gif (where the line is held still) map (“assign”) the point $x_0$ to $(x_c,y_c)$. Now go to the next snapshot and do it again, and again, …

Now let the slope instead of being anything in the range (-10, 10), be anything in $( - \infty, \infty)$. What follows is every single point on the real number line (x-axis) gets assigned to a point on the circle! With room to spare even, that point on the top of the circle never got assigned anywhere after all.

Let’s get down and dirty in some math now.

Err, I’m sorry, I won’t say that again. Sounded a lot cooler in my head.

Finding the Function:
We can actually find the exact function $f$ that tells us where our point $x_0$ goes on the circle. It’ll be a function mapping one number to two, or more explicitly, $f: \mathbb{R} \to \mathbb{S}$, where $\mathbb{S} = \{ x \in \mathbb{R}^2 | x^2+y^2 =1 \}$.

To get started we need to know what we have to work with. Without loss of generality let’s let the radius be 1 (that is, you can make the radius whatever you please, I just wanted to make it look pretty in the end). What we have is

$\begin{cases} x^2+y^2=1 \\ y=mx+1 \text{ where } m = -\frac{1}{x_0} \end{cases}$

which is actually all we need. Let’s leave the $m$ in there for now though to avoid having to deal with messy equations, and just remember that our circle doesn’t include the point $(0,1)$.

From here it’s a matter of some plug and chug!

$x^2+(mx+1)^2=1$
$x^2+m^2x^2+2mx=0$
$(1+m^2)x^2+2mx=0$
$\displaystyle{ x=\frac{-2m \pm \sqrt{4m^2}}{2(1+m^2)}}$
$\implies x=\displaystyle{\frac{-2m}{1+m^2}}$

Great! Now we complete the same procedure for the other coordinate.

$\displaystyle{\left(\frac{y-1}{m} \right) ^2 + y^2 = 1}$
$y^2-2y+r^2+m^2y^2=m^2$
$(1+m^2)y^2-2y+(1-m^2)=0$
$y=\displaystyle{\frac{2 \pm \sqrt{4-4(1+m^2)(1-m^2)}}{2(1+m^2)}}$
$y= \displaystyle{\frac{1 \pm m^2}{1+m^2}}$
Here we must choose $1-m^2$ for the numerator because otherwise things would simplify to $y=1$, and remember, (0,1) wasn’t defined on our circle.
$\displaystyle{ \implies y=\frac{1-m^2}{1+m^2}}$

The Function:
All this, in summary, provides the following function:
$f(x_0)=\displaystyle{ \left< \frac{-2m}{1+m^2}, \frac{1-m^2}{1+m^2} \right>}$
which, after plugging in the fact that $m=-\frac{1}{x_0}$ provides…

$f(x_0)=\displaystyle{ \left< \frac{2x_0}{{x_0}^2+1}, \frac{{x_0}^2-1}{{x_0}^2+1} \right>}$

And there we have it! Any point $x_0$ on the real number line can be mapped to the point $f(x_0)$ on our circle of radius 1! Go ahead and try a few points and mess around if you want. Let’s end on some final notes regarding this:

• It’s pretty cool looking at how “dense” the circle is packed, for instance, the bottom half of the circle is mapped only points from $[0,1]$ but what about perhaps the upper-left tiny little 1/1000 segment of the circle? Oh dear…
• Thing about the difference in the arc-length of a circle over its entire domain $[0, 2\pi]$ versus the arclength of $x=0$ over entires domain $(-\infty, \infty)$. What in the world is going on here?
• Explicitly calculate the inverse of $f(x_0)$, that is, if I gave you a point $(x_c, y_c)$ on the circle, can you tell me what $x_0$ it was assigned?
• By finding the explicit inverse function (showing it exists), we showed that the circle and the real numbers are isomorphic (have the “same size” set of points!!).

Structure of Automorphisms

This post will be on the higher-end of things, mostly because I had just learned this and really wanted to get the opportunity to share it.

Today while studying Algebra I learned of a group in a very odd place in my opinion. It’s not too reliant on too much — little enough for me to be alright with defining everything from the ground-up. If you haven’t had Category Theory before, this’ll be a hellish ride, but hopefully you’ll enjoy it.

Our goal is to find a group in the midst of the abstract world of Category Theory. So we have a picture of what we’re hunting down, let’s define a group now.

Definition 1.1: The nonempty set $G$, endowed with the binary operation $\ast$, (briefly, written $(G, \ast)$, or simply $G$ if the operation can be understood) is a group if

1. the group is closed under $\ast$, that is,

$(\forall g, h \in G): g \ast h \in G$;

1. the operation $\ast$ is associative, that is,

$(\forall g, h, j \in G): (g \ast h) \ast k = g \ast (h \ast k)$;

2. there exists an identity element $e_G$ for $\ast$, that is,

$(\exists e_G \in G)(\forall g \in G): g \ast e_g = e_g \ast g = g$;

3. every element in $G$ has an inverse with respect to $\ast$, that is,

$(\forall g \in G)(\exists h \in G): g \ast h = e_G = h \ast g$.

Example 1.2: You’ve actually encountered groups in a lot of places, albeit if this is your first time hearing about them, you might not immediately realize so. For instance, $(\mathbb{R}, +)$ is a group! If you take any three real numbers $a,b,c \in \mathbb{R}$, then most definitely $(a+b)+c=a+(b+c)$. What about the identity? Well, $e_\mathbb{R} = 0$! Because we have $a+0=0+a=a$, just as needed. And does our identity satisfy that last property? Yup, if you have a real number $a$, then there exists another real number, $-a$, where $a+(-a)=(-a)+a=0$.

Some other groups (which you should check satisfy the properties on your own!) are $(\mathbb{C}, +), (\mathbb{Z}, +),$ and $(\mathbb{Z}_p, \cdot_p)$ where $p$ is prime and $\cdot_p$ is multiplication modulo $p$ (try checking when $p$ is not prime — notice something strange? Try and prove that strange fact you uncovered!)

Anyways, now that everyone knows what a group is, let’s go somewhere that seems wildly different. Let’s jump into some abstract nonsense now, shall we?

Definition 1.3: A category C consists of

• a class $\text{Obj(\textbf{C})}$ of objects of the category; and
• for every two objects A, B of C, a set $\text{Hom}_\textbf{C}(A,B)$ of morphisms with the following properties

1.  Identity elements exist: for every object A of C, there exists (at least) one morphism $\text{1}_A \in \text{Hom}_\textbf{C}(A,A)$, the ‘identity’ on A.

2. One can compose two morphisms: two morphisms $f \in \text{Hom}_\textbf{C}(A,B)$ and $g \in \text{Hom}_\textbf{C}(B,C)$ determine a morphism $gf \in \text{Hom}_\textbf{C}(A,C)$.

3. The ‘composition law’ is associative: if  $f \in \text{Hom}_\textbf{C}(A,B)$, $g \in \text{Hom}_\textbf{C}(B,C)$, and $h \in \text{Hom}_\textbf{C}(C,D)$, then $(hg)f=h(gf)$.

4. The identity morphisms are identities with respect to composition: that is, for all $f \in \text{Hom}_\textbf{C}(A,B)$ we have $f \text{1}_A = f$ and $\text{1}_B f = f$.

5. Lastly, the sets $\text{Hom}_\textbf{C}(A,B)$ and $\text{Hom}_\textbf{C}(C,D)$ must be disjoint unless $A=C$ and $B=D.$

Quickly side notes, a morphism $f \in \text{Hom}_\textbf{C}(A,B)$ for instance is sometimes just shortened $f \in \text{Hom}(A,B)$ if category is known, or even just $f: A \to B$. Also, $\text{Hom}_\textbf{C}(A,A)$ is called the set of endomorphisms of A and may be written $\text{End}_\textbf{C}(A)$.

I won’t lie, that was a lot to swallow at once. To sort of get a better feel for categories, let’s take a look at one we’re well accustomed to.

Example 1.4: The category Set consists of

• $\text{Obj(\textbf{Set})} =$ class of all sets
• For A, B in $\text{Obj(\textbf{Set})}$ (that is, they are sets) we have $\text{Hom}_\textbf{Set}(A,B) = B^A$, where $B^A$ denotes the set of all functions $f: A \to B$.

Good further assurance you understand categories would be to go and verify that Set follows the axioms stated for categories in Definition 1.3. Of course the identity for some set A is the identity function $\text{id}_A: A \to A$, where $\text{id}_A (a)=a$, and composition of morphisms is regular composition of functions.

Oh, quick side note, the reason all the functions $f: A \to B$ are denoted $B^A$ is because the cardinality of the set is $|B|^{|A|}$. Try and prove this for yourself!

You can find a lot more examples of categories online, but for now, Set should be enough to provide understanding of them.

Definition 1.5: Let be a category. A morphism $f \in \text{Hom}_\textbf{C}(A,B)$ is an isomorphism if it has a two-sided inverse under composition: that is, if $\exists g \in \text{Hom}_\textbf{C}(B,A)$ such that $gf = \text{1}_A$ and $fg = \text{1}_B$.

Proposition 1.6: The inverse of an isomorphism is unique.

Proof: Let’s assume an isomorphism $f: A \to B$ has two inverses $g_1$ and $g_2$. The standard trick is to compose on the left by one morphism, and on the right by the other, then apply associativity:

$g_1 = g_1 \text{1}_B = g_1 (fg_2) = (g_1 f) g_2 = \text{1}_A g_2 = g_2$.

Since the inverse of an isomorphism $f$ is unique, there’s no harm in denoting it as $f^{-1}$.

Proposition 1.7: With notation as above:

• Each identity $\text{1}_A$ is an isomorphism and its own inverse.
• If $f$ is an isomorphism, then $f^{-1}$ is an isomorphism, and further $\left( f^{-1} \right) ^{-1} = f$.
• If $f \in \text{Hom}_\textbf{C}(A,B)$$g \in \text{Hom}_\textbf{C}(B,C)$ are isomorphisms, then the composition $gf$ is an isomorphism and $(gf)^{-1} = f^{-1} g^{-1}$.

Proof: All these tend to follow immediately from their definitions. For the third point for instance, we could verify it’s a left-inverse (and the right-inverse verification is the same flavor as this):

$(f^{-1}g^{-1})(gf)=f^{-1}(g^{-1}g)f=f^{-1}(\text{1}_B f) =f^{-1}f=\text{1}_A.$

We’ve made it to our final goal. Automorphisms.

Definition 1.8: An automorphism of an object A of a category C is an isomorphism from A to itself. The set of automorphisms of A is denoted $\text{Aut}_\textbf{C} (A)$; it is a subset of $\text{End}_\textbf{C}(A)$.

By Proposition 1.7, composition grants $\text{Aut}_\textbf{C} (A)$ a very familiar structure:

• the composition of two elements $f, g \in \text{Aut}_\textbf{C} (A)$ is an element $gf \in \text{Aut}_\textbf{C} (A)$;
• composition is associative;
• $\text{Aut}_\textbf{C} (A)$ contains the element $\text{1}_A$, which is an identity for composition (that is, $f \text{1}_A = \text{1}_A f = f$);
• every element $f \in \text{Aut}_\textbf{C} (A)$ has an inverse $f^{-1} \in \text{Aut}_\textbf{C} (A)$.

Can you recognize things? $( \text{Aut}_\textbf{C} (A), \circ)$, where A is any object in a category C and $\circ$ is the definition composition in that category forms a group! There’s the structure underlying automorphisms. In the midst of one of the most “abstract” subjects of mathematics, still lies structure.

It’s almost like you expected it, right? Not just because I conveniently defined groups before all of this, but that morphisms in categories had similar properties to groups. They had associativity, identities, all that lacked was inverses and closure — and that’s what the properties of isomorphisms provided.

Example 1.9: Let’s take a quick glance at the group $( \text{Aut}_\textbf{Set} (A), \circ)$. We have $\text{End}_\textbf{Set} (A) = A^A$, that is, it is the set of all functions $f: A \to A$, including strictly injective, neither injective nor surjective, etc. Our subset $\text{Aut}_\textbf{Set} (A)$ of $\text{End}_\textbf{Set} (A)$ consists of only the isomorphic functions (bijections!) $f: A \overset{\sim}{\rightarrow} A$. Our group has elements that are bijective functions and the binary operation is function composition! It should be straightforward showing this group adheres to the group axioms.

Now the coolest part in this isn’t that we discovered a group within the category Set — it’s that we proved that in any arbitrary category there exists a group $( \text{Aut}_\textbf{C} (A), \circ)$! And we did that working with abstract concepts.

Automorphisms will revisited again the future, so try to get a grasp on them early! 🙂

Lastly, some sources for anyone who wants to read more:

1. I highly recommend checking out Group Theory and the Rubik’s Cube by Janet Chen. It’s not a book, just a 39-page PDF, “notes are based on a 2-week course that I taught for high school students at the Texas State Honors Summer Math Camp.” It’s very fun read and includes exercises to ensure your understanding. 🙂
2. Algebra: Chapter 0 by Paolo Aluffi is a beautiful introduction to Abstract Algebra with a good reliance on Category Theory. It’s what I’m currently going through and is undoubtedly one of my favorite texts — Aluffi is such a funny and light-hearted author.

The next post won’t be so high-up, I plan on covering some Cryptography, so that should be worthwhile. See you then!

The Anomalous Closed Form of 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, ..

Sorry for being out for so long! Anyhow, let’s just jump right in. I want to dedicate this post to a very special sequence.

Problem:
Find the closed form (that is, a formula for determining the $n$th term) of the sequence $1, 2, 2, 3, 3, 3, 4, 4, 4, 4, \dots$, where each integer $m$ repeats $m$ times.

Motivation for Writing Post:
This sequence has a bit of history with me which I want to quickly gloss over, although feel free to skim/skip this of course:

I had first encountered this sequence my junior year of high school online (Twitter, I believe, during the whole two weeks I used Twitter). I had followed someone who posted math problems everyday and one day he posted: “Find the formula for the nth term of 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, …” It immediately caught my eye and I started to attempt it… and got nowhere after working for a good hour or so straight. I left it for a bit to clear my mind then came back and suddenly had an epiphany and saw the pattern hidden in plain sight — and from there it was straight forward!

Two years later in my freshman year of college I was in a Discrete Structures course covering sequences and series and my professor had written up multiple different lists of elements on the board asking students to find the closed form of each sequence. Lo and behold, there it was! Of course, I couldn’t remember the formula off the top of my head and I recalled it taking a good few minutes to find the answer, so I just left that blank (this wasn’t an assignment, just the professor sort of testing us mid-lecture). Afterwards, he went through each sequence and showed us its closed form, and when he got to the infamous 1, 2, 2, 3, 3, 3, … he asked around if anyone found its formula and no one responded and I just smiled at him (I thought he must be playing off of how surely no one calculated it in time). To my surprised, he then went and said “You actually can’t find the formula for this one because it doesn’t exist! All you can say is each integer m repeats m times.” This really bothered me, and I actually approached him at the end of class telling him that such a formula exists and showed him the pattern embedded in the sequence — then that very night over email I discussed the actual derivation of the closed form with him. 🙂

Besides this though, I’ve met a good handful of people who didn’t believe me when I said this sequence has a closed form. I’ve always wanted to write this just to show where the pattern in this series is and how to use to your advantage.

Solution:
Let’s begin by writing out the sequence a bit so we can closely examine it.
$a_1 = 1$
$a_2 = 2$
$a_3 = 2$
$a_4 = 3$
$a_5 = 3$
$a_6 = 3$
$a_7 = 4$
$a_8 = 4$
$a_9 = 4$
$a_{10} = 4$
$a_{11} = 5$
Something seems to be going on with the subscripts of $a_n$… Look where terms stop repeating, 1 stops at 1, 2 at 3, 3 at 6… Putting where they stop in sort of their own little sequence $b_n$, we have $1, 3, 6, 10, \dots$. Maybe you’ve encountered this before — $b_n$ is actually a sequence of what’s known as triangular numbers! That is, you get each number by summing up natural numbers, like this:
$b_1 = 1 = 1$
$b_2 = 3 = 1 + 2$
$b_3 = 6 = 1 + 2 + 3$
$b_4 = 10 = 1 + 2 + 3 + 4$
$b_5 = 15 = 1 + 2 + 3 + 4 + 5$
$\dots$
$\displaystyle{b_n = 1 + 2 + 3 + \dots + (n-1) + n = \sum_{r=1}^n r = \frac{n^2+n}{2}}$

There’s our hidden pattern, exactly what we needed. Giving us the following:

Lemma:
If $a_n=k$, then we have

$\displaystyle{ \frac{(k-1)^2+(k-1)}{2} < n \leq \frac{k^2+k}{2} }$

Proof: Since $m$ repeats $m$ times and we start with $a_1 = 1$, we then have $a_{1+2} = 2$ as the final term of 2, $a_{1+2+3}=3$ as the final term of 3, and in general $a_{ \frac{n^2+n}{2}}=n$ as the final term of $n$. This justifies that if $a_n=k$ then $n \leq \frac{k^2+k}{2}$. For the other side of the inequality, note that if $a_n=k$ then $k-1$ stopped repeating at $\frac{(k-1)^2+(k-1)}{2}$, so beginning after this term is where $k$ begins repetition. This concludes the proof.

It practically follows as corollary what we do next. Using the inequality from our lemma, we now just proceed with some algebraic manipulation:
$\displaystyle{ \frac{(k-1)^2+(k-1)}{2} < n \leq \frac{k^2+k}{2} }$
$\displaystyle{ (k-1)^2+(k-1) < 2n \leq k^2+k }$
$\displaystyle{ (k-1)^2+(k-1)+\frac{1}{4} < 2n+\frac{1}{4} \leq k^2+k+\frac{1}{4} }$
Note, the $\frac{1}{4}$ is added in order to factor in the next step.
$\displaystyle{ \left[ (k-1)+\frac{1}{2}\right]^2 < 2n+\frac{1}{4} \leq \left( k+\frac{1}{2} \right) ^2 }$
$\displaystyle{ (k-1)+\frac{1}{2} < \sqrt{2n+\frac{1}{4}} \leq k+\frac{1}{2} }$
$\displaystyle{ k-1 < \sqrt{2n+\frac{1}{4}}-\frac{1}{2} \leq k }$
Lastly, we’re going to take the ceiling function of everything, giving
$\displaystyle{ \lceil \sqrt{2n+\frac{1}{4}}-\frac{1}{2} \rceil = k }$
providing us our final answer of…

The sequence $1, 2, 2, 3, 3, 3, 4, 4, 4, 4, \dots$, where $m$ repeats $m$ times, has the closed form

$a_n = \lceil \sqrt{2n+\frac{1}{4}}-\frac{1}{2} \rceil$.

The ceiling function ($\lceil x \rceil$ means always round up $x$ to the nearest integer) was added because $\sqrt{2n+\frac{1}{4}}-\frac{1}{2}$ was between the two integers $k-1$ and $k$, and it is capable of only being an integer and is undefined for $k-1$, so it must be rounded up to $k$.

This wasn’t necessarily a one-glance proof and it may require some rereading to really understand the gist of everything, so please do reread it (I mean for goodness sake, it took me hours the first time to get this, and now I’m just throwing it all at you at once).

This problem always makes me think back to a quote I heard in a Numberphile video many months ago that managed to always stick with me, and I hope, perhaps after seeing this post, that it’ll stick with you as well.

“If you know something, prove it! Make sure you really understand that one thing and that often unlocks the rest.” — Daniel Erman, The Josephus Problem

Wrapping Up Infinite Planes

Note: This is sort of a “part 2” to this post, which is the two-dimensional analogue to this (mainly) three-dimensional post.

It’s fairly early/late (4:39AM) and I’m pretty sleepy but I wanted to try and get this post in, so I apologize in advance if it seems “more math-y and less descriptive.”

As an expansion to the previous post, the same concept can be applied to the sphere $x^2+y^2+z^2=1$ and $\mathbb{R}^2$. And similar to before, the top of our sphere is punctured, i.e. the point $(0,0,1)$.

We now look for a function $f$ that allows us to input a point $(x_0, y_0)$ on our plane and output a point $(x_s,y_s,z_s)$ on our sphere, that is, $f: \mathbb{R}^2 \to \mathbb{S}^2$, where $\mathbb{S}^2 = \{ x \in \mathbb{R}^3 | x^2+y^2+z^2=1 \}$. The line that will assist us with this assignment is now a vector, as would be required, so here’s our new system:

$\begin{cases} x^2+y^2+z^2=1 \\ \vec{r}(t)=\left< 0,0,1 \right> + t \left< x_0,y_0,-1 \right> \ \ \ 0 \leq t \leq 1 \end{cases}$

Another, more convenient way of writing this system can be done by noting that $\vec{r}(t)$ can simply be rewritten (by adding the vectors in its definition) as

$\vec{r}(t) = \begin{cases} x(t) = x_0 t \\ y(t)=y_0t \\ z(t) = 1-t \end{cases} = \ \ \ \begin{cases} t=\frac{x}{x_0} \\ t=\frac{y}{y_0} \\ t = 1-z \end{cases}$

thus giving us

$\begin{cases} x^2+y^2+z^2=1 \\ \frac{x}{x_0}=\frac{y}{y_0}=1-z \end{cases}$

by equating the the parameter in each component. From here we just need to take turns solving for $x$, $y$, and $z$ in terms of $x_0$ and $y_0$ and we should be all set!

Solving for x:
$\displaystyle{ x^2 + \left( \frac{xy_0}{x_0} \right) ^2 + \left( 1-\frac{x}{x_0} \right) ^2 = 1}$
$\displaystyle{ \left( \frac{{x_0}^2+{y_0}^2+1}{{x_0}^2} \right)x^2 - \frac{2}{x_0} x = 0}$
$\displaystyle{ x=\frac{\frac{2}{x_0} \pm \sqrt{\frac{4}{{x_0}^2}}}{2 \left( \frac{{x_0}^2+{y_0}^2+1}{{x_0}^2} \right)} }$

$\displaystyle{ \implies x = \frac{2x_0}{{x_0}^2+{y_0}^2+1}}$

Solving for y:
$\displaystyle{ \left( \frac{yx_0}{y_0} \right) ^2 +y^2 + \left( 1-\frac{y}{y_0} \right) ^2 = 1}$
$\displaystyle{\dots}$
$\displaystyle{ \implies y = \frac{2y_0}{{x_0}^2+{y_0}^2+1} }$

Note, for $x$ and $y$, the radical was chosen to be positive or else both would’ve reduced to to being $0$ for all values of $x_0$ and $y_0$, which is not always the case, for instance at $(x_0, y_0) = (1,0)$, that should be mapped to the sphere at the point $(x_s, y_s, z_s) = (1,0,0)$ on the sphere, and similarly $(0,1) \mapsto (0,1,0)$, thus indicating we take the positive root.

Solving for z:
$\displaystyle{(x_0-x_0z)^2+(y_0-y_0z)^2+z^2=1}$
$\displaystyle{({x_0}^2+{y_0}^2+1)z^2-2({x_0}^2+{y_0}^2)z+({x_0}^2+{y_0}^2-1)=0}$
Let’s let $u ={x_0}^2+{y_0}^2$.
$\displaystyle{(u+1)z^2-2uz+(u-1)=0}$
$\displaystyle{ z = \frac{2u \pm \sqrt{4u^2-4(u+1)(u-1)}}{2(u+1)}}$
$\displaystyle{ z = \frac{u \pm 1}{u + 1}}$
Now taking the numerator that doesn’t assign $z$ to the punctured point…
$\displaystyle{ \implies z= \frac{{x_0}^2+{y_0}^2-1}{{x_0}^2+{y_0}^2+1} }$

Our Function:
Using the above information, our function $f: \mathbb{R}^2 \to \mathbb{S}^2$ is defined

$\displaystyle{ f(x_0, y_0) = \left< \frac{2x_0}{{x_0}^2+{y_0}^2+1}, \frac{2y_0}{{x_0}^2+{y_0}^2+1},\frac{{x_0}^2+{y_0}^2-1}{{x_0}^2+{y_0}^2+1} \right> }$

and there we have it!

Now, this function is actually bijective as well. Go ahead and find the explicit inverse! That is, if I give you a $(x_s, y_s, z_s)$ and you tell me what $(x_0, y_0)$ was assigned there.

On another note, doesn’t it seem like the function about really resembles the one from our previous post? Our other function $f: \mathbb{R} \to \mathbb{S}$ was defined to be $f(x_0)=\displaystyle{ \left< \frac{2x_0}{{x_0}^2+1}, \frac{{x_0}^2-1}{{x_0}^2+1} \right>}$. You know, I dare be so bold as to assert the following.

Conjecture:
The function $f: \mathbb{R}^n \to \mathbb{S}^n$ where $\mathbb{S}^n = \{ x \in \mathbb{R}^{n+1} : ||x|| = 1 \}$ defined by

$\displaystyle{ f(x_1, \dots, x_n) = \left< \frac{2x_1}{\sum_{i=1}^n x_i^2\ + 1}, \frac{2x_2}{\sum_{i=1}^n x_i^2\ + 1}, \dots, \frac{2x_{n-1}}{\sum_{i=1}^n x_i^2\ + 1}, \frac{\sum_{i=1}^n x_i^2\ - 1}{\sum_{i=1}^n x_i^2\ + 1} \right> }$

is bijective.

Proof: Too tired, but I’ll leave it up to the reader to prove/disprove.

Corollary:
The set $\mathbb{R}^n$ is isomorphic to $\mathbb{S}^n$.

Note, $||(x_1, \dots, x_n) || = \sqrt{{x_1}^2 + \dots + {x_n}^2}$.

Another way of proving the above conjecture is finding the horrendous function’s inverse (the answer is called the stereographic projection, but there’s no fun in googling first!).

Also, the conjecture implies that $\mathbb{R}^n$ and $\mathbb{S}^n$, which is really worth giving it some thought if this is your first time hearing this. That radius 1 circle from last post? It has as many points as the real number line. The sphere of radius 1 in this post? Has as many points as the infinite two-dimensional plane of real numbers. Just let that set in.

Has the existential crisis kicked in yet?

On a very final note, if you thought that this and the preceding post were interesting I highly recommend looking into stereographic projections. Also, if you want a sort of “interactive” program to mess around with spherical geometry and projections onto a plane, take a look at this java program called Sphaerica. Here’s some screenshots from it:

Well, that’s all I got for today. Probably will be a good few days until my next post so I can mainly focus on my studies. See you then!

Area of a Triangle on a Sphere

My good friend who runs the wonderful blog In The Margins gave me this problem quite some time ago, and I honestly enjoyed completing it quite a bit. Thought I’d go ahead and share it with the world!

Problem:
“Find the area of a triangle on a sphere without using Calculus, given just its angles $\mathbf{\alpha, \ \beta, \ \text{and } \gamma}$.”

I recommend pausing here and trying this yourself first, it’s quite fun!

Solution:
First, make sure you know what a great circle is. It’s the intersection of a plane (“paper”) and a sphere (“orange?”) where the plane goes through the center of the sphere. Look at the image to the right for an example (for instance, the Earth’s equator is a great circle in a sense!)

Begin by first drawing a triangle on a sphere with arbitrary angles $\alpha, \ \beta, \ \text{and } \gamma$. Afterwards, extend the sides of the triangle to form great circles. In doing this, you should notice that the same triangle appears on the back of the sphere.

Now denote the side between $\gamma$ and $\alpha$ as 1, $\alpha$ and $\beta$ as 2, and $\beta$ and $\gamma$ as 3. Now only looking at side 1, shade in the hemisphere not containing the triangle, and the repeat the process with the other two sides.

The numbers in circles represent how many times that particular partition was shaded over.

Let’s denote the following:
$A_1 :=$ Set of Shaded Points from The Hemisphere of Side $1$
$A_2 :=$ Set of Shaded Points from The Hemisphere of Side $2$
$A_3 :=$ Set of Shaded Points from The Hemisphere of Side $3$

Note then, that this follows:
$|A_1| = |A_2| = |A_3| = 2 \pi r^2$
$|A_1 \cap A_2 \cap A_3|=A_T$ (where $A_T$ is the area of the triangle)
$|A_1 \cup A_2 \cup A_3| = 4 \pi r^2 - A_T$
$|A_1 \cap A_2| = 2 \alpha r^2$ (this, along with the following, are called antipodal digons)
$|A_2 \cap A_3| = 2 \beta r^2$
$|A_3 \cap A_1| = 2 \gamma r^2$

Looks like we’re in a good situation to employ the Inclusion-Exclusion Principle!

Inclusion-Exclusion Principle for 3 Finite Sets:
Let $A$, $B$, and $C$ be three finite sets. Then
$|A \cup B \cup C| = |A| + |B| + |C| - |A \cap B| - |A \cap C| - |B \cap C| + |A \cap B \cap C| .$

Which means we must have
$|A_1 \cup A_2 \cup A_3| = |A_1| + |A_2| + |A_3| - |A_1 \cap A_2| - |A_1 \cap A_3| - |A_2 \cap A_3| + |A_1 \cap A_2 \cap A_3|$

$\implies 4 \pi r^2 - A_T= 6 \pi r^2 - 2r^2(\alpha + \beta + \gamma) + A_T$
$\implies A_T = r^2(\alpha + \beta + \gamma - \pi)$

Thus we have shown the following:

Proposition:
The area of a triangle $A_T$ on a sphere of radius $r$ with angles $\alpha, \ \beta, \ \gamma$ is $A_T = r^2(\alpha + \beta + \gamma - \pi) .$

And there we have it! There’s our area. Oh! And also!

Corollary:
The sum of the interior angles of a triangle on a sphere must exceed $\pi$.

Isn’t that so cool? Being used all your life to the sum of the interior angles of a triangle being precisely 180 degrees — how do you feel seeing that now it’s mandatory it exceed 180 degrees?