A Matrix is a Transformation
Drag the four numbers and watch space itself rotate, stretch and shear. The columns of the matrix are simply where the two basis vectors land.
The Matrix
0 = untouched, 1 = fully transformed
Space, Transformed
det = 1.00Green is where the first basis vector lands, blue the second. The shaded patch was the unit square.
What It Does
Where the Basis Lands
These are exactly the two columns of the matrix. That is the whole trick: a matrix is a record of where the basis vectors go, and everything else follows.
A Matrix as a Transformation
The columns of a matrix show where the coordinate directions go, which explains matrix–vector multiplication.
What changes and what survives
Matrices can rotate, shear, stretch, reflect, or collapse space. A singular matrix loses a direction, so different inputs can map to the same output and no inverse can recover the original. For square matrices, determinant zero identifies singularity; rank counts the surviving independent directions. See determinants, rank, and eigenvectors.
Applying B and then A gives ABx: the rightmost matrix acts first on column vectors. Transformations generally do not commute, so reversing their order changes the result. A neural-network layer uses a linear map plus a bias; its activation function adds the nonlinearity.
Why a matrix is a linear map
A linear transformation preserves addition and scalar multiplication: A(u+v)=Au+Av and A(cv)=cAv. This is why the images of the standard basis vectors determine every output. For A=[[2,1],[0,1]], the first column says the x-axis unit vector maps to (2,0), while the second says the y-axis unit vector maps to (1,1). Combining 3 copies of the first image and 2 of the second gives A(3,2)=(8,2).
A translation such as x↦Ax+b is affine, not linear unless b=0, because it does not keep the origin fixed. Neural-network layers often use this affine map before a nonlinear activation. For column vectors, AB means B acts first and then A; the order matters because a shear followed by a rotation usually differs from the reverse. A singular map squashes at least one direction, so the output cannot uniquely determine the input. Use rank to count surviving directions and determinants for signed volume scaling.
Try this above
Apply a rotation, then a stretch, and compare with the same operations in reverse order. Watch the grid and the basis-vector readouts.
A practical way to verify a proposed matrix is to apply it to each standard basis vector. The first output must equal the first column and the second output the second column under the column-vector convention. This catches a common row-versus-column mistake. The determinant describes area change in two dimensions, but individual directions may still stretch by different amounts; eigenvectors and singular values expose those directions. A matrix's entries are therefore tied to a coordinate system, while the linear map is the underlying action.
The image of a grid reveals global behaviour, while basis-vector images identify the map algebraically. If two columns are parallel, the map collapses the plane to a line; if the columns are perpendicular unit vectors, the map is a rotation or reflection. Most matrices combine rotation, scaling, shear, and possibly collapse. Singular value decomposition separates these effects into orthogonal changes of coordinates and axis-wise stretching.
Sources and next steps
- MIT OpenCourseWare: Linear Algebra develops matrices as linear maps.
- See matrix multiplication for composition and basis and span for coordinates.
Overview
Read the columns
A linear map preserves sums and scaling. In two dimensions, knowing where the basis vectors (1, 0) and (0, 1) go determines where every vector goes. Those two destination vectors are the columns of the matrix:
For A = [[2, 1], [0, 1]], the basis directions map to (2, 0) and (1, 1). Thus A(3, 2) = 3(2, 0) + 2(1, 1) = (8, 2). The columns are not just a storage convention; they encode the transformation.