Linear Transformations
What a matrix really does: it bends space
Every 2×2 matrix is a rule for transforming every point in a plane — stretching, rotating, shearing, or flipping it. Drag the sliders, or try a preset, and watch the whole grid warp in real time.
Positive determinant: space keeps its orientation — nothing gets flipped.
In more detail
A matrix can be seen as a function that moves every point of space. In two dimensions, a 2×2 matrix tells you where the two basic arrows go: its first column is where the arrow (1, 0) lands, and its second column is where (0, 1) lands. Every other point follows from these two.
Transformations of this kind include rotation, scaling, shearing, reflection and projection. They are called linear because they keep the origin fixed, keep straight lines straight, and keep grid lines parallel and evenly spaced. (When a bias is added, the operation is called affine.)
The determinant tells you by what factor areas change. A negative determinant means the orientation is flipped. A determinant of zero means the plane has been squashed onto a line or a point; information has been lost and the transformation cannot be undone.
Why this matters: the weight matrix of a layer applies a linear transformation to its input vector, in hundreds or thousands of dimensions rather than two. Layer after layer, these transformations reshape the space in which the model represents information. But several linear transformations in a row are equivalent to a single one, which is why networks also need the non-linear step explained next.
