Skip to content
Home › Math lessons › College › Vector Spaces and Linear Transformations: math lesson, College

Vector Spaces and Linear Transformations: math lesson, College – download the PDF

  • by
Rate this post
Math lessons College : Vector Spaces and Linear Transformations — Zyro the alien explorer of Planète Maths

Linear algebra is the language of data, graphics, networks, and differential equations. Its central idea is simple: many different objects (arrows, polynomials, matrices, functions) obey the same rules of addition and scaling, so one theory describes them all. In this chapter you will learn to recognize these spaces, measure their size, and understand the maps between them.

1. Vector spaces and subspaces

Vector space

A vector space over \(\mathbb{R}\) is a set \(V\) with two operations, addition \(u+v\) and scalar multiplication \(cu\), that never leave \(V\) and satisfy the usual rules: addition is commutative and associative, there is a zero vector \(\mathbf{0}\), every \(v\) has an opposite \(-v\), and scalars distribute over sums and over each other, with \(1\cdot v = v\).

Typical examples are \(\mathbb{R}^n\), the set \(P_n\) of polynomials of degree at most \(n\), the set \(M_{m\times n}\) of \(m\times n\) matrices, and the set of continuous functions on an interval.

Subspace

A subset \(W\) of a vector space \(V\) is a subspace when \(W\) is itself a vector space under the operations of \(V\).

Subspace test

A subset \(W \subseteq V\) is a subspace if and only if (i) \(\mathbf{0}\in W\), (ii) \(u+v\in W\) whenever \(u,v\in W\), and (iii) \(cu\in W\) whenever \(u\in W\) and \(c\in\mathbb{R}\).

Example 1: a plane through the origin

Let \(W=\{(x,y,z)\in\mathbb{R}^3 : x+2y-z=0\}\). First, \(0+0-0=0\), so \(\mathbf{0}\in W\). If \((x_1,y_1,z_1)\) and \((x_2,y_2,z_2)\) are in \(W\), adding the two equations gives \((x_1+x_2)+2(y_1+y_2)-(z_1+z_2)=0\), so the sum is in \(W\). Multiplying the equation by \(c\) shows that \(cu\in W\). Hence \(W\) is a subspace. By contrast, the set \(x+2y-z=1\) is not a subspace because it does not contain \(\mathbf{0}\).

-3-2-1123-3-2-1123O(2, 1)(0, 1)

Violet: the line \(y=x/2\), a subspace of \(\mathbb{R}^2\). Orange: the line \(y=x+1\), which misses the origin and is not a subspace.

Common mistake

Checking closure is not enough: always check that the zero vector belongs to the set. Also, the union of two subspaces is usually not a subspace: the \(x\)-axis together with the \(y\)-axis contains \((1,0)\) and \((0,1)\) but not their sum \((1,1)\).

2. Span and linear independence

Span and independence

The span of vectors \(v_1,\dots,v_k\) is the set of all linear combinations \(c_1v_1+\dots+c_kv_k\). It is always a subspace. The vectors are linearly independent if the only solution of \(c_1v_1+\dots+c_kv_k=\mathbf{0}\) is \(c_1=\dots=c_k=0\); otherwise they are linearly dependent.

Method: testing independence in \(\mathbb{R}^n\)

  1. Write the vectors as the columns of a matrix \(A\).
  2. Row reduce \(A\) to echelon form.
  3. The vectors are independent exactly when every column contains a pivot.
Example 2: a dependent family

Take \(v_1=(1,2,3)\), \(v_2=(0,1,1)\), \(v_3=(1,3,4)\). Notice that \(v_1+v_2=(1,3,4)=v_3\), so \(v_1+v_2-v_3=\mathbf{0}\) is a nontrivial relation. The family is dependent, and \(v_3\) lies in the span of \(v_1\) and \(v_2\). Removing \(v_3\) leaves two independent vectors, because neither is a multiple of the other.

Common mistake

Any family containing \(\mathbf{0}\) is dependent, and two vectors are dependent exactly when one is a multiple of the other. Pairwise checks are not enough for three or more vectors: in Example 2 no two vectors are multiples of each other, yet the three together are dependent.

3. Basis and dimension

Basis

A basis of \(V\) is a family that is linearly independent and spans \(V\). Every vector of \(V\) can then be written in exactly one way as a combination of the basis vectors.

Dimension

All bases of a finite-dimensional space \(V\) contain the same number of vectors; this number is the dimension \(\dim V\). If \(\dim V=n\), then any \(n\) independent vectors form a basis, any \(n\) spanning vectors form a basis, and any family with more than \(n\) vectors is dependent.

Familiar dimensions: \(\dim\mathbb{R}^n=n\), \(\dim P_n=n+1\) (basis \(1,x,\dots,x^n\)), and \(\dim M_{m\times n}=mn\).

Example 3: a basis of a plane

In Example 1, the condition \(x+2y-z=0\) gives \(z=x+2y\), so \((x,y,z)=x(1,0,1)+y(0,1,2)\). The vectors \((1,0,1)\) and \((0,1,2)\) are independent and span \(W\), so they form a basis and \(\dim W=2\): the plane has two dimensions, as it should. The free variables \(x\) and \(y\) count the dimension.

4. Null space and column space

Two subspaces attached to a matrix

For an \(m\times n\) matrix \(A\), the null space is \(\mathrm{Nul}(A)=\{x\in\mathbb{R}^n : Ax=\mathbf{0}\}\), a subspace of \(\mathbb{R}^n\). The column space \(\mathrm{Col}(A)\) is the span of the columns of \(A\), a subspace of \(\mathbb{R}^m\). The rank of \(A\) is \(\dim\mathrm{Col}(A)\), and the nullity is \(\dim\mathrm{Nul}(A)\).

Method: finding bases

  1. Row reduce \(A\) to reduced echelon form.
  2. For \(\mathrm{Nul}(A)\): solve \(Ax=\mathbf{0}\), give each free variable a parameter, and read off one basis vector per free variable.
  3. For \(\mathrm{Col}(A)\): take the columns of the original matrix \(A\) that sit in the pivot positions.
Example 4: both spaces for one matrix

Let \(A=\begin{pmatrix}1&2&1&3\\2&4&3&8\\1&2&0&1\end{pmatrix}\). Row reduction gives \(\begin{pmatrix}1&2&0&1\\0&0&1&2\\0&0&0&0\end{pmatrix}\). The pivots are in columns 1 and 3, so \(\mathrm{Col}(A)\) has basis \((1,2,1)\) and \((1,3,0)\), and the rank is 2. The free variables are \(x_2=s\) and \(x_4=t\); then \(x_1=-2s-t\) and \(x_3=-2t\), so \(\mathrm{Nul}(A)\) has basis \((-2,1,0,0)\) and \((-1,0,-2,1)\), and the nullity is 2.

5. The rank-nullity theorem

Rank-nullity theorem

For an \(m\times n\) matrix \(A\), \[\operatorname{rank}(A)+\operatorname{nullity}(A)=n,\] the number of columns. Equivalently, for a linear map \(T:V\to W\), \(\dim\ker T+\dim\operatorname{range}T=\dim V\).

Domain ℝ⁵Codomain ℝ⁴Null spacedimension 2Remaining partdimension 3Column spacedimension 30T2 + 3 = 5 = dimension of the domain

The theorem says that the dimensions of the domain are shared between what is crushed to zero (the null space) and what survives (the column space). In Example 4, \(2+2=4\), the number of columns of \(A\).

Zyro’s tip

Zyro, the alien explorer, counts the “lost directions” first: with \(n\) columns and \(r\) pivots, exactly \(n-r\) free variables remain, and that is the dimension of the null space. Count free variables and you have the nullity for free!

Common mistake

The \(n\) in the theorem is the number of columns (the dimension of the domain), not the number of rows. A \(3\times 5\) matrix of rank 2 has nullity \(5-2=3\).

6. Linear transformations

Linear transformation

A map \(T:V\to W\) is linear if \(T(u+v)=T(u)+T(v)\) and \(T(cu)=cT(u)\) for all \(u,v\in V\) and \(c\in\mathbb{R}\). In particular \(T(\mathbf{0})=\mathbf{0}\). Its kernel is \(\ker T=\{v : T(v)=\mathbf{0}\}\) and its range is \(\{T(v): v\in V\}\).

Every linear map \(T:\mathbb{R}^n\to\mathbb{R}^m\) is multiplication by a unique matrix \(A\), whose \(j\)-th column is \(T(e_j)\). Then \(\ker T=\mathrm{Nul}(A)\) and the range is \(\mathrm{Col}(A)\). The map is one-to-one exactly when \(\ker T=\{\mathbf{0}\}\), and onto exactly when the rank equals \(m\).

Example 5: finding a matrix

Let \(T(x,y)=(x+y,\,2x-y,\,3y)\). Then \(T(e_1)=T(1,0)=(1,2,0)\) and \(T(e_2)=T(0,1)=(1,-1,3)\), so \(A=\begin{pmatrix}1&1\\2&-1\\0&3\end{pmatrix}\). The two columns are independent, so the rank is 2 and, by rank-nullity, the nullity is \(2-2=0\): \(T\) is one-to-one. It is not onto \(\mathbb{R}^3\), since the rank is 2, not 3. Note that \(T(0,0)=(0,0,0)\), as every linear map requires; the map \(S(x,y)=(x+1,y)\) is therefore not linear.

-11234-1123e1e2T(e1)T(e2)T(1,1)

The matrix with columns \((2,0)\) and \((1,1)\) maps the unit square to a parallelogram. Its area is \(|\det|=2\), so areas are doubled.

7. Change of basis

A vector can be described by different lists of numbers, depending on the basis you choose. If \(B=\{b_1,\dots,b_n\}\) is a basis of \(\mathbb{R}^n\), the coordinates of \(v\) in \(B\) are the numbers \(c_1,\dots,c_n\) with \(v=c_1b_1+\dots+c_nb_n\); we write \([v]_B=(c_1,\dots,c_n)\).

Change of basis

Let \(P\) be the matrix whose columns are \(b_1,\dots,b_n\). Then \(v=P[v]_B\), that is \([v]_B=P^{-1}v\). If \(T\) has standard matrix \(A\), its matrix in the basis \(B\) is \([T]_B=P^{-1}AP\).

Example 6: coordinates and matrix in a new basis

Let \(b_1=(2,1)\), \(b_2=(1,1)\), so \(P=\begin{pmatrix}2&1\\1&1\end{pmatrix}\) with \(\det P=1\) and \(P^{-1}=\begin{pmatrix}1&-1\\-1&2\end{pmatrix}\). For \(v=(5,3)\), \([v]_B=P^{-1}v=(5-3,\,-5+6)=(2,1)\). Check: \(2(2,1)+1(1,1)=(5,3)\). Now let \(A=\begin{pmatrix}3&1\\0&2\end{pmatrix}\). Then \(AP=\begin{pmatrix}7&4\\2&2\end{pmatrix}\) and \([T]_B=P^{-1}AP=\begin{pmatrix}5&2\\-3&0\end{pmatrix}\). The trace (5) and determinant (6) are unchanged, as they must be.

-1123456-11234b1b22b1v

Going twice along \(b_1\) and once along \(b_2\) reaches \(v=(5,3)\).

Method: converting coordinates

  1. Build \(P\) with the basis vectors as columns.
  2. To go from standard to \(B\)-coordinates, solve \(Pc=v\) (or compute \(P^{-1}v\)).
  3. To go back, compute \(v=Pc\).

Key takeaways

  • A subspace contains \(\mathbf{0}\) and is closed under addition and scalar multiplication.
  • Vectors are independent when the only combination giving \(\mathbf{0}\) is the trivial one; a basis is an independent spanning family, and \(\dim V\) is its size.
  • \(\mathrm{Nul}(A)\) lives in the domain and \(\mathrm{Col}(A)\) lives in the codomain; pivot columns of \(A\) give a basis of \(\mathrm{Col}(A)\).
  • Rank-nullity: \(\operatorname{rank}+\operatorname{nullity}=\) number of columns.
  • A linear map is determined by the images of a basis; its matrix has columns \(T(e_j)\); it is one-to-one iff its kernel is \(\{\mathbf{0}\}\).
  • Change of basis: \([v]_B=P^{-1}v\) and \([T]_B=P^{-1}AP\).
Do the practice problems : Vector Spaces and Linear Transformations: math lesson, College – Planète MathsTake the quiz : Vector Spaces and Linear Transformations: math lesson, College – Planète Maths

Test yourself: quick challenge for College

Speed drill for College: how many in 60 seconds?

🚀 Keep exploring with Zyro