BasicsA matrix with different numbers of rows and columns models a transformation between spaces of different sizes. For example, a 3-by-2 matrix takes 2D vectors from the flat plane and turns them into 3D vectors in space. The columns of the matrix tell you exactly where the basic 2D directions (i-hat and j-hat) end up in 3D. Using this rule, any 2D input can be mapped by combining those columns.
BasicsMatrices represent linear transformations, which are rules that stretch, rotate, shear, or squash space while keeping straight lines straight and the origin fixed. When you multiply matrices, you are chaining these transformations: first do one change to space, then do the next. Some transformations lose information by collapsing dimensions, like flattening a whole plane onto a line, and those cannot be undone.