prerat Profile picture
Sep 21, 2021 22 tweets 7 min read Read on X
intro to "bouncy numbers"! 🧵

(I have been wanting to explain this for a while, and I don't think my current explaining approach is perfect, but it's good to start with something!)

there's a punchline, but I'm gonna start by introducing "bouncy numbers" as their own thing

1/
a regular number sits on the number line and it sits still.

for example, here is the number 1.

(see, no bouncing!)
a "bouncy" number moves as if it were attached to an (ideal) spring.

here's a "bouncy" 1.

notice how it starts on the number line at 1, then swing over through 0 and eventually to -1, then swings back and starts over.
bouncy numbers have two important properties:

1. magnitude: what is the furthest distance it reaches towards the positive side?

2. phase: at what *time* does it reach that furthest positive distance?

if bouncy numbers only had magnitude, they'd be just like regular numbers.
here's an example of two "bouncy" numbers that are slightly out of phase.

they both have a magnitude of 1 - that's the furthest positive number that they each bounce to - but they hit that furthest extension at *different* times.
if one bouncy number is maximally positive while another is maximally negative, then they have *opposite* phases.
you can add bouncy numbers!

if they have the same phase (in sync), then you just add their magnitudes and the sum will also have that same phase.

but what if you want to add two bouncy numbers with *different* phases?
you can still add bouncy numbers with different phases.

just move the whole number line from one bouncy number (green) and "glue" its center to the tip of the other bouncy number (blue)

now that whole (green) number line bounces!

then just watch the green tip - that's the sum
one more example:

if you add two numbers with the same magnitude and opposite phases, you'll get zero!

zero is the only bouncy number that doesn't actually bounce :(
so what's the deal with "bouncy" numbers?

well, they're the same thing as the complex numbers!

you can write a complex number as a+bi, but you can *also* write that same complex number as a magnitude and a phase. it's polar coordinates!

en.wikipedia.org/wiki/Polar_coo…
but still, why the bouncing?

usually, we visualize complex numbers in two dimensions: the real part as the horizontal axis, and the imaginary part as the vertical axis

the problem with the normal way is it that takes two dimensions to represent a single number!
a common use case for complex numbers is in linear algebra - where a vector has a complex number for each of several dimensions

for a regular, real-valued vector space, a vector is just an arrow pointing somewhere in space. it has a magnitude and a direction.
with "bouncy" numbers, we can get "bouncy" vectors!

a "bouncy" vector has a magnitude, a direction, *and* a phase.

you can take any real vector, make it "bounce" through the origin as if on an ideal spring (i.e. simple harmonic motion), and you now have a "bouncy" vector!
you can write a real vector using one number for each dimension as coordinates

same thing with bouncy vectors, but each dimension gets a bouncy number coordinate!
when you add two "bouncy" numbers, you always get another similar-looking "bouncy" number



that's not the case for "bouncy" vectors, though! you can get something different-looking than just a bounce along a straight line!
if you add two "bouncy" vectors that have different directions *and* different phases, you get something exciting

it's no longer a boring straight-line bounce - now it spins around the origin!
tangent: i was thinking about this "bouncy vector" thing in the middle of the night, and i asked @mousr8 what you would get if you added the blue and green vectors above (i wasnt sure) and she said "an ellipse!" and turns out all bouncy vectors are ellipses (line = flat ellipse)
another neat thing is that the projection of a bouncy vector is exactly what you think it'd be.

e.g. the vertical component of the circle above is the bouncing vertical "shadow," and the horizontal component is the bouncing horizontal "shadow"
if you don't have animation software available, you can still draw "bouncy" numbers and "bouncy" vectors.

just draw the path of the bounce, and put an arrow where the dot is at time t=0 (pointing in the direction it will travel)
you can use a 2d "bouncy" vector to represent a qubit!

i started thinking about this because i was upset that the bloch sphere didn't let me visualize the global phase (and it didn't seem at all straightforward to get to a 4-d complex qubit pair)

en.wikipedia.org/wiki/Bloch_sph…
ok this is it for now.

i wrote this up because i saw tim's "brain crack" tweet and this is what i thought of, so thanks tim!

I wanted to keep this thread formula-free, so it's not so scary for people with less math experience

but I will probably do a follow up thread soon with formulas

real quick tho, for those curious:
the "bouncy" animation for any complex z is just Re{ z * e^(it) } for t=[0,2π).

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with prerat

prerat Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @prerationalist

Mar 12, 2023
writing is easy but it's also hard

since covid started, i wrote over 19000 tweets but i wrote zero blog posts

so i guess i'll write a blog post about that
when i was a kid, i would just write and write

at some point it just ... stopped

it's so easy for years and years to go by and you think about doing something a lot but it never happens

but it turns out, there's a phase shift that can happen where suddenly u write 19K tweets
it's probably different for everyone

for me it's about overcoming perfectionism
for me it's about getting started

for me, this rly helps:
- your 1st attempt doesnt have to be perfect
- your 2nd attempt doesnt have to be perfect
- your 100th attempt doesnt have to be perfect
Read 4 tweets
Nov 15, 2022
yesterday i ran a poll with a coin flip trolley problem.

unfortunately, the clear majority answer leads to EVERYONE dying with 100% probability!!

what happened??

1/
2/

here's the poll. i took @ole_b_peters' excellent coin flip betting scenario and recast it as a trolley problem

it's an example of a problem where the expected value and the long-run average are NOT the same! this blew my mind when i first heard it

3/

the expected value calculation is simple

50% chance of gaining 50% (×150%)
50% chance of losing 40% (×60%)
→ 0.5×1.5 + 0.5×0.6 = 1.05

so on average, the expected GAIN is 5% per coin flip

so how can that possibly lead to LOSING 100% with 100% probability??
Read 10 tweets
Nov 15, 2022
REQUEST FOR EVERYONE

pls put a good URL or other backup contact in your bio today!!

then tomorrow we can all use @mechanical_monk's listfollowers.com to download a CSV of all our mutuals WITH good backup contact link!
previously we've done like "hey DM me if you wanna stay in touch if twitter crashes" but the problem is that requires everyone to message everyone which is a ton of work & i didn't do it

vs this strategy just requires everyone to do 1 thing once (update their bio)

O(N) vs O(N²)
i don't think twitter is in huge danger of crashing tbh

but this would be a nice CSV for us all to have years in the future, & now is a good schelling moment to put it together
Read 4 tweets
Mar 24, 2022
*gestures surreptitiously*

hey

hey u

wanna see some rare impossible qualia
STYGIAN BLUE

it's blue, but it's as dark as black

"impossible" because how could a fully dark color have any saturation/color??
similarly, here you can see a red that's as bright as pure white

(again, look at the left for 20-60s, then switch over to the right)
Read 4 tweets
Dec 30, 2021
How A Log Market Scoring Rule Works thread

i was gonna do this at some point, now seems like a good time


0/
if you're not familiar with prediction markets in general, see this quick reply thread i just did with an overview

a log market scoring rule implements the market part of a prediction market. it's great because it's automated & always liquid



1/
to quickly recap, the first piece of a prediction market is a "conditional ATM"

you put in regular money, and it prints out "conditional money"

e.g. for a single yes/no event, you can put in $1 of regular money and get out both Y$1 (worth $1 if "yes") and N$1 (worth $1 if "no") illustration of "conditional ATM" which takes in $
Read 16 tweets
Dec 30, 2021
my favorite thing is when poasters end their feuds and become bros
inspired by @taalumot & @deepfates
Read 4 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(