# Matrix multiplication

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 thoughts on “Matrix multiplication”

1. Eponym says:

Eigenvector! This is fantastic 🙂

2. Thanks! A very interesting visualization indeed.