website/content/posts/hypercomplex-interest.md
Mira Kristipati cccc7eb1bd
Some checks are pending
/ test (push) Waiting to run
forgejo runner test
2025-01-23 16:19:40 -05:00

140 lines
7 KiB
Markdown
Executable file

---
draft: true
title: Hypercomplex Interest
summary: You know what, fuck you _rotates your interest rates 90°_
---
# Compound Interest
Y'all remember this from like 4th grade right, I barely do so here's a refresh
$$ z = Pe^{rt} $$
- \(P\) is your principal, or how much money you initially put in or took out
- \(r\) is the interest rate, you want this to be low if you're borrowing and high if you're lending
- \(t\) is time, unless you have a TARDIS, this one is pretty out of your control
- \(z\) is how much money you owe/are owed, I know this isn't the standard variable name but bear with me
Now let's make it spicy
# Complex Interest
Who says you need to have a real number for your interest rate? The Fed moves interest rates up and down all the time, when will those cowards start moving it left and right.
But first, what does it mean to move money to the left? \[Vsauce Sting]
Let's keep things simple for now and just rotate it around 0 like it's a circle
![The quantity $2 rotated 45 degrees about the origin, yielding a complex amount of money](Pasted%20image%2020240926154326.png)
We can represent this as a complex number in the form \(z=Pe^{i\theta}\), where \(\theta\) is some angle.
Hold on a second this looks kinda like the the interest rate formula from earlier. Let's add in time as a factor to get: \(z=Pe^{i\theta t}\).
Okay so we can see that this is basically just compound interest with an interest rate of \(\theta\).
What does this even mean, can I use this to get out of student loans? Do I owe MOHELA imaginary money?
Well I left out an important detail, \(Pe^{i\theta}=P\cos(t\theta)+iP\sin(t\theta)\)
The proof is trivial and would be left as an exercise to the reader but unfortunately I need to use it later on so here's why this works:
> [!TODO] Explain Euler's Identity here
So let's say I owe 1,000 USD at a 5% interest rate (I wish lmao), that would look like:
> [!TODO] Todo
That makes sense, but now let's look at what happens if we do \(5i\%\)
![A graph of compound interest at 5% vs 5i% interest rates](Pasted%20image%2020240926123001.png)
Well the real part ends up being
$$\Re(z)=P\cos(\frac\pi 2rt)$$
And the imaginary part ends up being
$$\Im(z)=P\sin(\frac\pi 2rt)$$
So if I wait about 30 years after my initial loan, I can owe none money with left bread, if I wait 60 years, MOHELA needs to double my money for free.
Honestly I think the stock market is a better investment strategy. But that seems a bit too based either way, so no wonder I can't get my loans refinanced like this
Hm.
_Morpheus voice_ what if I told you there's more than one way to rotate a cow?
> [!TIP] Okay listen closely because this next part is how I got my partner to fall for me
# Split-Complex Interest
Normally when you rotate something you move it in a circle, which is cool and all, but what if you can rotate it in the opposite of a circle?
![The quantity $2 hyperbolically rotated about the origin by 45 degrees, yielding a split-complex value](Pasted%20image%2020240926154245.png)
Introducing: the Hyperbola
![The unit circle (red), alongside the unit hyperbola(green)](Pasted%20image%2020240926154035.png)
So with the unit circle we had an equation like \(x^2+y^2=1\), well there's a unit Hyperbola too and the equation for that is \(x^2-y^2=1\).
There's actually a lot more stuff that circles have that have a hyperbolic equivalent.
Remember \(\sin\) and \(\cos\)? There's also a \(\sinh\) and \(\cosh\), don't ask me to explain these because we didn't cover them at all in high school.
Here's the big one that we care about though, we know multiplying something by \(i\) rotates it around a circle, there's actually a \(j\) that rotates something around a hyperbola.
But what exactly is this mysterious \(j\)?. It's shrimple as really, \(j=\sqrt{1}\).
> [!QUOTE] Isn't that just 1?
No. don't think about it too hard
> [!QUOTE] So what does \(e^{\theta j}\) break down into, if anything?
I wouldn't be asking this rhetorical if there wasn't a semi-interesting answer
It's actually \(Pe^{j\theta t} = P\cosh(t\theta)+jP\sinh(t\theta)\)
# Dual Interest rates
Okay this one isn't as interesting but I want to include it for completeness,
We have \(i=\sqrt{-1},\ j=\sqrt{1}\), now get ready for \(\varepsilon=\sqrt{0}\). I guess was taken when they invented this one?
> [!Todo] todo
while we're on the topic of dual numbers, lets try shoving \(x+\varepsilon\) into some functions for shits and giggles:
$$(x+\varepsilon)^2=x^2+2x\varepsilon+\varepsilon^2=2x\varepsilon$$
> [!quote] Okay that was a waste of time, was that supposed to be interesting?
Yes. I'm getting there
$$\sin(x+\varepsilon)=(x+\varepsilon)-\frac{(x+\varepsilon)^3}{3!}+\frac{(x+\varepsilon)^5}{5!}\ldots$$
Okay now lets expand that out
$$=(x+\varepsilon)-\frac{x^3+3x^2\varepsilon+3x\varepsilon^2+\varepsilon^3}{3!}+\frac{x^5+5x^4\varepsilon+10x^3\epsilon^2+10x^2\varepsilon^3+5x\varepsilon^4+\varepsilon^5}{5!}\ldots$$
of course \(\varepsilon\) to powers higher than 1 just ends up being zero so we can simplify this monstrosity down to
$$=x+\varepsilon-\frac{x^3+3x^2\varepsilon}{3!}+\frac{x^5+5x^4\varepsilon}{5!}$$
...except this still doesn't mean too much, lets try factoring \(\varepsilon\) out
$$(x-\frac{x^3}{3!}+\frac{x^5}{5!}+\ldots)+\varepsilon(1-\frac{x^2}{2!}+\frac{x^4}{4!})$$
$$=\sin(x)+-\cos(x)\varepsilon$$
> [!QUOTE] Hold on, what the shit? we the 'imaginary' part is the derivative?
Yeah actually. If you remember back to 8th grade,
$$f'(x)=\frac{d}{dx}f(x)=\lim_{h\to0}\frac{f(x+h)-f(x)}{h}$$
We can kinda replace \(h\to 0\) here with \(\varepsilon\) since it's basically an infinitely tiny number that's not zero or negative, which gives us
$$f'(x)=\frac{f(x+\varepsilon)-f(x)}{\varepsilon}$$
> [!note] Dividing by is sus as fuck, but just bear with me here
$$\varepsilon f'(x)=f(x+\varepsilon)-f(x)$$
$$f(x+\varepsilon)=f(x)=\varepsilon f'(x)$$
There you go, typesetting this was a bitch.
# Errata
## Matrix Representations
Fun fact, you can also represent \(i,j,\varepsilon\) as matrices too
Its already kinda standard to use \(\begin{bmatrix}1&0\\0&1\end{bmatrix}\) to cast real numbers into 2D matrices, but there's two zeros in there doing nothing, maybe we can yoink those for real estate.
Introducing:
$$i=\begin{bmatrix}0&1\\-1&0\end{bmatrix},\ j=\begin{bmatrix}0&1\\1&0\end{bmatrix},\ \varepsilon=\begin{bmatrix}0&1\\0&0\end{bmatrix}$$
These versions actually obey the same multiplication rules as our original derivations of the hypercomplex numbers. Now we can turn something like \(6+3j\) into \(\begin{bmatrix}6&3\\3&6\end{bmatrix}\)
## Colors
As somewhat of a convention, I use red, green, and blue in this post to differentiate between graphs relating to complex numbers, split-complex numbers, and dual numbers respectively
## Honey, I broke the concept of division!
Yeah... division doesn't really work right when you bring \(j\) and \(\varepsilon\) into the mix since you can multiply non-zero stuff and get zero out
$$\frac{1}{1+j}\cdot\frac{1}{1-j}=\frac{1}{1-j^2}=\frac{1}{1-1}=\frac10$$
$$\frac 1\varepsilon \cdot \frac 1\varepsilon=\frac 1{\varepsilon^2}=\frac 10$$