Linear Maps and Matrix Representations
Learning objectives
- Define a linear transformation and recognise it from its action on the standard basis
- Construct the matrix that represents a given linear map
- Compute the kernel (null space) and image (column space) of a matrix
- Connect injectivity to trivial kernel and surjectivity to full rank
The single most important fact in linear algebra is this: every linear map between finite-dimensional spaces is a matrix multiplication. Once you absorb this, all the geometric language of "rotations", "shears", "projections", and "stretches" becomes a single computational operation, multiply by an matrix, and all the questions you can ask about the map (is it injective? surjective? invertible?) become questions about that matrix. This compression is why linear algebra is the foundation of every applied discipline that crunches numbers.
The definition and the matrix
A linear transformation is a function satisfying and . The fundamental representation theorem says: every such can be written uniquely as for some matrix . The columns of are precisely the images of the standard basis vectors. Once you know where the basis vectors go, linearity forces everywhere.
Kernel and image
The kernel (or null space) of is . It measures how far is from being injective: if then is injective; if is larger, then many inputs collapse to zero (and to every other output value too). The image is the set of all outputs, equivalently, the column space of . The map is surjective iff its image equals the entire codomain .
Computing both
To find , row-reduce and solve for the free variables. To find , identify the pivot columns of ; their original counterparts form a basis for the column space. These two subspaces are related by the Rank-Nullity Theorem (§1.6): .
Use the matrix widget above to set a singular matrix, say columns and . The unit square collapses to a line: that is the image of . Any vector perpendicular to that line, e.g. , lies in the kernel. Notice that the rank (dimension of the image) is 1 and the nullity (dimension of the kernel) is 1, summing to 2 = number of input columns.
- Neural-network layers: A single dense layer is the affine map . The matrix is exactly the matrix of the linear part, trained by gradient descent on millions of examples. Modern transformers stack hundreds of these layers.
- Computer graphics: A rotation by angle in is the matrix \begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix}. Every pixel transformation in a game (translate, rotate, scale, project) is matrix multiplication done at 60 Hz.
- Robotics inverse kinematics: The end-effector pose of a robot arm is a non-linear function of the joint angles, but its derivative is the Jacobian matrix, a linear map from joint-velocity space to end-effector-velocity space. Inverting this matrix tells the robot how to move its joints to reach a target.
Pause and think: If is linear, can it possibly be injective? Use a dimension argument before reaching for a matrix calculation. (Hint: how many independent vectors can fit inside ?)
Try it
- Before writing the matrix, predict whether is injective. Then verify by computing where is the matrix of .
- Predict: what is the kernel of A = \begin{pmatrix} 1 & 2 \\ 2 & 4 \end{pmatrix}? Then row-reduce to verify.
- For , predict whether is surjective onto . Verify by checking the rank.
- Compute the matrix of the composition where and . Predict the entries by tracking where go.
A trap to watch for
Beginners often write the matrix of as \begin{pmatrix} a & c \\ b & d \end{pmatrix} (with rows holding the coefficients of and separately). This is the transpose of the correct matrix. The correct convention is: row of gives the -th output coordinate as a linear combination of the inputs. So A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}, with the first row encoding the first output. Equivalently, column is the image of . Getting this wrong silently inverts your geometry, a clockwise rotation will run counter-clockwise.
What you now know
You can write the matrix of any linear transformation, compute its kernel by row-reduction, and identify its image as the column space. The next section (§1.4) tackles bases and dimension: how to measure the size of a subspace and pick the most efficient coordinate system for a given problem.
Mark section complete →
References
- Garrity, T. (2002). All the Mathematics You Missed. Cambridge University Press, ch. 1, §1.3.
- Strang, G. (2016). Introduction to Linear Algebra (5th ed.). Wellesley-Cambridge, ch. 2 (linear transformations and matrices).
- Axler, S. (2015). Linear Algebra Done Right (3rd ed.). Springer, ch. 3 (linear maps).
- Hoffman, K., Kunze, R. (1971). Linear Algebra (2nd ed.). Prentice-Hall, ch. 3.
- Lay, D. C. (2015). Linear Algebra and Its Applications (5th ed.). Pearson, ch. 1 (matrix equations) and ch. 2.