An Intuitive Introduction to Linear Algebra
- Steven Lehar
If you had trouble learning linear algebra, it was because it was not taught in pictures! Linear algebra is a highly spatial concept, it becomes intuitively obvious when you "see the picture" in your mind. There are several "problems" with the conventional "Gibbs" matrix notation that we all learned in school. First, the matrix is squashed into a two-dimensional representation to fit the printed page, even for a 3-dimensional matrix that actually represents a three-dimensional structure. Second, the matrix is indexed in (column, row) or (y,x) order, which is the reverse of the more familiar (row, column) or (x,y) order of Cartesian coordinates. Third, the matrix index starts 1, with row = (1,2,3...) whereas the Cartesian coordinates are indexed from zero in (0, 1, 2...) sequence. Fourth, vectors in Gibbs vector notation are summarized to the (x,y,z) coordinates of their endpoint, which obscures the fact that they actually represent a vector from the origin in that direction. It seems almost like a deliberate attempt to obscure the beautiful spatial concepts hidden in the spatial transforms of linear algebra. This demo shows how the counter-intuitive array of numbers encoded in the classical matrix of linear algebra relate to the beautiful spatial concepts that they truly represent, to reveal how the basic ideas behind linear algebra are beautifully simple and intuitive, easy for anyone to understand and appreciate.
First explore the effects of the magnitudes along the main diagonal. They represent orthogonal x,y,z vectors that scale any point by its x,y,z coordinates. See how they scale a single Point p=(1,1,1), and the Unit Box, then see how they stretch a cloud of random points in and out from the origin in x, y, and z directions. Next, turn on the off-diagonal terms, e.g. xymag (yellow), whose magnitude determines how much a point is skewed in the y direction based on its x coordinate. The higher its x coordinate, the more it gets skewed into y, and if its x coordinate is negative, it gets skewed in the negative y direction. Click the xyline checkbox to see the skew line represented by the xy term of the matrix. Next, try the Transposed checkbox. Set up an asymmetric matrix, for example press the [xy] preset button (yellow), then click Transposed, and see the rows and columns of the matrix reflected about the main diagonal. But the spatial effect of this transpose is to reverse the direction of skew. The transpose of xy is yx, it twists clockwise instead of counter-clockwise. That is the real meaning of a matrix transpose, it twists in the opposite direction, while its scale (determined by the xmag, ymag, zmag, values on the main diagonal, remains unchanged. Next try the Inverted checkbox. Start with the Identity matrix (click the [Identity] button) then use the xmag slider to scale the x coordinate by 2. (set xmag = 2). Turn on the Point Cloud (click Point Cloud checkbox) to see how the random cloud of points is stretched in the x direction. Now click Inverted, and the matrix is inverted. The inverse of 2 is 1/2, so now the point cloud is squashed to half its size in the x dimension. This is the inverse of the original matrix because if you applied a stretch-by-two followed by a squash-to-half tranform (in either order) that will undo the effect of the other matrix and leave all points unchanged. Now try inverting an off-diagonal term. Click the [x,y] button (yellow) to set the xymag value to 1, with the identity matrix. Now click the Inverted checkbox to see the inverse of that vector, which is reflected across the x axis. This is the inverse in the rotational sense, i.e. the counter-clockwise skew has been transformed into a clockwise skew.