Posts tagged with affine

Dmitri Tymoczko — author of The Geometry of Music

• how to make visual representations of music
• (in paintings, video games, sculpture)
• 5 constraints on a composition that are necessary (but not sufficient) for it to sound good
• global statistical properties of songs
• why 20th century classical music had little audience
• a random painting is much less offensive to the eye than random notes are to the ear
• "I came up with these 5 principles using my brain, which is a kind of crude statistical device”
• the piano is essentially a line
• [NB: linear ⊃ monotonic ⊃ totally ordered]
• violin/voice musicians know that notes ⊂ continuous space, but the piano does us a favour by constraining us to a subset of those notes
• line mod 13 = circle
• (equivalence classes of octaves — A1=A2=A9 and E4=E7=E12 etc.)
• directed segments, unordered tuples
• musical translation = mathematical transposition, musical inversion = mathematical rotation
• The fact that most people don’t have most perfect pitch (things sound the same in different keys) may be so that we can understand that, despite pitch differences in male/female adults’ speech and children’s speech, they are saying the same words.
• "It’s as if we couldn’t tell the difference between red and blue, but we were highly sensitive to the-difference-between-red-and-orange and the-difference-between-blue-and-green.
• [Also: this.]
• Minor vs major is the other isometry of the circle (besides rotation): reflection.
• "Harmonic progression is like zone defence"
• Minute 26: Awesome. Watch how to move around in 2-chord space — seen on a circle and on Tymoczko’s grid

## What is an eigenvector?

The eigenvectors of a matrix summarise what it does.

1. Think about a large, not-sparse matrix. A lot of computations are implied in that block of numbers. Some of those computations might overlap each other—2 steps forward, 1 step back, 3 steps left, 4 steps right … that kind of thing, but in 400 dimensions. The eigenvectors aim at the end result of it all.

2. The eigenvectors point in the same direction before & after a linear transformation is applied. (& they are the only vectors that do so)

For example, consider a shear $\dpi{300} \bg_white \begin{bmatrix} 1 & ^3 \! / \! _{11} \\ 0 & 1 \end{bmatrix}$ repeatedly applied to ℝ².

In the above,   and $\dpi{300} \bg_white \mathbf{eig}_2 = \mathbf{eig}_1$. (The red arrow is not an eigenvector because it shifted over.)

3. The eigenvalues say how their eigenvectors scale during the transformation, and if they turn around.

If λᵢ = 1.3 then |eig| grows by 30%.
If λᵢ = −2 then  doubles in length and points backwards. If λᵢ = 1 then |eig| stays the same. And so on. Above, λ₁ = 1 since  stayed the same length.

It’s nice to add that $\normal \dpi{300} \bg_white \prod_i \lambda_i = \det \left| \text{matrix} \right|$ and $\normal \dpi{300} \bg_white \sum_i \lambda_i = \rm{trace} \left( \text{matrix} \right)$.

For a long time I wrongly thought an eigenvector was, like, its own thing. But it’s not. Eigenvectors are a way of talking about a (linear) transform / operator. So eigenvectors are always the eigenvectors of some transform. Not their own thing.

Put another way: eigenvectors and eigenvalues are a short, universally comparable way of summarising a square matrix. Looking at just the eigenvalues (the spectrum) tells you more relevant detail about the matrix, faster, than trying to understand the entire block-of-numbers and how the parts of the block interrelate. Looking at the eigenvectors tells you where repeated applications of the transform will “leak” (if they leak at all).

To recap: eigenvectors are unaffected by the matrix transform; they simplify the matrix transform; and the λ's tell you how much the |eig|’s change under the transform.

Now a payoff.

### Dynamical Systems make sense now.

If repeated applications of a matrix = a dynamical system, then the eigenvalues explain the system’s long-term behaviour.

I.e., they tell you whether and how the system stabilises, or … doesn’t stabilise.

Dynamical systems model interrelated systems like ecosystems, human relationships, or weather. They also unravel mutual causation.

### What else can I do with eigenvectors?

• helicopter stability
• quantum particles (the Von Neumann formalism)
• guided missiles
• PageRank 1 2
• the fibonacci sequence
• eigenfaces
• graph theory
• mathematical models of love
• electrical circuits
• JPEG compression 1 2
• markov processes
• operators & spectra
• weather
• fluid dynamics
• systems of ODE’s … well, they’re just continuous-time dynamical systems
• principal components analysis in statistics
• for example principal components (eigenvalues after varimax rotation of the correlation matrix) were used to try to identify the dimensions of brand personality

Plus, maybe you will have a cool idea or see something in your life differently if you understand eigenvectors intuitively.

## Why Fahrenheit is Better than Celsius

Astute reader wargut responded to yesterday’s observation about the Fahrenheit scale being affine-ish with the following incorrect assertion:

Seriously, guys, your system is bullsh~t.

It’s on.

First, the Kelvin scale is indisputably the best of {K,℉,℃} for physics. Given that ∃ a natural zero it should be reflected in the measurement system.

But Fahrenheit is the best scale for everyday use. We are not in the science lab, so all of Centigrade’s properties that are nice in chemistry class don’t matter.

Celsians brag that 0 ℃ and 100 ℃ make it easy to remember where water boils and freezes. So what? Fahrenheit makes it easy to remember the temperature of the human body and icy seawater. Or roughly the hottest day and the coldest day.

Outdoor temperatures in Indiana range from −17 ℃ on the coldest day of winter to 39 ℃ on the hottest day of summer. During the seasons I would be outdoors for more than the necessary minimum—March to November—the daily highs are between 7℃ and 29 ℃.

So most of the relevant temperature variation — the vast differences throughout all of spring, summer, and fall—are restricted to only 23 integers. (I could use decimals, if I wanted to sound like a robot.)

When I lived in ℃ places I had to pay attention to single-digit differences like 24 ℃ versus 29 ℃, wasting the first digit.

In Fahrenheit I get the basic idea with the first digit.

• "It’s in the thirties" = multiple layers and coat.
• "It’s in the nineties" = T shirt weather.

In the 70’s and 80’s I want a second sig-fig but I don’t even need 10 elements of precision. Just “upper 70’s” is enough. The first ℉ digit gives you ballpark, and the second ℉ digit gives you even more precision than you need.

In a sentence: Fahrenheit uses its digits more efficiently than Centigrade. Centigrade adopts the decimal convention but then throws away 70% of the range. Fahrenheit’s gradations are so well tuned that it only requires {0,1,2,3,4,5,6,7,8,9} × {low, medium, high}, for a cognitive savings of 7 unneeded numbers in each of 9 decades.

Celsius may be better for chemistry. Fahrenheit is better for real life.

## What’s half of 100 degrees Fahrenheit?

Hint: it’s not 50 degrees Fahrenheit.

100 ℉ = 311 K, half of which is 105.5 K = −180℉

$\large \dpi{200} \bg_white \begin{matrix} 100 \, ^{\circ} \rm{F} & \longrightarrow & 311 \, \rm{K} \\ \\ && \downarrow \\ \\ -180 \, ^{\circ} \rm{F} & \longleftarrow & 155 \, ^1\!\!/\!_2 \, \rm{K} \end{matrix}$

Yup — half of 100℉ is −180℉.

The difference between the Kelvin scale ℝ⁺ and the Fahrenheit scale is like the difference between a linear scale and an affine scale.

You were taught in 6th form that y = mx + b is a “linear” equation, but it’s technically affine. The +b makes a huge difference when the mapping is iterated (like a Mandelbrot fractal) or even when it’s not, like in the temperature example above.

(The difference between affine and linear is more important in higher dimensions where y = Mx means M is a matrix and y & x vectors.)

Abstract algebraists conceive of affine algebra and manifolds like projective geometry — “relaxing the assumption” of the existence of an origin.

(Technically Fahrenheit does have a bottom just like Celsius does. But I think estadounidenses conceive of Fahrenheit being “just out there” while they conceive of Celsius being anchored by its Kelvin sea-floor. This conceptual difference is what makes Fahrenheit : Celsius :: affine : linear.)

It’s completely surprising and rad that mere linear equations can describe so many relevant, real things (examples in another post). Affine equations — that barely noticeable +b — do even more, without reaching into nonlinear chaos or anything trendy sounding like that.