Linear Map & Matrix Multiplication

Basis
Last updated: Tags: Linear Algebra

A matrix is not just a grid of numbers to be stored and retrieved — it encodes a function between vector spaces. Understanding this connection is the heart of linear algebra: every question about matrices is really a question about structure-preserving functions, and every such function can be captured by a matrix.

Linear maps

A linear map (also called a linear transformation) is a function T:VWT: V \to W between vector spaces over a field FF that respects the vector space operations. Precisely, TT is linear if for all u,vVu, v \in V and all cFc \in F:

  1. T(u+v)=T(u)+T(v)T(u + v) = T(u) + T(v)  (additivity)
  2. T(cu)=cT(u)T(cu) = c \cdot T(u)  (homogeneity)

These two conditions together are called linearity. They can be combined into the single equivalent condition: for all u,vVu, v \in V and all c,dFc, d \in F,

T(cu+dv)=cT(u)+dT(v).T(cu + dv) = c\,T(u) + d\,T(v).

In other words, TT preserves linear combinations. A map that satisfies linearity “plays nicely” with the structure of the vector spaces on both sides.

Immediate consequences

Two important properties follow at once from linearity:

  • T(0V)=0WT(\mathbf{0}_V) = \mathbf{0}_W. (Set c=0c = 0 in homogeneity.)
  • T(v)=T(v)T(-v) = -T(v). (Apply homogeneity with c=1c = -1.)

A linear map must always send the zero vector to the zero vector; if you find a function TT with T(0)0T(\mathbf{0}) \ne \mathbf{0}, it is not linear.

Examples

  • Scaling: T:RRT: \mathbb{R} \to \mathbb{R}, T(x)=cxT(x) = cx for a fixed constant cc — scaling by cc is linear.
  • Rotation in R2\mathbb{R}^2: rotating every vector by a fixed angle θ\theta is a linear map on R2\mathbb{R}^2.
  • Projection: T:R3R3T: \mathbb{R}^3 \to \mathbb{R}^3 defined by T(x,y,z)=(x,y,0)T(x, y, z) = (x, y, 0) is linear — it projects onto the xyxy-plane.
  • The zero map: T(v)=0T(v) = \mathbf{0} for all vv is trivially linear.

Representing a linear map by a matrix

Fix a basis B={e1,,en}\mathcal{B} = \{e_1, \ldots, e_n\} of VV and a basis C={f1,,fm}\mathcal{C} = \{f_1, \ldots, f_m\} of WW. Because TT is linear, the entire map is determined by where it sends the basis vectors. Every vVv \in V can be written uniquely as v=j=1nxjejv = \sum_{j=1}^n x_j e_j, and then

T(v)=j=1nxjT(ej).T(v) = \sum_{j=1}^n x_j\, T(e_j).

So knowing T(e1),,T(en)T(e_1), \ldots, T(e_n) is enough to know TT on all of VV. Write each image T(ej)T(e_j) in coordinates with respect to the basis of WW:

T(ej)=i=1maijfi.T(e_j) = \sum_{i=1}^m a_{ij}\, f_i.

The matrix of TT (with respect to B\mathcal{B} and C\mathcal{C}) is the m×nm \times n matrix AA whose jj-th column is the coordinate vector of T(ej)T(e_j). The entry aija_{ij} sits in row ii, column jj.

Matrices as linear maps

Conversely, every m×nm \times n matrix AA over FF defines a linear map TA:FnFmT_A: F^n \to F^m by

TA(x)Ax,xFn,T_A(x) \coloneqq Ax, \quad x \in F^n,

where xx is treated as a column vector. The ii-th entry of AxAx is j=1naijxj\sum_{j=1}^n a_{ij} x_j — the dot product of the ii-th row of AA with xx. You can verify that TAT_A satisfies linearity directly from this formula.

Matrix multiplication as composition

Suppose you have two linear maps:

T:UVwith matrix A,S:VWwith matrix B.T: U \to V \quad \text{with matrix } A, \qquad S: V \to W \quad \text{with matrix } B.

Their composition ST:UWS \circ T: U \to W is also a linear map. What is its matrix?

If AA is n×pn \times p (so T:FpFnT: F^p \to F^n) and BB is m×nm \times n (so S:FnFmS: F^n \to F^m), then the matrix of STS \circ T is the m×pm \times p matrix BABA, where

(BA)_{ij} \coloneqq \sum_{k=1}^{n} b_{ik}\, a_{kj}. \tag{1}

This is the definition of matrix multiplication. You compute the (i,j)(i,j) entry of BABA by taking the dot product of the ii-th row of BB with the jj-th column of AA. Notice the order: the matrix of STS \circ T is BABA, not ABAB — the rightmost matrix corresponds to the map applied first.

For this product to be defined, the number of columns of BB must equal the number of rows of AA (both equal nn above, the dimension of the intermediate space VV).

Non-commutativity

Matrix multiplication is not commutative in general: even when both products ABAB and BABA are defined and have the same shape (which requires AA and BB to both be square of the same size), you typically have ABBAAB \ne BA. This reflects the fact that performing two transformations in different orders usually gives different results.

Associativity

Matrix multiplication is associative: (AB)C=A(BC)(AB)C = A(BC) whenever the dimensions are compatible. This follows from the associativity of function composition: (ST)U=S(TU)(S \circ T) \circ U = S \circ (T \circ U).

The vector space of linear maps

The set of all linear maps from VV to WW, written L(V,W)\mathcal{L}(V, W), is itself a vector space. You define addition and scalar multiplication pointwise:

  • (S+T)(v)S(v)+T(v)(S + T)(v) \coloneqq S(v) + T(v)
  • (cT)(v)cT(v)(cT)(v) \coloneqq c\,T(v)

Both operations produce linear maps, and all vector space axioms hold. Under the correspondence between linear maps and matrices (once bases are fixed), L(V,W)\mathcal{L}(V, W) is isomorphic to Mm,n(F)M_{m,n}(F).

Summary

  • A linear map T:VWT: V \to W satisfies T(cu+dv)=cT(u)+dT(v)T(cu + dv) = cT(u) + dT(v) for all vectors and scalars.
  • It always sends 0V\mathbf{0}_V to 0W\mathbf{0}_W, and its behavior is entirely determined by where it sends a basis.
  • Every linear map between finite-dimensional spaces has a matrix representation: the columns are the images of basis vectors expressed in coordinates.
  • Conversely, every matrix AA defines a linear map via xAxx \mapsto Ax.
  • Matrix multiplication (BA)ij=kbikakj(BA)_{ij} = \sum_k b_{ik} a_{kj} corresponds exactly to the composition of linear maps — apply AA first, then BB.
  • Matrix multiplication is associative but not commutative in general.
  • L(V,W)\mathcal{L}(V, W) is a vector space under pointwise operations, isomorphic to Mm,n(F)M_{m,n}(F).