Courses / Computer Science I
Algebra

Linear Transformations

Computer Science I 302 words Free to read

Functions That Respect Structure

A linear transformation is a function TT between vector spaces that preserves the vector-space operations: T(u+v)=T(u)+T(v),T(cv)=cT(v).T(u + v) = T(u) + T(v), \qquad T(cv) = c\,T(v). In words, transforming a sum equals summing the transforms, and scaling before or after transforming gives the same result. Rotations, reflections, scalings, and projections are all linear; bending a line into a curve is not.

The central fact is that every linear transformation (between finite-dimensional spaces) is represented by a matrix, and applying the transformation is just matrix-times-vector multiplication: T(v)=AvT(v) = A v. This is why matrices are defined the way they are — a matrix is a linear transformation in coordinates. To find the matrix, see where the transformation sends the basis vectors; those images become its columns.

Because transformations are matrices, composing transformations (doing one then another) corresponds to multiplying their matrices — and since order matters for transformations (rotate-then-reflect \neq reflect-then-rotate), matrix multiplication is non-commutative, closing the loop with Lesson 4. Two structural quantities describe a transformation: its kernel (vectors sent to zero) and its image (vectors it can reach); a transformation is invertible exactly when its matrix is (nonzero determinant).

Linear transformations are everywhere in computing: graphics pipelines are chains of matrix transformations (rotate, scale, project a 3D scene to the screen); machine-learning layers are linear transformations followed by nonlinearities; and coordinate changes are transformations between bases.

Common pitfall: assuming every function of vectors is linear, or forgetting that a linear transformation must fix the origin and preserve both operations. A transformation that adds a constant shift (like T(v)=v+bT(v) = v + b with b0b \neq 0) is not linear — it moves the origin and fails T(u+v)=T(u)+T(v)T(u+v) = T(u)+T(v). Linearity is a strict requirement: both additivity and scaling must hold, which forces T(0)=0T(\mathbf{0}) = \mathbf{0}.

Practise this lesson

The explanation above is free to read. The graded practice for this lesson lives in the Tryals app.

9practice questions
2interactive scenes
Start Computer Science I free

Algebra