Linear Algebra · Linear transformation

Linear transformation

A linear transformation sends every vector to a new place while keeping its recipe: v = x î + y ĵ goes to x·Aî + y·Aĵ. So the two columns of the matrix — where î and ĵ land — decide where everything goes.

01

Linear transformations in this visualization

A linear transformation (also linear map) TT of the plane satisfies T(u⃗+w⃗)=T(u⃗)+T(w⃗)T(\vec u + \vec w) = T(\vec u) + T(\vec w) and T(cu⃗)=c T(u⃗)T(c\vec u) = c\,T(\vec u) for all vectors u⃗,w⃗\vec u, \vec w and every real number cc. Every such map is multiplication by a 2 × 2 matrix AA, and the columns of AA are the images of the basis vectors: Aı^A\hat\imath and Aȷ^A\hat\jmath. This page shows maps from the plane to itself.

The recipe is kept
v⃗=x ı^+y ȷ^⟹Av⃗=x Aı^+y Aȷ^\vec v = x\,\hat\imath + y\,\hat\jmath \quad\Longrightarrow\quad A\vec v = x\,A\hat\imath + y\,A\hat\jmath

In the picture the two ink arrows are the columns; drag their tips and the whole grid follows, because every point is reached by the same recipe as before. The blue vector v is walked twice: x steps along î and y along ĵ on the original grid (dashed), and x steps along Aî and y along Aĵ on the new one (solid), ending at Av. Reading the same product by rows — each entry of Av⃗A\vec v is a row of AA dotted with v⃗\vec v — gives the same numbers. The origin never moves. A line maps to a line or a point. An invertible transformation preserves parallel lines and equal spacing along a line, while lengths and angles can change.

When det⁡A=0\det A = 0 but A≠0A \ne 0, the plane collapses to a line. A line through the origin is sent to the origin: this is the kernel. When A=0A = 0, every point is sent to the origin, so the kernel is the whole plane. With Preimage, drag the output w to find where it came from. An invertible matrix gives one point A−1w⃗A^{-1}\vec w; a rank-one matrix gives a line if w lies on the image, and no preimage otherwise. For the zero matrix, the origin has the whole plane as its preimage; other points have none. Solving Ax⃗=b⃗A\vec x = \vec b is exactly this search.

02

Things to notice

  • Whether A is singular is decided exactly, from the numbers as you set them: a typed 1/3 is a third and 0.1 is a tenth, so [11/331]\left[\begin{smallmatrix}1 & 1/3\\ 3 & 1\end{smallmatrix}\right] flattens the plane, while a nearly singular matrix such as [1100.0001]\left[\begin{smallmatrix}1 & 1\\ 0 & 0.0001\end{smallmatrix}\right] is shown with its true, very large inverse. Entries with no exact decimal (√2, a 30° turn) are decided on their rounded values and the readout says so; a matrix that is singular only because √2·√2 = 2 then reads as invertible, with a tiny determinant.
  • The animation between two matrices is only a transition, one of many paths: a reflection passes through a flattened plane halfway, a turn by 180° does not shrink because turns are interpolated by angle. Nothing is read off during it.
xyOT(O)

Why a translation is not linear

Shift the whole grid 1 to the right and 0.5 up. Lines stay straight and parallel lines stay parallel, but the origin moves to (1, 0.5). A linear transformation must leave the zero vector at the origin: T(0)=0T(0)=0. This translation does not, so it is not linear. Fixing the origin alone is not enough: the addition and scaling rules above must also hold.

03

Controls

  • The matrix can also be typed in its brackets (from −10 to 10; decimals, fractions, √ and π) or set by its column keys and the two wheels; dragged tips catch on whole numbers and on points exactly in line with the other column (Snap turns this off).
  • Presentation mode opens a full-screen view for projectors: ← → step through the common matrices, H hides where vectors land.
04

Related

  • F01Linear combinationPlanned
  • F09Matrix multiplicationPlanned
  • F11DeterminantPlanned
  • F13EigenvectorPlanned
  • F07BasisPlanned
  • F03System of linear equationsPlanned

Further reading: Wikipedia: Linear map; Wikipedia: Transformation matrix.