Matrix multiplication

matrix.jpg

Have you ever wondered what you are doing when you multiply a vector by a matrix?  There is a lot more to this idea than I will discuss here.  However, I wanted to share this image which gives quite a bit of geometric intuition.  The blue area represents a set of randomly generated points which lie within a circle of radius 1 which is centered at the origin.   I randomly generated a 2 by 2 matrix and multiplied the coordinates of all of the points shown in blue by that matrix.  The result was the coordinates of all the red points shown in the top left of the illustration.  If I again multiply all the red points in the previous image by the same matrix, I get the red points in the top center image.  If I repeat this process a few times I get the above illustration.  The orientation of the ellipse and the change in scale are related to the eigenvectors and eigenvalues of the matrix I generated.

When you multiply the points in a unit circle by a 2 by 2 matrix, the result is always an ellipse (possibly a circle) where the length of the major and minor axes are the eigenvalues of the matrix.  This idea generalizes to any m by n matrix which maps an m dimensional unit sphere to an n dimensional ellipsoid where the length of the axes of the ellipsoid are the square root of the eigenvalues of the matrix created by multiplying the m by n matrix by its transpose.

2 responses to “Matrix multiplication

  1. Eigenvector! This is fantastic :)

  2. Thanks! A very interesting visualization indeed.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s