Visualizing Matrices

Matrices are everywhere in Data Science. In fact, they are everywhere in Computational Science. Stanford’s Margot Gerritsen has a wonderful video on Visualizing Matrices.

First, she walks us through the basic structure of a matrix. Yes, a matrix consists of rows and columns. But it should be viewed as a system of equations with an underlying structural relationship among the coefficients.

Then, Gerritsen shows us a neat visualization trick called a “spy plot”: we turn every nonzero into a dot. This quickly reveals possible relationships among the coefficients.

Next, Gerritsen takes a matrix and represents it as a graph structure consisting of nodes and edges. Then comes the grand finale:

“Here’s an idea:

Give each node an electrical charge.
Make each edge a spring

Drop the whole system on the floor
and let it “wobble” until it finds its
optimal (minimal energy) state.”

Voila! The matrix now comes alive, revealing a range of beautiful forms. This is one of my favorite videos on the Internet.

Share this post:

Related Posts

Leave a Comment