A matrix applied again and again
The topic Inner products, norms and orthogonality gave us lengths, angles and projections. An orthogonal matrix keeps every length; a general one stretches some directions more than others. Which directions does it merely stretch? The question matters most when a matrix is applied again and again.
That situation is everywhere in ML. A linear recurrent network updates its hidden state as . A Markov chain moves a probability distribution forward one step at a time. An iterative algorithm multiplies a vector by the same matrix until it stops changing.
The running example of this topic is
Apply a few times:
The vector grows about fivefold per step, and the ratio of its coordinates creeps towards : first , then , then . Three questions follow. Does grow or shrink? Which direction does it approach? How fast?
For a diagonal matrix all three are easy, because it stretches each coordinate axis on its own:
This topic finds the directions in which any matrix acts like a diagonal one. Along the way we need the determinant: one number that says how a matrix scales volume and whether it can be inverted.