LeoMath

Foundations of linear algebra

Linear maps

Maps preserving addition and scaling, determined entirely by what they do to a basis.

about 7 min

Start from a problem

Problem

In the home-page experiment you dragged only two arrows, yet infinitely many points of the plane moved with them. What gives two vectors control over every point?

To answer that we must first pin down which transformations "respect" vector addition and scaling. Those should be completely determined by what they do to a basis.

Observe

Drag the tips of the two basis vectors e1\mathbf e_1, e2\mathbf e_2 below. The whole grid follows: straight lines stay straight, parallel lines stay parallel, the origin stays put, equally spaced grid lines stay equally spaced.

You moved two points and thereby decided where every point of the plane goes. Why?

Interactive experimentLinear transformation
A=(1001)A=\begin{pmatrix}\textcolor{#c2452d}{1}&\textcolor{#1f7a4d}{0}\\\textcolor{#c2452d}{0}&\textcolor{#1f7a4d}{1}\end{pmatrix}
Determinant (signed area) 1
Eigenvalues 1, 1
Conjecture

Because every vector in the plane is v=xe1+ye2v=x\mathbf e_1+y\mathbf e_2, and if a transformation TT "respects" addition and scaling it must send vv to xT(e1)+yT(e2)xT(\mathbf e_1)+yT(\mathbf e_2). What TT does to a basis determines everything.

Definition

Definition 3.1Linear map

Let V,WV,W be vector spaces. A map T:V→WT:V\to W is linear if for all u,v∈Vu,v\in V and c∈Rc\in\mathbb R, T(u+v)=T(u)+T(v),T(cv)=cT(v).T(u+v)=T(u)+T(v),\qquad T(cv)=cT(v).

Together these say T(au+bv)=aT(u)+bT(v)T(au+bv)=aT(u)+bT(v): linear maps preserve linear combinations.

Note T(0)=T(0⋅0)=0⋅T(0)=0T(0)=T(0\cdot0)=0\cdot T(0)=0: a linear map always sends the origin to the origin. So a translation v↦v+bv\mapsto v+b (b≠0b\ne0) is not linear, which is why the origin never moves in the experiment.

Theorems and proofs

Theorem 3.1A linear map is determined by its values on a basis

Let v1,…,vnv_1,\dots,v_n be a basis of VV and w1,…,wn∈Ww_1,\dots,w_n\in W arbitrary. There is exactly one linear map T:V→WT:V\to W with T(vi)=wiT(v_i)=w_i.

Proof

Existence. Each v∈Vv\in V has unique coordinates v=∑civiv=\sum c_iv_i (see Vectors). Define T(v)=∑ciwiT(v)=\sum c_iw_i. If u=∑diviu=\sum d_iv_i then au+bv=∑(adi+bci)viau+bv=\sum(ad_i+bc_i)v_i, so T(au+bv)=∑(adi+bci)wi=aT(u)+bT(v)T(au+bv)=\sum(ad_i+bc_i)w_i=aT(u)+bT(v). Thus TT is linear, and clearly T(vi)=wiT(v_i)=w_i.

Uniqueness. If SS is linear with S(vi)=wiS(v_i)=w_i, then S(v)=S(∑civi)=∑ciS(vi)=∑ciwi=T(v)S(v)=S(\sum c_iv_i)=\sum c_iS(v_i)=\sum c_iw_i=T(v).

This is the theorem behind the experiment: two arrows, T(e1)T(\mathbf e_1) and T(e2)T(\mathbf e_2), decide the fate of the whole plane. A linear map of nn-dimensional space is decided by nn vectors.

Theorem 3.2Linear maps send lines to lines (or points)

If TT is linear, the image of the line {p+tv:t∈R}\{p+tv:t\in\mathbb R\} is {T(p)+tT(v)}\{T(p)+tT(v)\}: a line when T(v)≠0T(v)\ne0, otherwise a point. Parallel lines map to parallel lines (or degenerate together).

Proof

T(p+tv)=T(p)+tT(v)T(p+tv)=T(p)+tT(v) by linearity. Lines sharing the direction vv have images sharing the direction T(v)T(v).

This explains "lines stay lines, parallels stay parallel". The "Collapse" preset, where everything is squashed onto one line, is the case where T(e1)T(\mathbf e_1) and T(e2)T(\mathbf e_2) are collinear and T(v)=0T(v)=0 has nonzero solutions.

Definition 3.2Kernel and image

ker⁡T={v∈V:T(v)=0}\ker T=\{v\in V:T(v)=0\} is the kernel of TT; im⁡T={T(v):v∈V}\operatorname{im}T=\{T(v):v\in V\} is its image. Both are subspaces.

Theorem 3.3Rank–nullity

If VV is finite-dimensional, dim⁡ker⁡T+dim⁡im⁡T=dim⁡V\dim\ker T+\dim\operatorname{im}T=\dim V.

Proof

Take a basis u1,…,uku_1,\dots,u_k of ker⁡T\ker T and extend it to a basis u1,…,uk,v1,…,vru_1,\dots,u_k,v_1,\dots,v_r of VV. We claim T(v1),…,T(vr)T(v_1),\dots,T(v_r) is a basis of im⁡T\operatorname{im}T.

Spanning: any T(v)T(v) with v=∑aiui+∑bjvjv=\sum a_iu_i+\sum b_jv_j equals ∑bjT(vj)\sum b_jT(v_j).

Independence: if ∑bjT(vj)=0\sum b_jT(v_j)=0 then T(∑bjvj)=0T(\sum b_jv_j)=0, so ∑bjvj∈ker⁡T\sum b_jv_j\in\ker T and equals some ∑aiui\sum a_iu_i. Independence of the full basis forces all bj=0b_j=0.

Hence dim⁡im⁡T=r=dim⁡V−k\dim\operatorname{im}T=r=\dim V-k.

In the experiment: when T(e1),T(e2)T(\mathbf e_1),T(\mathbf e_2) are not collinear the kernel is {0}\{0\} and the image is the whole plane (0+2=20+2=2); when they are collinear and nonzero, kernel and image are each a line (1+1=21+1=2).

Common mistake

A linear map always sends 00 to 00. So a translation v↦v+bv\mapsto v+b with b≠0b\ne0 is not linear, and the school "linear function" y=kx+by=kx+b is not a linear map when b≠0b\ne0 (it is affine). When testing linearity, check T(0)T(0) first.

Applications

ApplicationRotation, projection and differentiation are linear
  • Rotation of the plane by θ\theta about the origin: linear, e1↦(cos⁡θ,sin⁡θ)\mathbf e_1\mapsto(\cos\theta,\sin\theta), e2↦(−sin⁡θ,cos⁡θ)\mathbf e_2\mapsto(-\sin\theta,\cos\theta).
  • Projection onto the xx-axis: linear, kernel the yy-axis.
  • Differentiation D:p↦p′D:p\mapsto p' on polynomials: linear, D(af+bg)=af′+bg′D(af+bg)=af'+bg', kernel the constants.

The last example is why linear algebra reappears in Second-order linear equations: solving a linear differential equation is finding the kernel of a linear map.

Remark

The next section, Matrices, does one thing only: it writes the coordinates of T(e1),T(e2)T(\mathbf e_1),T(\mathbf e_2) as two columns. That is a matrix. A matrix is a notation for a linear map, nothing more.

Exercises

01
A linear map T:R2→R2T:\mathbb R^2\to\mathbb R^2 has T(1,0)=(2,1)T(1,0)=(2,1) and T(0,1)=(0,3)T(0,1)=(0,3). Find the second coordinate of T(1,2)T(1,2).
02
Which of the following maps is linear?