Computing Library › Linear Algebra
Linear Algebra

Linear Transformations

Maps between vector spaces that respect addition and scaling; every one is represented by a matrix.

Definition

A function T between vector spaces is a linear transformation if it preserves the two operations: T(u + v) = T(u) + T(v) and T(cu) = c T(u) for all vectors and scalars. Equivalently, T(a u + b v) = a T(u) + b T(v). These conditions force T to send the zero vector to zero and to map lines to lines through the origin.

Matrices are transformations

Kronos motion — confinement scaling

Every linear transformation between finite-dimensional spaces, once bases are chosen, is given by a matrix: T(x) = A x. The columns of A are the images of the basis vectors. This correspondence is why linear algebra can study abstract maps through concrete matrix arithmetic, and why matrix multiplication corresponds exactly to composing transformations.

Geometric examples

Kernel and image

The kernel (null space) of T is the set of vectors it sends to zero, and the image (range) is the set of outputs it can produce. Their dimensions obey the rank-nullity theorem. T is one-to-one exactly when its kernel is trivial, and onto exactly when its image fills the target space; both hold together only for an invertible square matrix.

python
import numpy as np
theta = np.pi / 2
R = np.array([[np.cos(theta), -np.sin(theta)],
              [np.sin(theta),  np.cos(theta)]])
print(R @ np.array([1.0, 0.0]))   # rotates x-axis to y-axis

The physics operators in a simulation, gradients, curls, and time-evolution steps, are linear transformations, and representing them as matrices is what lets a computer advance a continuous field forward in time.