Salta al contenuto
Note per Studenti Linear Maps Report

Linear Maps

In questa pagina 6

Mathematical objects become richer when they can be related to each other. In linear algebra the objects of interest are vector spaces, and the way they are related to each other is by means of linear maps. The word "map" is a synonym of "function".

1. Definition and first examples

Definition (linear map). Let V,WV, W be two vector spaces. A function f:V→Wf : V \to W is called linear (or a linear map, or a linear transformation) if it satisfies

f(v+v′)=f(v)+f(v′)for all v,v′∈V,(L1)f(v + v') = f(v) + f(v') \quad \text{for all } v, v' \in V, \tag{L1}

f(av)=a f(v)for all a∈R, v∈V.(L2)f(av) = a\,f(v) \quad \text{for all } a \in \mathbb{R},\ v \in V. \tag{L2}

The vector space VV is called the domain of ff and WW the codomain of ff.

Remark (one condition instead of two). The two conditions are equivalent to the single requirement

f(av+a′v′)=a f(v)+a′ f(v′)for all a,a′∈R, v,v′∈V,f(a v + a' v') = a\,f(v) + a'\,f(v') \quad \text{for all } a, a' \in \mathbb{R},\ v, v' \in V,

which says that ff preserves linear combinations.

Consequence: f(0V)=0Wf(0_V) = 0_W. Since 0⋅v=0V0 \cdot v = 0_V, condition (L2) gives

f(0V)=f(0⋅v)=0⋅f(v)=0W.f(0_V) = f(0 \cdot v) = 0 \cdot f(v) = 0_W.

So a linear map sends the zero vector of VV to the zero vector of WW.

Examples

Example 1 (reflection at the x-axis). The map f:R2→R2f : \mathbb{R}^2 \to \mathbb{R}^2, f(x,y):=(x,−y)f(x, y) := (x, -y) is linear. For (L1): if v=(x,y)v = (x, y) and v′=(x′,y′)v' = (x', y'), then

f(v+v′)=f((x+x′, y+y′))=(x+x′, −y−y′)=(x,−y)+(x′,−y′)=f(v)+f(v′).f(v + v') = f\big((x + x',\, y + y')\big) = (x + x',\, -y - y') = (x, -y) + (x', -y') = f(v) + f(v').

Checking (L2) is similar. Geometrically, (L1) says that reflecting the diagonal of the parallelogram spanned by v,v′v, v' gives the diagonal of the reflected parallelogram. Below we see this map as multiplication by the matrix (100−1)\begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}.

Example 2 (derivative). The map

D:R[x]→R[x],D(f):=f′D : \mathbb{R}[x] \to \mathbb{R}[x], \qquad D(f) := f'

(the derivative of a polynomial) is linear, because of the formulae (f+g)′(x)=f′(x)+g′(x)(f + g)'(x) = f'(x) + g'(x) and (af)′(x)=af′(x)(af)'(x) = a f'(x). Alternatively, with f(x)=∑n=0danxnf(x) = \sum_{n=0}^{d} a_n x^n and g(x)=∑n=0dbnxng(x) = \sum_{n=0}^{d} b_n x^n, using f′(x)=∑n=1dnanxn−1f'(x) = \sum_{n=1}^{d} n a_n x^{n-1}:

(f+g)′(x)=(∑n=0d(an+bn)xn)′=∑n=1dn(an+bn)xn−1=∑n=1dnanxn−1+∑n=1dnbnxn−1=f′(x)+g′(x).(f + g)'(x) = \Big(\sum_{n=0}^{d} (a_n + b_n) x^n\Big)' = \sum_{n=1}^{d} n (a_n + b_n) x^{n-1} = \sum_{n=1}^{d} n a_n x^{n-1} + \sum_{n=1}^{d} n b_n x^{n-1} = f'(x) + g'(x).

Example 3 (abstract examples). Let VV be any vector space.

  • The identity map id=idV:V→V\mathrm{id} = \mathrm{id}_V : V \to V, id(v)=v\mathrm{id}(v) = v, is linear.
  • For any other vector space WW the zero map 0:V→W0 : V \to W, sending every vv to 0W0_W, is linear.
  • For any a∈Ra \in \mathbb{R} the map V→VV \to V, v↦avv \mapsto a v (scalar multiplication) is linear. This follows from the axioms of a vector space.

Non-examples.

  • f:R→Rf : \mathbb{R} \to \mathbb{R}, f(x)=x2f(x) = x^2 is not linear: f(x+y)=x2+2xy+y2≠x2+y2=f(x)+f(y)f(x + y) = x^2 + 2xy + y^2 \neq x^2 + y^2 = f(x) + f(y). Also f(ax)=a2x2≠ax2=af(x)f(ax) = a^2 x^2 \neq a x^2 = a f(x).
  • f:R→Rf : \mathbb{R} \to \mathbb{R}, f(x)=x+1f(x) = x + 1 is not linear: f(x+y)=x+y+1≠(x+1)+(y+1)=f(x)+f(y)f(x + y) = x + y + 1 \neq (x + 1) + (y + 1) = f(x) + f(y), so (L1) fails; (L2) fails too, since f(ax)=ax+1≠a(x+1)=af(x)f(ax) = ax + 1 \neq a(x + 1) = a f(x). (Another way to see it: f(0)=1≠0f(0) = 1 \neq 0.)

2. Multiplication of a matrix with a vector

This is an extremely important way to construct linear maps.

Definition. Let A=(aij)1≤i≤m, 1≤j≤nA = (a_{ij})_{1 \le i \le m,\, 1 \le j \le n} be an m×nm \times n-matrix and v=(v1⋮vn)v = \begin{pmatrix} v_1 \\ \vdots \\ v_n \end{pmatrix} an n×1n \times 1-matrix (a column vector with nn rows). The product of AA with vv is the column vector with mm entries

Av:=(a11v1+a12v2+⋯+a1nvn⋮am1v1+am2v2+⋯+amnvn).Av := \begin{pmatrix} a_{11} v_1 + a_{12} v_2 + \dots + a_{1n} v_n \\ \vdots \\ a_{m1} v_1 + a_{m2} v_2 + \dots + a_{mn} v_n \end{pmatrix}.

The ii-th entry of AvAv is computed by traversing the ii-th row of AA and multiplying each entry of that row with the corresponding entry of vv, then adding up.

Example.

(4−12102)(34)=(4⋅3+(−1)⋅42⋅3+1⋅40⋅3+2⋅4)=(8108),\begin{pmatrix} 4 & -1 \\ 2 & 1 \\ 0 & 2 \end{pmatrix} \begin{pmatrix} 3 \\ 4 \end{pmatrix} = \begin{pmatrix} 4 \cdot 3 + (-1) \cdot 4 \\ 2 \cdot 3 + 1 \cdot 4 \\ 0 \cdot 3 + 2 \cdot 4 \end{pmatrix} = \begin{pmatrix} 8 \\ 10 \\ 8 \end{pmatrix},

(13−201010−1)(12−1)=(1⋅1+3⋅2+(−2)(−1)……),first entry 1+6+2=9.\begin{pmatrix} 1 & 3 & -2 \\ 0 & 1 & 0 \\ 1 & 0 & -1 \end{pmatrix} \begin{pmatrix} 1 \\ 2 \\ -1 \end{pmatrix} = \begin{pmatrix} 1 \cdot 1 + 3 \cdot 2 + (-2)(-1) \\ \dots \\ \dots \end{pmatrix}, \qquad \text{first entry } 1 + 6 + 2 = 9.

Matrices may also have variables as the vector:

(13−201010−1)(xyz)=(x+3y−2zyx−z).\begin{pmatrix} 1 & 3 & -2 \\ 0 & 1 & 0 \\ 1 & 0 & -1 \end{pmatrix} \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} x + 3y - 2z \\ y \\ x - z \end{pmatrix}.

Observation (matrices encode linear systems). Let AA be an m×nm \times n-matrix, x=(x1,…,xn)Tx = (x_1, \dots, x_n)^T a column of unknowns and b=(b1,…,bm)Tb = (b_1, \dots, b_m)^T a column of constants. Then the equation Ax=bAx = b is equivalent to the linear system of mm equations in x1,…,xnx_1, \dots, x_n

a11x1+⋯+a1nxn=b1,…,am1x1+⋯+amnxn=bm.a_{11} x_1 + \dots + a_{1n} x_n = b_1, \quad \dots, \quad a_{m1} x_1 + \dots + a_{mn} x_n = b_m.

For example, the system x+3y−2z=1x + 3y - 2z = 1, y=4y = 4, x−z=2x - z = 2 is the equation A(x,y,z)T=(1,4,2)TA (x, y, z)^T = (1, 4, 2)^T with the matrix AA above.

Proposition (matrix multiplication is linear). For any m×nm \times n-matrix AA, the map Rn→Rm\mathbb{R}^n \to \mathbb{R}^m, v↦Avv \mapsto Av, is linear.

Proof. For v,v′∈Rnv, v' \in \mathbb{R}^n, the ii-th entry of A(v+v′)A(v + v') is

∑j=1naij(vj+vj′)=∑j=1naijvj+∑j=1naijvj′,\sum_{j=1}^{n} a_{ij} (v_j + v'_j) = \sum_{j=1}^{n} a_{ij} v_j + \sum_{j=1}^{n} a_{ij} v'_j,

which is the ii-th entry of Av+Av′Av + Av'. Hence A(v+v′)=Av+Av′A(v + v') = Av + Av'. For a∈Ra \in \mathbb{R}, the ii-th entry of A(av)A(av) is ∑jaij avj=a∑jaijvj\sum_j a_{ij}\, a v_j = a \sum_j a_{ij} v_j, so A(av)=a(Av)A(av) = a (Av). (The source writes this out for m=n=2m = n = 2, where A(v+v′)=(a11(v1+v1′)+a12(v2+v2′)a21(v1+v1′)+a22(v2+v2′))A(v + v') = \begin{pmatrix} a_{11}(v_1 + v'_1) + a_{12}(v_2 + v'_2) \\ a_{21}(v_1 + v'_1) + a_{22}(v_2 + v'_2) \end{pmatrix}; the general case is only notationally more involved.) □\square

2.1 The case of 2×22 \times 2-matrices: geometry

For A=(a11a12a21a22)A = \begin{pmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{pmatrix} and v=(xy)v = \begin{pmatrix} x \\ y \end{pmatrix} we have Av=(a11x+a12ya21x+a22y)Av = \begin{pmatrix} a_{11} x + a_{12} y \\ a_{21} x + a_{22} y \end{pmatrix}, and f:R2→R2f : \mathbb{R}^2 \to \mathbb{R}^2, v↦Avv \mapsto Av ("vv maps to AvAv") is a linear map depending on the entries of AA.

Matrix AA Effect of v↦Avv \mapsto Av
(100−1)\begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} Av=(x,−y)Av = (x, -y): reflection of vv at the x-axis
(r00s)\begin{pmatrix} r & 0 \\ 0 & s \end{pmatrix} rescales the x-direction by rr and the y-direction by ss (shrinks if the factor is below 1 in absolute value, enlarges if above 1)
(1r01)\begin{pmatrix} 1 & r \\ 0 & 1 \end{pmatrix} Av=(x+ry,y)Av = (x + ry, y): shearing
(0−110)\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} Av=(−y,x)Av = (-y, x): counterclockwise rotation by 90∘90^\circ
(−100−1)\begin{pmatrix} -1 & 0 \\ 0 & -1 \end{pmatrix} Av=(−x,−y)Av = (-x, -y): rotation by 180∘180^\circ (counterclockwise or clockwise, the same)
(cos⁡r−sin⁡rsin⁡rcos⁡r)\begin{pmatrix} \cos r & -\sin r \\ \sin r & \cos r \end{pmatrix} Av=(cos⁡r⋅x−sin⁡r⋅y, sin⁡r⋅x+cos⁡r⋅y)Av = (\cos r \cdot x - \sin r \cdot y,\ \sin r \cdot x + \cos r \cdot y): counterclockwise rotation by the angle rr (a rotation matrix)

Details from the source:

  • For the reflection, v=(3,4)v = (3, 4) goes to Av=(3,−4)Av = (3, -4).
  • The matrix (12001)\begin{pmatrix} \tfrac12 & 0 \\ 0 & 1 \end{pmatrix} compresses the x-direction by the factor 12\tfrac12 and leaves the y-direction untouched. For (12002)\begin{pmatrix} \tfrac12 & 0 \\ 0 & 2 \end{pmatrix}, the vector v=(3,2)v = (3, 2) goes to Av=(32,4)Av = (\tfrac32, 4).
  • For the shear with r=2r = 2, the vector v=(−3,4)v = (-3, 4) goes to Av=(5,4)Av = (5, 4): the height yy is kept, and the point slides horizontally by ryr y.
  • For the rotation by 90∘90^\circ, v=(3,4)v = (3, 4) goes to Av=(−4,3)Av = (-4, 3).

3. Kernel and image

The kernel and the image measure how "interesting" a linear map is. The zero map R2→R2\mathbb{R}^2 \to \mathbb{R}^2 only produces the zero vector; a rotation by a fixed angle rr is more interesting, since every point can be obtained from another point by rotating by rr.

3.1 Preliminaries on maps between sets

Definition. Let f:X→Yf : X \to Y be a function between two sets.

  • The preimage of y∈Yy \in Y is f−1(y):={x∈X∣f(x)=y} (⊆X)f^{-1}(y) := \{x \in X \mid f(x) = y\} \ (\subseteq X).
  • The image of ff is im⁡(f):=f(X):={f(x)∣x∈X} (⊆Y)\operatorname{im}(f) := f(X) := \{f(x) \mid x \in X\} \ (\subseteq Y).
  • ff is injective (one-to-one) if for each yy the preimage f−1(y)f^{-1}(y) contains at most one element.
  • ff is surjective (onto) if for each yy the preimage f−1(y)f^{-1}(y) contains at least one element. Equivalently, im⁡(f)=Y\operatorname{im}(f) = Y.
  • ff is bijective if it is both injective and surjective, i.e. for each y∈Yy \in Y the preimage f−1(y)f^{-1}(y) contains exactly one element.

Example (birthdays). For a group of people {P1,…,Pn}\{P_1, \dots, P_n\} let m:{P1,…,Pn}→{1,…,12}m : \{P_1, \dots, P_n\} \to \{1, \dots, 12\} assign to each person the month of birth. It is surjective if in each month someone is born; injective if in each month at most one birthday party happens; bijective if in every month there is exactly one birthday party. In particular mm can only be bijective if n=12n = 12: the two sets must have the same size. For vector spaces (which are infinite) the right notion of "size" is the dimension, see the corollary on rank-nullity below.

3.2 Kernel and image of a linear map

Definition. Let f:V→Wf : V \to W be linear. The kernel of ff is

ker⁡(f):=f−1(0W)={v∈V∣f(v)=0W}.\ker(f) := f^{-1}(0_W) = \{v \in V \mid f(v) = 0_W\}.

Note ker⁡(f)⊆V\ker(f) \subseteq V and im⁡(f)⊆W\operatorname{im}(f) \subseteq W; in fact these are subspaces:

Proposition. For a linear map f:V→Wf : V \to W, ker⁡f\ker f is a subspace of VV and im⁡f\operatorname{im} f is a subspace of WW.

Proof (for the kernel; the image is similar). We check the subspace conditions.

  • 0V∈ker⁡f0_V \in \ker f: this means f(0V)=0Wf(0_V) = 0_W, which holds by the consequence of linearity proved above.
  • If v,v′∈ker⁡fv, v' \in \ker f then v+v′∈ker⁡fv + v' \in \ker f: by linearity, f(v+v′)=f(v)+f(v′)=0W+0W=0Wf(v + v') = f(v) + f(v') = 0_W + 0_W = 0_W.
  • If v∈ker⁡fv \in \ker f and a∈Ra \in \mathbb{R} then av∈ker⁡fav \in \ker f: f(av)=af(v)=a⋅0W=0Wf(av) = a f(v) = a \cdot 0_W = 0_W.

For the image: 0W=f(0V)∈im⁡f0_W = f(0_V) \in \operatorname{im} f; if w=f(v)w = f(v) and w′=f(v′)w' = f(v') are in the image then w+w′=f(v+v′)w + w' = f(v + v') and aw=f(av)a w = f(av) are in the image as well. □\square

Example. Let A=(120240)A = \begin{pmatrix} 1 & 2 & 0 \\ 2 & 4 & 0 \end{pmatrix} and f:R3→R2f : \mathbb{R}^3 \to \mathbb{R}^2, (x,y,z)T↦Av=(x+2y, 2x+4y)T(x, y, z)^T \mapsto Av = (x + 2y,\ 2x + 4y)^T.

  • Kernel. We need x+2y=0x + 2y = 0 and 2x+4y=02x + 4y = 0 (in the unknowns x,y,zx, y, z). So ker⁡f={(−2yyz) ∣ y,z∈R},\ker f = \left\{ \begin{pmatrix} -2y \\ y \\ z \end{pmatrix} \ \mid\ y, z \in \mathbb{R} \right\}, with basis (−210),(001)\begin{pmatrix} -2 \\ 1 \\ 0 \end{pmatrix}, \begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix}, so dim⁡ker⁡f=2\dim \ker f = 2.
  • Image. The image consists of all (x+2y, 2x+4y)(x + 2y,\ 2x + 4y) with x,yx, y arbitrary (zz does not appear). So v2=2v1v_2 = 2 v_1 and v1v_1 is arbitrary: im⁡f={(v12v1) ∣ v1∈R}⊊R2,\operatorname{im} f = \left\{ \begin{pmatrix} v_1 \\ 2 v_1 \end{pmatrix} \ \mid\ v_1 \in \mathbb{R} \right\} \subsetneq \mathbb{R}^2, with basis (12)\begin{pmatrix} 1 \\ 2 \end{pmatrix}, so dim⁡im⁡f=1\dim \operatorname{im} f = 1.
  • Observe dim⁡ker⁡f+dim⁡im⁡f=2+1=3=dim⁡R3\dim \ker f + \dim \operatorname{im} f = 2 + 1 = 3 = \dim \mathbb{R}^3: an instance of the rank-nullity theorem below.

3.3 Injectivity is measured by the kernel

Lemma. Let f:V→Wf : V \to W be a linear map. The following are equivalent:

  1. ff is injective;
  2. ker⁡f={0V}\ker f = \{0_V\}.

Proof. (1) ⇒\Rightarrow (2): Since f(0)=0f(0) = 0 we have 0∈ker⁡f0 \in \ker f. If v∈ker⁡fv \in \ker f then f(v)=0Wf(v) = 0_W, so both vv and 0V0_V are in the preimage of 0W0_W. By injectivity, v=0v = 0.

(2) ⇒\Rightarrow (1): Suppose v,v′∈Vv, v' \in V lie in the preimage of the same w∈Ww \in W, i.e. f(v)=f(v′)=wf(v) = f(v') = w. By linearity

f(v−v′)=f(v+(−1)v′)=f(v)+(−1)f(v′)=f(v)−f(v′)=0.f(v - v') = f(v + (-1) v') = f(v) + (-1) f(v') = f(v) - f(v') = 0.

So v−v′∈ker⁡f={0}v - v' \in \ker f = \{0\}, hence v=v′v = v'. Therefore ff is injective. □\square

3.4 The rank-nullity theorem

Theorem (rank-nullity). Let f:V→Wf : V \to W be a linear map between (finite-dimensional) vector spaces. Then

dim⁡(ker⁡f)+dim⁡(im⁡f)=dim⁡V.\dim(\ker f) + \dim(\operatorname{im} f) = \dim V.

The rank of ff is rk⁡f:=dim⁡(im⁡f)\operatorname{rk} f := \dim(\operatorname{im} f), the nullity of ff is dim⁡(ker⁡f)\dim(\ker f).

The source refers to textbooks for the proof and records the following fact, which contains its essence:

Theorem. Let f:V→Wf : V \to W be linear and let v1,…,vr,vr+1,…,vnv_1, \dots, v_r, v_{r+1}, \dots, v_n be a basis of VV such that v1,…,vrv_1, \dots, v_r is a basis of ker⁡f\ker f. Then f(vr+1),…,f(vn)f(v_{r+1}), \dots, f(v_n) is a basis of im⁡f\operatorname{im} f.

How rank-nullity follows. Here dim⁡ker⁡f=r\dim \ker f = r and dim⁡im⁡f=n−r\dim \operatorname{im} f = n - r (the number of vectors f(vr+1),…,f(vn)f(v_{r+1}), \dots, f(v_n)), hence r+(n−r)=n=dim⁡Vr + (n - r) = n = \dim V. (Such a basis of VV always exists: take a basis of ker⁡f\ker f and extend it to a basis of VV, see the chapter on vector spaces.)

Corollary. Let f:V→Wf : V \to W be a linear map between finite-dimensional vector spaces.

  1. If ff is injective then dim⁡V≤dim⁡W\dim V \le \dim W (then ker⁡f={0}\ker f = \{0\}, i.e. dim⁡ker⁡f=0\dim \ker f = 0, so dim⁡im⁡f=dim⁡V≤dim⁡W\dim \operatorname{im} f = \dim V \le \dim W).
  2. If ff is surjective then dim⁡V≥dim⁡W\dim V \ge \dim W (then im⁡f=W\operatorname{im} f = W, so dim⁡im⁡f=dim⁡W≤dim⁡V\dim \operatorname{im} f = \dim W \le \dim V).
  3. If ff is bijective then dim⁡V=dim⁡W\dim V = \dim W.
  4. These statements cannot be reversed in general: if dim⁡V≤dim⁡W\dim V \le \dim W, ff need not be injective. For example the zero map V→WV \to W is never injective if V≠{0}V \ne \{0\}.
  5. If in addition dim⁡V=dim⁡W\dim V = \dim W, then ff is injective if and only if ff is surjective. (If ff is injective, dim⁡im⁡f=dim⁡V=dim⁡W\dim \operatorname{im} f = \dim V = \dim W, so im⁡f=W\operatorname{im} f = W because a subspace of a finite-dimensional space with the same dimension is the whole space. If ff is surjective, dim⁡im⁡f=dim⁡W=dim⁡V\dim \operatorname{im} f = \dim W = \dim V, so dim⁡ker⁡f=0\dim \ker f = 0 and ker⁡f={0}\ker f = \{0\}.)

3.5 Image and kernel of a matrix; column and row space

Let f:Rn→Rmf : \mathbb{R}^n \to \mathbb{R}^m be the map v↦Avv \mapsto Av for an m×nm \times n-matrix AA. The rank and nullity of AA are those of ff; the rank is written rk⁡A\operatorname{rk} A.

Recall the standard basis vectors e1=(1,0,…,0)T,…,en=(0,…,0,1)Te_1 = (1, 0, \dots, 0)^T, \dots, e_n = (0, \dots, 0, 1)^T, written as columns. Then

f(ei)=Aei=(a11⋅0+⋯+a1i⋅1+⋯+a1n⋅0⋮am1⋅0+⋯+ami⋅1+⋯+amn⋅0)=(a1i⋮ami).f(e_i) = A e_i = \begin{pmatrix} a_{11} \cdot 0 + \dots + a_{1i} \cdot 1 + \dots + a_{1n} \cdot 0 \\ \vdots \\ a_{m1} \cdot 0 + \dots + a_{mi} \cdot 1 + \dots + a_{mn} \cdot 0 \end{pmatrix} = \begin{pmatrix} a_{1i} \\ \vdots \\ a_{mi} \end{pmatrix}.

The product AeiA e_i is precisely the ii-th column of AA. Every v=∑ibieiv = \sum_i b_i e_i gives f(v)=∑ibif(ei)f(v) = \sum_i b_i f(e_i), a linear combination of the columns of AA. This proves:

Proposition. Write A=(c1 c2 … cn)A = (c_1\ c_2\ \dots\ c_n) with columns ci∈Rmc_i \in \mathbb{R}^m. Then im⁡f=L(c1,…,cn)\operatorname{im} f = L(c_1, \dots, c_n) (the span of the columns). This subspace of Rm\mathbb{R}^m is the column space of AA.

Definition. The row space of AA is the subspace of Rn\mathbb{R}^n spanned by the rows of AA.

Proposition (computing the rank). Let AA be an m×nm \times n-matrix and let BB be a (possibly non-reduced) row-echelon matrix obtained from AA by elementary row operations.

  1. The non-zero rows of BB form a basis of the row space of AA.
  2. If the leading ones of BB lie in the columns j1,…,jrj_1, \dots, j_r, then these columns of AA (not of BB) form a basis of the column space of AA.
  3. The following numbers are all equal: (a) rk⁡A\operatorname{rk} A, (b) the dimension of the column space, (c) the dimension of the row space, (d) the number of leading ones in BB.
  4. The nullity of AA equals nn (the number of columns) minus any of the quantities in point 3.

Proof. (1) and (2) follow by showing that the row and column spaces do not change under an elementary row operation (the source skips this part). (3): by definition rk⁡A=dim⁡im⁡f\operatorname{rk} A = \dim \operatorname{im} f, which by the previous proposition is the dimension of the column space; by (2) it equals the number of leading ones in BB. Since BB is in row-echelon form this is also the number of non-zero rows, i.e. by (1) the dimension of the row space. (4) is a consequence of rank-nullity. □\square

Example. Let

A=(12213650121−2),f:R4→R3, v↦Av.A = \begin{pmatrix} 1 & 2 & 2 & 1 \\ 3 & 6 & 5 & 0 \\ 1 & 2 & 1 & -2 \end{pmatrix}, \qquad f : \mathbb{R}^4 \to \mathbb{R}^3,\ v \mapsto Av.

Row reduction (R2−3R1R_2 - 3R_1, R3−R1R_3 - R_1, then multiply the second row by −1-1, then R3−R2R_3 - R_2):

A⇝(122100−1−300−1−3)⇝(122100130013)⇝(122100130000).A \rightsquigarrow \begin{pmatrix} 1 & 2 & 2 & 1 \\ 0 & 0 & -1 & -3 \\ 0 & 0 & -1 & -3 \end{pmatrix} \rightsquigarrow \begin{pmatrix} 1 & 2 & 2 & 1 \\ 0 & 0 & 1 & 3 \\ 0 & 0 & 1 & 3 \end{pmatrix} \rightsquigarrow \begin{pmatrix} 1 & 2 & 2 & 1 \\ 0 & 0 & 1 & 3 \\ 0 & 0 & 0 & 0 \end{pmatrix}.

  • Row space: basis (1,2,2,1)(1, 2, 2, 1) and (0,0,1,3)(0, 0, 1, 3), dimension 2 (a subspace of R4\mathbb{R}^4).
  • The leading ones are in columns 1 and 3, so a basis of the column space (a subspace of R3\mathbb{R}^3) is given by columns 1 and 3 of AA: im⁡f=L((131),(251)),rk⁡f=rk⁡A=2.\operatorname{im} f = L\left( \begin{pmatrix} 1 \\ 3 \\ 1 \end{pmatrix}, \begin{pmatrix} 2 \\ 5 \\ 1 \end{pmatrix} \right), \qquad \operatorname{rk} f = \operatorname{rk} A = 2.
  • Rank-nullity: dim⁡ker⁡f=4−2=2\dim \ker f = 4 - 2 = 2. To find a basis: x2x_2 and x4x_4 are free variables, x3=−3x4x_3 = -3 x_4 from the second row, and x1=−2x2−2x3−x4=−2x2+5x4x_1 = -2 x_2 - 2 x_3 - x_4 = -2 x_2 + 5 x_4. A basis of ker⁡f\ker f is (−2100),(50−31).\begin{pmatrix} -2 \\ 1 \\ 0 \\ 0 \end{pmatrix}, \quad \begin{pmatrix} 5 \\ 0 \\ -3 \\ 1 \end{pmatrix}.

Remark. The row space and column space have the same dimension but are in general different spaces; they are not even comparable, since the row space lies in Rn\mathbb{R}^n and the column space in Rm\mathbb{R}^m.

3.6 Dimension formula for two subspaces

Theorem. If A,BA, B are subspaces of a vector space VV, then

dim⁡(A∩B)+dim⁡(A+B)=dim⁡A+dim⁡B.\dim(A \cap B) + \dim(A + B) = \dim A + \dim B.

Proof. The map f:A⊕B→Vf : A \oplus B \to V, (a,b)↦a−b(a, b) \mapsto a - b is linear (A⊕BA \oplus B is the space of pairs, of dimension dim⁡A+dim⁡B\dim A + \dim B). Since with bb also −b-b lies in BB, the image of ff is A+BA + B. The kernel consists of the pairs (a,b)(a, b) with a−b=0a - b = 0, i.e. a=ba = b; this means a∈A∩Ba \in A \cap B, so ker⁡f={(a,a)∣a∈A∩B}\ker f = \{(a, a) \mid a \in A \cap B\} has dimension dim⁡(A∩B)\dim(A \cap B). By rank-nullity,

dim⁡(A∩B)+dim⁡(A+B)=dim⁡ker⁡f+dim⁡im⁡f=dim⁡(A⊕B)=dim⁡A+dim⁡B.□\dim(A \cap B) + \dim(A + B) = \dim \ker f + \dim \operatorname{im} f = \dim(A \oplus B) = \dim A + \dim B. \qquad \square

4. Linear systems revisited

Let A=(aij)A = (a_{ij}) be the m×nm \times n-matrix of coefficients of a system Ax=bAx = b, and f:Rn→Rmf : \mathbb{R}^n \to \mathbb{R}^m, v↦Avv \mapsto Av.

Theorem.

  1. If b=0b = 0 (homogeneous system), the solution set equals ker⁡f\ker f; in particular it is a subspace of Rn\mathbb{R}^n.
  2. For arbitrary bb, the system has at least one solution if and only if b∈im⁡fb \in \operatorname{im} f. If rr is any solution, then the solution set consists precisely of the vectors r+ker⁡f:={r+v∣v∈ker⁡f}.r + \ker f := \{r + v \mid v \in \ker f\}.

Proof. f−1(b)={r∈Rn∣Ar=b}f^{-1}(b) = \{r \in \mathbb{R}^n \mid Ar = b\} is exactly the set of solutions. So ker⁡f=f−1(0)\ker f = f^{-1}(0) is the set of solutions of the homogeneous system, and the system is solvable exactly when f−1(b)≠∅f^{-1}(b) \neq \emptyset, i.e. b∈im⁡fb \in \operatorname{im} f. For the last statement:

  • If ss is a solution, then f(s−r)=f(s)−f(r)=b−b=0f(s - r) = f(s) - f(r) = b - b = 0 by linearity, so v:=s−r∈ker⁡fv := s - r \in \ker f and s=r+vs = r + v.
  • Conversely, for v∈ker⁡fv \in \ker f: f(r+v)=f(r)+f(v)=b+0=bf(r + v) = f(r) + f(v) = b + 0 = b, so r+vr + v is a solution. □\square

Remark. For b≠0b \neq 0 the solution set r+ker⁡fr + \ker f is never a subspace (it does not contain 00, since A0=0≠bA0 = 0 \ne b). It is a translation of ker⁡f\ker f:

 ker f = f^{-1}(0): a line (or plane...) through the origin 0
 r + ker f = f^{-1}(b): the parallel copy of ker f shifted by r
 (every point r + v, v in ker f, is a solution; 0 is not one when b is not 0)

Example. For the system x+3y+5z=7, 3x+9y+10z=11, 2x+9y+12z=10x + 3y + 5z = 7,\ 3x + 9y + 10z = 11,\ 2x + 9y + 12z = 10 the coefficient matrix is

A=(13539102912).A = \begin{pmatrix} 1 & 3 & 5 \\ 3 & 9 & 10 \\ 2 & 9 & 12 \end{pmatrix}.

Row reduction (R2−3R1R_2 - 3R_1, R3−2R1R_3 - 2R_1, then scale and swap):

A⇝(13500−5032)⇝(135001032)⇝(135001010)⇝(135010001).A \rightsquigarrow \begin{pmatrix} 1 & 3 & 5 \\ 0 & 0 & -5 \\ 0 & 3 & 2 \end{pmatrix} \rightsquigarrow \begin{pmatrix} 1 & 3 & 5 \\ 0 & 0 & 1 \\ 0 & 3 & 2 \end{pmatrix} \rightsquigarrow \begin{pmatrix} 1 & 3 & 5 \\ 0 & 0 & 1 \\ 0 & 1 & 0 \end{pmatrix} \rightsquigarrow \begin{pmatrix} 1 & 3 & 5 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}.

There are 3 leading ones, so the rank is 3 and ff is surjective. By rank-nullity dim⁡ker⁡f=3−3=0\dim \ker f = 3 - 3 = 0, so ff is injective, and hence bijective (alternatively use part 5 of the corollary). So for any vector of constants, such as (7,11,10)T(7, 11, 10)^T, there is exactly one solution. (It can be computed with the inverse matrix, see Matrices and Change of BasisEvery linear map between finite-dimensional spaces is described by a matrix once bases are chosen, composition of maps corresponds to the matrix product, invertible matrices are those reducible to the identity, and a change of basis conjugates the matrix by the base change matrix.Matrices and Change of Basis →.)

5. Linear maps defined on basis vectors

An arbitrary map f:V→Wf : V \to W requires specifying f(v)f(v) for every v∈Vv \in V. For linear maps this simplifies drastically:

Proposition. Let v1,…,vnv_1, \dots, v_n be a basis of a vector space VV, let WW be another vector space and w1,…,wnw_1, \dots, w_n arbitrary vectors of WW (they need not be linearly independent, nor span WW). Then there is a unique linear map f:V→Wf : V \to W such that f(vi)=wif(v_i) = w_i for all ii.

Proof. Every v∈Vv \in V can be written uniquely as v=b1v1+⋯+bnvnv = b_1 v_1 + \dots + b_n v_n (the coordinates of vv in the basis). For another v′=∑bi′viv' = \sum b'_i v_i and a∈Ra \in \mathbb{R} we have v+v′=∑(bi+bi′)viv + v' = \sum (b_i + b'_i) v_i and av=∑(abi)via v = \sum (a b_i) v_i. Existence: define

f(v):=∑i=1nbiwi.f(v) := \sum_{i=1}^{n} b_i w_i.

Then f(vi)=wif(v_i) = w_i, and by the formulas just written f(v+v′)=∑(bi+bi′)wi=f(v)+f(v′)f(v + v') = \sum (b_i + b'_i) w_i = f(v) + f(v') and f(av)=∑abiwi=af(v)f(av) = \sum a b_i w_i = a f(v), so ff is linear. Uniqueness: if a linear ff satisfies f(vi)=wif(v_i) = w_i, it must satisfy f(v)=f(∑bivi)=∑bif(vi)=∑biwif(v) = f(\sum b_i v_i) = \sum b_i f(v_i) = \sum b_i w_i, which is the map defined above. □\square

Example. In V=R3V = \mathbb{R}^3 take the basis v1=e1=(1,0,0)v_1 = e_1 = (1, 0, 0), v2=e2=(0,1,0)v_2 = e_2 = (0, 1, 0), v3=(0,1,1)v_3 = (0, 1, 1). There is a unique linear map f:R3→R3f : \mathbb{R}^3 \to \mathbb{R}^3 with

f(v1)=(2,1,0),f(v2)=(1,−1,1),f(v3)=(0,2,2).f(v_1) = (2, 1, 0), \qquad f(v_2) = (1, -1, 1), \qquad f(v_3) = (0, 2, 2).

To find f(e3)f(e_3): e3=−v2+v3e_3 = -v_2 + v_3, so

f(e3)=−f(v2)+f(v3)=−(1,−1,1)+(0,2,2)=(−1,3,1).f(e_3) = -f(v_2) + f(v_3) = -(1, -1, 1) + (0, 2, 2) = (-1, 3, 1).

With respect to the standard basis (different from the basis vv!) the matrix of ff has as columns f(e1),f(e2),f(e3)f(e_1), f(e_2), f(e_3):

A=(21−11−13011),A = \begin{pmatrix} 2 & 1 & -1 \\ 1 & -1 & 3 \\ 0 & 1 & 1 \end{pmatrix},

i.e. ff agrees with v↦Avv \mapsto Av. (Check: A(0,1,1)T=(0,2,2)T=f(v3)A (0, 1, 1)^T = (0, 2, 2)^T = f(v_3).)

6. Isomorphisms and inverses of linear maps

Given a linear map f:V→Wf : V \to W, can applying ff be undone? A counterclockwise rotation by 60∘60^\circ is undone by rotating clockwise by 60∘60^\circ. But R2→R2\mathbb{R}^2 \to \mathbb{R}^2, (x,y)↦(x,0)(x, y) \mapsto (x, 0) cannot be undone: (x,y)(x, y) cannot be recovered from xx only.

Definition and Lemma. Let f:V→Wf : V \to W be linear. The following are equivalent:

  1. ff is bijective;
  2. there is a linear map g:W→Vg : W \to V with g∘f=idVg \circ f = \mathrm{id}_V and f∘g=idWf \circ g = \mathrm{id}_W (i.e. g(f(v))=vg(f(v)) = v for all v∈Vv \in V and f(g(w))=wf(g(w)) = w for all w∈Ww \in W).

If this holds, ff is called an isomorphism. Then such a gg is unique, called the inverse of ff and denoted f−1:W→Vf^{-1} : W \to V; and dim⁡V=dim⁡W\dim V = \dim W.

Proof of (1) ⇒\Rightarrow (2). Since ff is bijective, the preimage f−1(w)f^{-1}(w) consists of exactly one element, say f−1(w)={v}f^{-1}(w) = \{v\}. Define g(w):=vg(w) := v.

  • g(f(v))=vg(f(v)) = v: the only element of VV mapped to f(v)f(v) is vv.
  • f(g(w))=wf(g(w)) = w: if f−1(w)={v}f^{-1}(w) = \{v\} then f(v)=wf(v) = w and g(w)=vg(w) = v.
  • gg is linear: given w,w′∈Ww, w' \in W let v,v′v, v' be the unique elements with f(v)=wf(v) = w, f(v′)=w′f(v') = w', so g(w)=vg(w) = v, g(w′)=v′g(w') = v'. By linearity w+w′=f(v+v′)w + w' = f(v + v'), hence g(w+w′)=v+v′=g(w)+g(w′)g(w + w') = v + v' = g(w) + g(w'). Similarly g(aw)=ag(w)g(aw) = a g(w).
  • Uniqueness: if g′g' also satisfies f(g′(w))=wf(g'(w)) = w then f(g′(w))=f(g(w))f(g'(w)) = f(g(w)), and by injectivity g′(w)=g(w)g'(w) = g(w).
  • dim⁡V=dim⁡W\dim V = \dim W follows from part 3 of the rank-nullity corollary. □\square

Combined with part 5 of the corollary: a linear map between spaces of the same finite dimension is an isomorphism as soon as it is injective, or equivalently as soon as it is surjective.

For matrices this becomes the notion of invertible matrix, treated in Matrices and Change of BasisEvery linear map between finite-dimensional spaces is described by a matrix once bases are chosen, composition of maps corresponds to the matrix product, invertible matrices are those reducible to the identity, and a change of basis conjugates the matrix by the base change matrix.Matrices and Change of Basis →; the connection to determinants is in DeterminantsThe determinant is the unique function of a square matrix that equals 1 on the identity, changes sign when two rows are swapped and is linear in each row; it is computed by row reduction, Sarrus rule or cofactor expansion, and a matrix is invertible exactly when its determinant is non-zero.Determinants →.

Versione ripasso

Definition. f:V→Wf : V \to W is linear if f(v+v′)=f(v)+f(v′)f(v + v') = f(v) + f(v') and f(av)=af(v)f(av) = a f(v); equivalently ff preserves linear combinations. Then f(0V)=0Wf(0_V) = 0_W (a map with f(0)≠0f(0) \neq 0, like x+1x + 1, is not linear; x2x^2 is not linear either).

Examples. Reflection (x,y)↦(x,−y)(x, y) \mapsto (x, -y), derivative D:R[x]→R[x]D : \mathbb{R}[x] \to \mathbb{R}[x], identity, zero map, scalar multiplication, and v↦Avv \mapsto Av for any m×nm \times n-matrix AA (the ii-th entry of AvAv is row ii of AA times vv; Ax=bAx = b is a linear system).

2D matrices. Reflection (100−1)\begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}; rescaling (r00s)\begin{pmatrix} r & 0 \\ 0 & s \end{pmatrix}; shear (1r01)\begin{pmatrix} 1 & r \\ 0 & 1 \end{pmatrix} (v↦(x+ry,y)v \mapsto (x + ry, y)); rotation by rr counterclockwise (cos⁡r−sin⁡rsin⁡rcos⁡r)\begin{pmatrix} \cos r & -\sin r \\ \sin r & \cos r \end{pmatrix} (90∘90^\circ: (x,y)↦(−y,x)(x, y) \mapsto (-y, x)).

Kernel and image. ker⁡f=f−1(0W)\ker f = f^{-1}(0_W) is a subspace of VV; im⁡f\operatorname{im} f is a subspace of WW. ff is injective   ⟺  ker⁡f={0V}\iff \ker f = \{0_V\} (if f(v)=f(v′)f(v) = f(v') then v−v′∈ker⁡fv - v' \in \ker f).

Rank-nullity. dim⁡ker⁡f+dim⁡im⁡f=dim⁡V\dim \ker f + \dim \operatorname{im} f = \dim V (rk⁡f=dim⁡im⁡f\operatorname{rk} f = \dim \operatorname{im} f). If v1,…,vrv_1, \dots, v_r is a basis of ker⁡f\ker f extended to a basis v1,…,vnv_1, \dots, v_n of VV, then f(vr+1),…,f(vn)f(v_{r+1}), \dots, f(v_n) is a basis of im⁡f\operatorname{im} f.

Corollary. Injective ⇒dim⁡V≤dim⁡W\Rightarrow \dim V \le \dim W; surjective ⇒dim⁡V≥dim⁡W\Rightarrow \dim V \ge \dim W; bijective ⇒dim⁡V=dim⁡W\Rightarrow \dim V = \dim W (the converses fail, e.g. the zero map). If dim⁡V=dim⁡W\dim V = \dim W: injective   ⟺  \iff surjective.

Matrices. AeiA e_i = ii-th column of AA, so im⁡(v↦Av)\operatorname{im}(v \mapsto Av) = column space =L(c1,…,cn)= L(c_1, \dots, c_n). Reduce AA to echelon form BB: non-zero rows of BB = basis of the row space; columns of AA (not of BB) at the leading ones = basis of the column space; rk⁡A\operatorname{rk} A = number of leading ones = dim⁡\dim row space = dim⁡\dim column space; nullity =n−rk⁡A= n - \operatorname{rk} A. Kernel basis: solve Ax=0Ax = 0 with free variables. Row space ⊆Rn\subseteq \mathbb{R}^n, column space ⊆Rm\subseteq \mathbb{R}^m: same dimension, different spaces.

Dimension formula. dim⁡(A∩B)+dim⁡(A+B)=dim⁡A+dim⁡B\dim(A \cap B) + \dim(A + B) = \dim A + \dim B (apply rank-nullity to (a,b)↦a−b(a, b) \mapsto a - b on A⊕BA \oplus B).

Linear systems. Solutions of Ax=0Ax = 0 form ker⁡f\ker f. Ax=bAx = b is solvable   ⟺  b∈im⁡f\iff b \in \operatorname{im} f, and then the solution set is r+ker⁡fr + \ker f for any particular solution rr (a translate of ker⁡f\ker f, never a subspace if b≠0b \neq 0). Example: a 3×33 \times 3 matrix of rank 3 gives one unique solution for every bb.

Linear map on a basis. For a basis v1,…,vnv_1, \dots, v_n of VV and arbitrary w1,…,wn∈Ww_1, \dots, w_n \in W there is a unique linear ff with f(vi)=wif(v_i) = w_i, namely f(∑bivi)=∑biwif(\sum b_i v_i) = \sum b_i w_i. Use it to compute ff on other vectors by writing them in the basis (e.g. e3=−v2+v3e_3 = -v_2 + v_3 gives f(e3)=−f(v2)+f(v3)f(e_3) = -f(v_2) + f(v_3)).

Isomorphism. ff bijective   ⟺  \iff there is a linear gg with g∘f=idVg \circ f = \mathrm{id}_V and f∘g=idWf \circ g = \mathrm{id}_W; g=f−1g = f^{-1} is unique and linear, and dim⁡V=dim⁡W\dim V = \dim W.

Typical mistakes. Taking columns of BB instead of AA for the column space; forgetting that ker⁡\ker lives in the domain and im⁡\operatorname{im} in the codomain; believing the solution set of Ax=bAx = b with b≠0b \neq 0 is a subspace; using the dimension equality alone to conclude a map is bijective without injectivity or surjectivity.

See also Matrices and Change of BasisEvery linear map between finite-dimensional spaces is described by a matrix once bases are chosen, composition of maps corresponds to the matrix product, invertible matrices are those reducible to the identity, and a change of basis conjugates the matrix by the base change matrix.Matrices and Change of Basis → and DeterminantsThe determinant is the unique function of a square matrix that equals 1 on the identity, changes sign when two rows are swapped and is linear in each row; it is computed by row reduction, Sarrus rule or cofactor expansion, and a matrix is invertible exactly when its determinant is non-zero.Determinants →.

Teoria collegata