Recall that a function f:X→Y is a rule which assigns exactly one element y=f(x) of the codomain Y to each element x of the domain X. The element x is called an argument of the function, and y=f(x) is called the image of x under f.
Linear maps are a special class of functions where both the domain and the codomain are vector spaces, and where the function "preserves" the two fundamental vector space operations; adding two vectors then applying the map gives the same result as applying the map first and then adding, and the same goes for scalar multiplication.
Note
Definition 1
Let V and W be two vector spaces over the same field F. A function T:V→W is called a linear map or linear transformation if the following two conditions are satisfied.
Addition Condition.T(v+v′)=T(v)+T(v′) for all v,v′∈V, and
Scalar Multiplication Condition.T(λv)=λT(v) for all λ∈F and v∈V.
Basically, a linear map is a function where the order of operations does not matter; you can "add then map" or "map then add", "scale then map" or "map then scale", and you always land in the same place. The vector space operations pass straight through the function untouched. Geometric operations like rotating, reflecting and projecting behave exactly like this, and so do calculus operations like differentiating and integrating, which is why linear maps show up everywhere.
Example. Show that the function T:R→R defined by T(x)=a0+a1x, where a0,a1∈R are constants, is a linear map if and only if a0=0.
The domain and codomain are both R, which is a vector space, so we check the two conditions. For x,x′∈R,
The two expressions are equal if and only if a0=2a0, that is, if and only if a0=0. In that case we check the scalar multiplication condition:
T(λx)=a1(λx)=λ(a1x)=λT(x).
Therefore, T is a linear map if and only if a0=0.
Notice how y=a0+a1x is the equation of a line in R2; the equation of a line defines a linear map if and only if the line passes through the origin. It is important to remember that a "linear polynomial" like T(x)=3x+2 is NOT a linear map; the constant term must be zero.
Example. Show that the function T:R3→R2 defined by
T(x)=(−5x2+4x3x1+2x3)forx=x1x2x3∈R3,
is a linear map.
Both R3 and R2 are vector spaces, so we just check the two conditions.
Every linear map is forced to behave nicely on the zero vector and on negatives.
Note
Proposition 1 If T:V→W is a linear map, then
T(0)=0, and
T(−v)=−T(v) for all v∈V.
Proof. Since 0v=0 in any vector space, the scalar multiplication condition gives
T(0)=T(0v)=0T(v)=0.
Similarly, since −v=(−1)v,
T(−v)=T((−1)v)=(−1)T(v)=−T(v).■
Basically, a linear map must send the zero vector of the domain to the zero vector of the codomain. This gives you the fastest possible "not linear" test: plug in 0 first, and if you do not get 0 out, you are done. If T(0)=0 does hold, hunt for a specific numerical counterexample to one of the two conditions instead (same idea as disproving closure in subspace questions).
Example. Show that the function T:R2→R defined by T(x1x2)=4x1+3(x2−6) is not linear.
We have
T(00)=4(0)+3(0−6)=−18=0.
Since T(0)=0, T is not a linear map.
Example. Show that the function T:R→R defined by T(x)=x2 is not linear.
Here T(0)=0, so the quick test tells us nothing; we look for a numerical counterexample to the scalar multiplication condition:
T(2×3)2T(3)=36,=2×9=18.
Since T(2×3)=2T(3), T is not a linear map.
The converse of Proposition 1 is NOT true; a function can pass both the T(0)=0 and T(−v)=−T(v) tests and still fail to be linear.
Example. The function T(x)=x3 satisfies T(0)=0 and T(−x)=−T(x), but
T(2×1)2T(1)=8,=2,
so T is not a linear map. Passing the quick tests is necessary but never sufficient.
The two conditions in the definition can be merged into a single condition, which halves the amount of algebra you have to do in a "show that T is linear" question.
Note
Theorem 2 A function T:V→W is a linear map if and only if for all λ1,λ2∈F and v1,v2∈V,
T(λ1v1+λ2v2)=λ1T(v1)+λ2T(v2).
Proof. If T is linear, then by the addition condition followed by the scalar multiplication condition (used twice),
Conversely, if the combined condition holds, then choosing λ1=λ2=1 recovers the addition condition, and choosing λ2=0 recovers the scalar multiplication condition. ■
Example. Show that the function T:R2→R3 defined by
T(x)=3x1−x24x25x1+6x2forx=(x1x2)∈R2,
is a linear map.
For x,x′∈R2 and λ,μ∈R, we have λx+μx′=(λx1+μx1′λx2+μx2′), and hence
An induction argument extends the one-condition test from two vectors to any finite linear combination.
Note
Theorem 3 If T is a linear map with domain V and S={v1,…,vn} is a set of vectors in V, then for all scalars λ1,…,λn,
T(λ1v1+⋯+λnvn)=λ1T(v1)+⋯+λnT(vn).
In other words, linear maps preserve linear combinations. This has a very useful consequence: if you know what T does to a basis, you know what T does to everything, because every vector is a unique linear combination of the basis vectors.
Note
Theorem 4 For a linear map T:V→W, the function values for every vector in the domain are known if and only if the function values for a basis of the domain are known. Further, if B={v1,…,vn} is a basis for V, then for all v∈V,
T(v)=x1T(v1)+⋯+xnT(vn),
where x1,…,xn are the scalars in the unique linear combination v=x1v1+⋯+xnvn.
The strategy for "is T linear?" questions: first check the domain and codomain are actually vector spaces, then check T(0)=0, then try small specific vectors (especially λ=−1), and only commit to the general algebra of Theorem 2 once nothing has broken.
Example (trap: translation). Is T:R2→R2 defined by T(x)=x+(11) a linear map?
No;
T(00)=(11)=(00).
Therefore a translation is never a linear map (unless you translate by 0), even though sliding the plane around feels like the most "linear" thing imaginable.
Example (trap: absolute value). Is T:R→R defined by T(x)=∣x∣ a linear map?
Here T(0)=0, so the quick test passes. Try λ=−1:
T((−1)×1)(−1)T(1)=∣−1∣=1,=−1.
Since 1=−1, the scalar multiplication condition fails and T is not linear. Whenever a formula folds negatives back onto positives, λ=−1 is the counterexample to reach for.
Example (trap: determinant). Is T:M22(R)→R defined by T(A)=det(A) a linear map?
The domain and codomain are vector spaces and det(O)=0, so we test the conditions on the identity matrix I:
T(2I)2T(I)=det(2002)=4,=2×1=2.
Since 4=2, T is not linear. In fact det(λA)=λ2det(A) for 2×2 matrices, so the determinant scales quadratically, not linearly.
Example (trap: the domain matters). Is S:[−1,1]→R defined by S(x)=5x a linear map?
No, and not because of the formula; the domain [−1,1] is not a vector space (it is not closed under addition or scalar multiplication), so S is disqualified before we even check the conditions. The function T:R→R with the same rule T(x)=5xis linear. Always check that the domain and codomain are vector spaces before checking the two conditions.
If you look back at the examples in the previous section, every linear map from Rn to Rm we wrote down could have been written as T(x)=Ax for some m×n matrix A. This is no accident; in this section we show that every matrix defines a linear map and, conversely, every linear map from Rn to Rm is a matrix map.
Note
Theorem 1 For each m×n matrix A, the function TA:Rn→Rm defined by
TA(x)=Axforx∈Rn,
is a linear map.
Proof. This follows straight from the matrix arithmetic rules of 1131. For all x,x′∈Rn and λ∈R,
TA(x+x′)=A(x+x′)=Ax+Ax′=TA(x)+TA(x′),
and
TA(λx)=A(λx)=λ(Ax)=λTA(x).■
Example. Describe the linear map TA such that TA(x)=Ax for the matrix
A=3−1−5406.
Since A has 3 rows and 2 columns, the domain is R2 and the codomain is R3 (an m×n matrix eats vectors of length n and spits out vectors of length m), and
TA(x1x2)=Ax=3x1+4x2−x1−5x1+6x2.
Therefore every matrix defines a linear map just by multiplication.
The converse direction is the important one.
Note
Matrix Representation Theorem Let T:Rn→Rm be a linear map and let ej for 1⩽j⩽n be the standard basis vectors of Rn. Then the m×n matrix A whose columns are given by
aj=T(ej)for1⩽j⩽n,
has the property that T(x)=Ax for all x∈Rn.
Proof. Every x∈Rn can be written uniquely as x=x1e1+⋯+xnen. By Theorem 3 of Section 7.1,
where the last step uses the fact (Proposition 3 of Section 6.4) that a linear combination of the columns of A is exactly the matrix product Ax. ■
The take-away formula is
A=(T(e1)T(e2)⋯T(en)),
i.e. the jth column of the matrix is the image of the jth standard basis vector. This is worth internalising; it is how you will construct every geometric matrix in Section 7.3.
Example. Find a matrix A such that T(x)=Ax for the linear map T:R3→R2 defined by
Tx1x2x3=(3x1−5x2+6x35x2+31x3).
We compute the images of the standard basis vectors:
T(e1)T(e2)T(e3)=(30),=(−55),=(631).
Therefore, placing these as columns,
A=(30−55631).
An alternative (often faster) method is to notice that the components of T(x) look like the left-hand side of a system of linear equations, and simply read off the coefficient matrix.
Example. Find a matrix A such that T(x)=Ax for the linear map T:R4→R3 defined by
Reading off the coefficients row by row (remembering to put a 0 wherever a variable is missing),
A=2−21−30−5406−53−8.
Therefore T(x)=Ax for all x∈R4; both methods must always give the same matrix.
Example (images of non-standard vectors). A linear map T:R2→R2 satisfies
T(11)=(20)andT(1−1)=(04).
Find the matrix of T with respect to the standard basis.
The trap here is that we were not given T(e1) and T(e2); we have to build them, using the fact that T preserves linear combinations. Since e1=21(11)+21(1−1),
and a quick sanity check confirms A(11)=(20) as required. This works because {(11),(1−1)} is a basis of R2; by Theorem 4, values on a basis determine the map completely.
Many of the standard geometric operations on R2 and R3 are linear maps: stretching, compressing, reflecting, rotating and projecting. For each of them, the Matrix Representation Theorem gives a mechanical recipe for the matrix: work out where e1 and e2 land, and make those the columns.
A useful general fact first: linear maps send lines to lines (or squash them to points).
Note
Proposition 1 Suppose that T:Rn→Rm is a linear map. Then T maps a line in Rn to either a line or a point in Rm.
Proof. A line is the set {x∈Rn:x=a+λv,λ∈R} with v=0. By Theorem 2 of Section 7.1, T(a+λv)=T(a)+λT(v), so the image is {y∈Rm:y=T(a)+λT(v),λ∈R}; this is a line when T(v)=0 and the single point T(a) otherwise. ■
The same argument shows a line segment maps to the segment between the images of the endpoints, which is why it is enough to transform the vertices of a shape and then reconnect them.
multiplies the first component by λ1 and the second by λ2; each axis direction is stretched (if λi>1) or compressed (if λi<1) independently. When λ1=λ2=λ the whole plane is scaled uniformly by λ (a dilation).
Example. Apply A=(20021) to the point (3,4).
A(34)=(2(3)+0(4)0(3)+21(4))=(62).
Therefore the point is pushed out to twice the horizontal distance and squashed to half the vertical distance.
Example. Reflection in the x1-axis sends x=(x1x2) to x′=(x1−x2), and is represented by
A=(100−1),
since Ax=(x1−x2)=x′. Note that finding a matrix which performs the transformation is itself the proof that the transformation is linear. Similarly, reflection in the x2-axis has matrix (−1001).
Example (matrix from a geometric description). Find the matrix of the reflection in the line x2=x1 in R2.
We only need the images of the standard basis vectors. Reflecting in the line x2=x1 swaps the two coordinate axes, so
T(e1)T(e2)=(01),=(10).
Therefore
A=(0110),
and as a check, A(31)=(13), which is exactly the mirror image of (3,1) in that line. This "track e1 and e2, then check on one extra point" routine handles basically every geometric matrix question.
Example. Let Rα:R2→R2 rotate every point anticlockwise about the origin by an angle α. Rotation is linear; rotating a+b gives the same result as rotating a and b separately and then adding (the whole parallelogram rotates rigidly), and the same for scaling. To find the matrix, rotate the standard basis vectors: e1 sits at angle 0 on the unit circle and moves to angle α, while e2 sits at angle 2π and moves to angle 2π+α, so
Rα(e1)=(cosαsinα)andRα(e2)=(−sinαcosα).
Therefore the rotation matrix for angle α is
Aα=(cosαsinα−sinαcosα).
Example. Find the matrix for rotation by 3π anticlockwise, and rotate the point (2,0).
and as a check, for x=(31) we have x⋅b=5, so projbx=(12), and indeed
A(31)=51(3+26+4)=(12).
Therefore the matrix reproduces the projection formula exactly.
Example. For a fixed b∈Rn, the function T:Rn→R defined by T(x)=b⋅x is a linear map; the proof is the same dot-product algebra as for the projection. Taking b=ei gives the map which picks out the ith component of x, so "read off a coordinate" is itself a linear map.
There are two important subspaces attached to every linear map: the kernel (the set of vectors squashed to zero, living in the domain) and the image (the set of all function values, living in the codomain). Informally, the kernel measures what the map destroys and the image measures what the map can actually reach.
Definition 1
Let T:V→W be a linear map. Then the kernel of T (written ker(T)) is the set of all zeroes of T, that is, the subset of the domain V defined by
ker(T)={v∈V:T(v)=0}.
For matrix maps the definition specialises to something very familiar.
Note
Definition 2
For an m×n matrix A, the kernel of A is the subset of Rn defined by
ker(A)={x∈Rn:Ax=0},
that is, the set of all solutions of the homogeneous equation Ax=0.
Basically, finding the kernel of a matrix is nothing new; it is just solving Ax=0 by Gaussian elimination like in 1131. Showing a specific vector lies in the kernel is even easier: multiply and see if you get 0.
Example. Let A=(1326) and x=(2−1). Then
Ax=(1(2)+2(−1)3(2)+6(−1))=(00),
and hence x∈ker(A). Also, 0∈ker(T) for every linear map T, since T(0)=0; the kernel is never empty.
ker(A)=⎩⎨⎧x∈R4:x=λ12−110+λ2−3−101 for λ1,λ2∈R⎭⎬⎫.
Geometrically, the kernel is a plane through the origin in R4.
The word "subspace" in the section title is justified by the following theorem.
Note
Theorem 1 If T:V→W is a linear map, then ker(T) is a subspace of the domain V.
Proof. We use the Subspace Theorem. The kernel contains 0, since T(0)=0. Suppose v,v′∈ker(T) and λ∈F. Then
T(v+v′)=T(v)+T(v′)=0+0=0,
and
T(λv)=λT(v)=λ0=0,
so ker(T) is closed under addition and scalar multiplication, and is therefore a subspace of V. ■
Since the kernel is a subspace, it has a dimension, and that dimension gets a special name.
Note
Definition 3
The nullity of a linear map T is the dimension of ker(T). The nullity of a matrix A is the dimension of ker(A).
For a matrix map TA we have ker(TA)=ker(A) (the conditions TA(x)=0 and Ax=0 are literally the same equation), and the nullity can be read off from the row-echelon form.
Note
Proposition 3 For a matrix A,
nullity(A)=number of parameters in the solution of Ax=0=number of non-leading columns in a row-echelon form U of A.
Example (continued). For the 3×4 matrix A above, the two vectors
⎩⎨⎧2−110,−3−101⎭⎬⎫
span ker(A), and they are linearly independent (look at the third and fourth entries; the only combination giving 0 there is λ1=λ2=0). Therefore they form a basis for ker(A), and nullity(A)=2, matching the two non-leading columns of U.
Note
Proposition 4 The columns of a matrix A are linearly independent if and only if nullity(A)=0.
This follows because the columns are independent exactly when Ax=0 has only the zero solution, i.e. when ker(A)={0}.
Definition 4
Let T:V→W be a linear map. Then the image of T is the set of all function values of T, that is, the subset of the codomain W defined by
im(T)={w∈W:w=T(v) for some v∈V}.
Note
Definition 5
The image of an m×n matrix A is the subset of Rm defined by
im(A)={b∈Rm:b=Ax for some x∈Rn}.
We have met this set several times before in disguise. Since Ax is a linear combination of the columns of A, the image is exactly the span of the columns, and it is also the set of right-hand sides b for which Ax=b is solvable:
im(A)=col(A)=span(columns of A)={b∈Rm:Ax=b has a solution}.
Basically, every question about the image of a matrix is secretly a linear equations question you already know how to solve.
Example (continued). Find conditions on b for b∈im(A), where A is the same 3×4 matrix as before.
We ask when Ax=b has a solution for b=b1b2b3. Reducing the augmented matrix with a general right-hand side,
The system has a solution if and only if the last row is consistent, that is, if and only if
4b1−2b2+b3=0.
Therefore im(A) is the plane through the origin in R3 with normal 4−21; a two-dimensional subspace of R3.
Note
Theorem 5 Let T:V→W be a linear map. Then im(T) is a subspace of the codomain W.
Proof. We have 0=T(0)∈im(T). If w=T(v) and w′=T(v′) are in the image and λ∈F, then
w+w′=T(v)+T(v′)=T(v+v′),
which is a function value of the vector v+v′∈V, and
λw=λT(v)=T(λv),
which is a function value of λv∈V. Hence the image is closed under both operations, and by the Subspace Theorem it is a subspace of W. ■
Note
Definition 6
The rank of a linear map T is the dimension of im(T). The rank of a matrix A is the dimension of im(A).
Note
Proposition 7 For a matrix A,
rank(A)=maximal number of linearly independent columns of A=number of leading columns in a row-echelon form U of A.
Example (continued). Find rank(A) and a basis for im(A).
The row-echelon form U has leading entries in columns 1 and 2, so rank(A)=2, and a basis for im(A) is given by columns 1 and 2of the original matrix A:
⎩⎨⎧132,46−4⎭⎬⎫.
When writing down a basis for the image, you must take the leading columns of the original matrix A, not the columns of the row-echelon form U; row operations change the column space. As a sanity check, both basis vectors satisfy 4b1−2b2+b3=0 from before.
In the running example, rank(A)+nullity(A)=2+2=4, the number of columns of A. This is no coincidence; every column of a row-echelon form is either leading (counted by the rank) or non-leading (counted by the nullity).
Note
Rank-Nullity Theorem for Matrices For any matrix A,
rank(A)+nullity(A)=number of columns of A.
Note
Rank-Nullity Theorem Suppose V and W are finite dimensional vector spaces and T:V→W is linear. Then
rank(T)+nullity(T)=dim(V).
A proof of the general version is given in Section 7.9 below. The rough idea: the domain has dim(V) dimensions to spend; every dimension is either flattened to zero (nullity) or survives into the image (rank), and nothing is created or lost. This one line answers a surprising number of exam questions instantly, as we will see below.
Rank and nullity together classify the solutions of any linear system.
Note
Theorem 10 The equation Ax=b has:
no solution if rank(A)=rank([A∣b]), and
at least one solution if rank(A)=rank([A∣b]). Further,
i) if nullity(A)=0 the solution is unique, whereas,
ii) if nullity(A)=ν>0, then the general solution is of the form
x=xp+λ1k1+⋯+λνkνforλ1,…,λν∈R,
where xp is any particular solution of Ax=b and {k1,…,kν} is a basis for ker(A).
Basically, the full solution set is one particular solution plus the entire kernel; the same "particular solution plus homogeneous solution" structure you will meet again with linear ODEs in the calculus half, and for the same underlying reason (both problems are linear).
Example. Find the general solution of Ax=b, where
A=(122413),b=(13),
and identify xp and the kernel part.
Row reducing the augmented matrix,
(12241313)∼(10201111)(R2→R2−2R1).
The right-hand column is non-leading, so a solution exists; rank(A)=rank([A∣b])=2 and nullity(A)=3−2=1, so we expect one parameter. Setting x2=λ, back substitution gives
x3x1=1,=1−2λ−x3=−2λ.
Hence
x=−2λλ1=001+λ−210.
Therefore xp=001 is a particular solution and ⎩⎨⎧−210⎭⎬⎫ is a basis for ker(A), exactly matching Theorem 10 with ν=1.
Example. Show that Ax=b has no solution for A=(1224) and b=(13).
(122413)∼(102011)(R2→R2−2R1).
Here rank(A)=1 but rank([A∣b])=2, so by Theorem 10 there is no solution; geometrically, b lies outside the line im(A)=span(12).
Example (instant answers with rank-nullity). These come up constantly in exams and need almost no working.
a) Can a linear map T:R3→R4 be onto (i.e. have im(T)=R4)?
rank(T)=dim(R3)−nullity(T)≤3<4=dim(R4).
Therefore no; the image is at most 3-dimensional and can never fill R4, no matter how the map is defined.
b)A is a 3×5 matrix. Can the columns of A be linearly independent?
nullity(A)=5−rank(A)≥5−3=2>0.
Therefore no; by Proposition 4 the columns are dependent, since the nullity cannot be zero.
c) A linear map T:R5→R3 is known to be onto. Find nullity(T).
nullity(T)=dim(R5)−rank(T)=5−3=2.
Therefore the nullity is exactly 2; onto forces rank(T)=3, and rank-nullity does the rest.
7.5 Further applications and examples of linear maps#
So far most of our examples have had domain Rn and codomain Rm, but the theory applies to any vector spaces; polynomials, matrices and functions included.
Example. The identity map idV:V→V, defined by idV(v)=v for all v∈V, is linear. This one is self explanatory so I'm not gonna write much;idV(v+v′)=v+v′ and idV(λv)=λv by definition.
Example. Let B={v1,…,vn} be an ordered basis of a real vector space V. The map T:V→Rn which sends each v=x1v1+⋯+xnvn to its coordinate vector x1⋮xn is a linear map, because adding vectors adds their (unique) coordinates and scaling a vector scales its coordinates. This innocent-looking fact is what makes Section 7.6 below work: it lets us translate any finite-dimensional problem into a column-vector problem.
Example. Show that the function T:R3→P2(R) defined by T(a)=p, where
First, to get a feel for the map: T123 is the polynomial p(x)=3+6x+2x2, and T(0) is the zero polynomial, as required. Now let λ,μ∈R and a,a′∈R3, and let s=T(λa+μa′), p=T(a), q=T(a′). Then
Calculus supplies the most important non-Rn examples: both differentiation and integration preserve sums and scalar multiples.
Example (differentiation). Show that the function D:Pn(R)→Pn−1(R), defined by D(p)=p′, is a linear map.
First, D really is a function into Pn−1(R); differentiating a polynomial of degree at most n gives a polynomial of degree at most n−1. From the properties of derivatives, for all p,q∈Pn(R) and λ∈R,
(p+q)′(x)(λp)′(x)=p′(x)+q′(x),=λp′(x),
so D(p+q)=D(p)+D(q) and D(λp)=λD(p). Therefore D is a linear map. All the standard derivative rules you memorised for 1131 ("derivative of a sum is the sum of the derivatives") were secretly the statement that D is linear.
Example (integration). Show that the function I:Pn(R)→Pn+1(R) defined by I(p)=q, where
q(x)=∫0xp(t)dt,
is a linear map.
For a concrete function value first: if p(x)=1−3x+4x2, then
I(p)(x)=∫0x(1−3t+4t2)dt=x−23x2+34x3,
a polynomial of degree 3, as expected. For linearity, let p1,p2∈Pn(R) and λ1,λ2∈R, and let q=I(λ1p1+λ2p2). From the properties of integration,
Hence I(λ1p1+λ2p2)=λ1I(p1)+λ2I(p2), and I is a linear map.
Example (kernel and image of the derivative on P3). Find ker(D), nullity(D), im(D) and rank(D) for D:P3(R)→P2(R), and verify the Rank-Nullity Theorem.
Write p(x)=a0+a1x+a2x2+a3x3, so that
D(p)(x)=a1+2a2x+3a3x2.
Kernel.D(p)=0 requires
a12a23a3=0,=0,=0,
with a0 free. Hence ker(D)={constant polynomials}=span(1), and nullity(D)=1; the derivative destroys exactly the constant information.
Image. Given any target q(x)=b0+b1x+b2x2∈P2(R), choose
a1=b0,a2=2b1,a3=3b2,
(and a0 anything); then D(p)=q. Hence im(D)=P2(R), so D is onto and rank(D)=dim(P2(R))=3.
Check.rank(D)+nullity(D)=3+1=4=dim(P3(R)), exactly as the Rank-Nullity Theorem demands. Therefore antidifferentiation being "unique up to +C" is precisely the statement nullity(D)=1.
Example (evaluation map). Let E:P2(R)→R be defined by E(p)=p(2). Show that E is linear, and find its rank and a basis for its kernel.
Linearity. For p,q∈P2(R) and λ,μ∈R,
E(λp+μq)=(λp+μq)(2)=λp(2)+μq(2)=λE(p)+μE(q),
so E is linear by Theorem 2 of Section 7.1.
Rank.E(1)=1=0, so the image contains a non-zero number, and since im(E) is a subspace of the one-dimensional space R, we must have im(E)=R and rank(E)=1; E is onto.
Kernel. By rank-nullity,
nullity(E)=dim(P2(R))−rank(E)=3−1=2,
so we need two linearly independent polynomials vanishing at x=2. Both x−2 and x2−2x=x(x−2) evaluate to 0 at x=2, and they are independent (different degrees). Therefore {x−2,x2−2x} is a basis for ker(E). Notice how rank-nullity told us in advance exactly how many kernel vectors to hunt for; that is the standard trick for kernel questions on polynomial spaces.
[X] For interest: the Laplace transformL(f)=fL, where fL(s)=∫0∞e−stf(t)dt, is a linear map on a suitable space of functions, by the same integration argument as above; its linearity is the whole reason it is useful for solving linear ODEs (transform each term separately, solve algebraically, transform back).
7.6 [X] Representation of linear maps by matrices#
This section is 1241/extension content.
Section 7.2 showed that linear maps Rn→Rm are matrix maps. The generalisation: every linear map between finite-dimensional vector spaces can be represented by a matrix, once you fix a basis at each end and work with coordinate vectors.
Note
General Matrix Representation Theorem Let T:V→W be a linear map from an n-dimensional vector space V to an m-dimensional vector space W, and let BV={v1,…,vn} and BW={w1,…,wm} be ordered bases for V and W. Then there is a unique m×n matrix A such that
[T(v)]BW=A[v]BV,
where A is the matrix whose columns are aj=[T(vj)]BW for 1⩽j⩽n.
The matrix depends on T and the two chosen bases, but not on the particular vector being mapped. The recipe:
Choose a basis BV for the domain and BW for the codomain.
Compute the function values T(vj) of the domain basis vectors.
Write each T(vj) as a coordinate vector with respect to BW.
Assemble those coordinate vectors as the columns of A.
Example. Construct the matrix of the derivative map D:P3(R)→P2(R) with respect to the standard bases {1,x,x2,x3} and {1,x,x2}, and use it to differentiate p(x)=1−3x+4x2+7x3.
The images of the domain basis vectors are
D(1)=0,D(x)=1,D(x2)=2x,D(x3)=3x2,
whose coordinate vectors with respect to {1,x,x2} are
000,100,020,003,
respectively. Hence
A=000100020003.
The coordinate vector of p is 1−347, and
A1−347=−3821,
so D(p)(x)=−3+8x+21x2, which is indeed the derivative of p. Therefore differentiating polynomials is literally a matrix multiplication once you pass to coordinates.
It is often possible to simplify a problem enormously by choosing non-standard bases; with the right basis in domain and codomain, the representing matrix can come out diagonal or triangular, from which the behaviour of the map can be read off instantly. This idea is developed properly in Chapter 8.
Since matrices and linear maps are two views of the same objects, matrix arithmetic must correspond to operations on maps. Indeed, for matrices A (m×n) and B of matching sizes:
Addition.TA+TB=TA+B; adding maps adds their matrices.
Scalar multiplication.λTA=TλA.
Composition. The interesting one:
Note
Proposition 3 (Multiplication and Composition) Let A be a real m×n matrix and B be a real n×p matrix. Then the composite TA∘TB is the linear map T:Rp→Rm defined by
T(x)=(TA∘TB)(x)=A(Bx)=(AB)xfor allx∈Rp.
So composition of linear maps is matrix multiplication; this is arguably the real reason matrix multiplication is defined the weird way it is. Note the order carefully: in TA∘TB=TAB, the map TB acts first, i.e. the matrix nearest the vector acts first.
Example. Show that rotating the plane by φ and then by θ is the same as rotating by θ+φ, i.e. AθAφ=Aθ+φ.
using the trig addition formulas. Therefore the matrix identity is just the geometric fact that consecutive rotations add their angles; as a bonus, the trig addition formulas fall out of matrix multiplication for free.
Example (order matters). Let R=(01−10) (rotation by 2π) and M=(100−1) (reflection in the x1-axis). Compare "rotate then reflect" with "reflect then rotate".
Rotate first, then reflect (rotation acts first, so it sits on the right):
MR=(100−1)(01−10)=(0−1−10).
Reflect first, then rotate:
RM=(01−10)(100−1)=(0110).
The results differ; testing on e1, the first sends (1,0)↦(0,−1) while the second sends (1,0)↦(0,1). Therefore composition of linear maps (like matrix multiplication) is not commutative, and when you translate a worded geometric sequence into matrices you must write the transformations from right to left.
7.8 [X] One-to-one, onto and invertible linear maps and matrices#
This section is 1241/extension content; the general function versions of these definitions are in Section 7.10.
Note
Definition 1
A linear map T:V→W is said to be:
a) one-to-one if for all v1,v2∈V, T(v1)=T(v2) only if v1=v2;
b) onto if for all w∈W there exists v∈V such that w=T(v), that is, if im(T)=W.
For linear maps (and only for linear maps) being one-to-one collapses to a single check at zero.
Note
Proposition 1 A linear map T:V→W is one-to-one if and only if ker(T)={0}, that is, if and only if nullity(T)=0.
Proof. If T is one-to-one, then since T(0)=0, no other vector can also map to 0, so ker(T)={0}. Conversely, if ker(T)={0} and T(v1)=T(v2), then by linearity
T(v1−v2)=T(v1)−T(v2)=0,
so v1−v2∈ker(T)={0}, forcing v1=v2. ■
This shortcut is only valid for linear maps; f(x)=x2 has f(x)=0 only at x=0, yet it is not one-to-one.
Note
Proposition 2 If the codomain W of a linear map T:V→W is finite dimensional, then T is onto if and only if rank(T)=dim(W).
Combining these with rank-nullity gives the dimension facts you can quote instantly:
If T is one-to-one and onto, then dim(V)=dim(W).
If dim(V)=dim(W), then T is one-to-one ⟺T is onto (each forces the other).
If dim(V)>dim(W) (e.g. R3→R2), T can never be one-to-one; if dim(V)<dim(W) (e.g. R2→R3), T can never be onto.
Note
Theorem 5 If V and W are finite-dimensional vector spaces and T:V→W is a linear map, then the following statements are equivalent:
T is invertible, i.e. there exists a linear map S:W→V with S∘T=idV and T∘S=idW;
T is one-to-one and onto;
dim(V)=dim(W) and there exists S:W→V with T∘S=idW;
dim(V)=dim(W) and there exists S:W→V with S∘T=idV.
Further, if a linear map has an inverse, the inverse is unique and is itself a linear map.
Example. Determine whether the maps TA and TB are one-to-one, onto and invertible, where
A=(1224),B=(1324).
For A: row reducing,
(1224)∼(1020)(R2→R2−2R1),
so rank(A)=1 and nullity(A)=2−1=1. Since nullity(A)=0, TA is not one-to-one (indeed ker(A)=span(−21), so the whole line gets crushed to 0), and since rank(A)=1<2, TA is not onto. Hence TA is not invertible.
For B: row reducing,
(1324)∼(102−2)(R2→R2−3R1),
so rank(B)=2 and nullity(B)=0. Hence TB is one-to-one and onto, and therefore invertible; its inverse is the matrix map given by the usual 2×2 inverse formula from 1131,
This section is 1241/extension content; a sketch of the proof is enough here.
We want to show that if V is finite dimensional and T:V→W is linear, then rank(T)+nullity(T)=dim(V). The idea is to build one basis of V out of a kernel part and an image part, and count.
Proof (sketch). Let {w1,…,wr} be a basis for im(T), where r=rank(T), and pick preimages v1,…,vr∈V with T(vj)=wj. Let {vr+1,…,vr+ν} be a basis for ker(T), where ν=nullity(T). We claim S={v1,…,vr+ν} is a basis for V; then dim(V)=r+ν and we are done.
Linear independence. Suppose λ1v1+⋯+λr+νvr+ν=0. Applying T kills the kernel vectors and turns the rest into the wj, leaving
λ1w1+⋯+λrwr=0,
so λ1=⋯=λr=0 by independence of the wj. The original relation then collapses to a combination of the kernel basis alone, forcing the remaining λj=0 too.
Spanning. Take any v∈V. Then T(v)∈im(T), so T(v)=λ1w1+⋯+λrwr for some scalars. Set vI=λ1v1+⋯+λrvr; by construction T(vI)=T(v), and hence
T(v−vI)=T(v)−T(vI)=0,
so the "remainder" v−vI lies in ker(T) and is a combination of the kernel basis vectors. Adding the two pieces back together expresses v as a linear combination of S.
Therefore S is a linearly independent spanning set for V, and dim(V)=r+ν=rank(T)+nullity(T). ■
Basically, every vector in the domain splits into a part the map remembers (spanned by the r preimage vectors) and a part the map forgets (the kernel), and the two parts share no overlap.
This appendix collects the general function definitions used in Section 7.8; they apply to all functions, not just linear maps. For a point in the codomain of a function there are three possibilities: it is hit by no point of the domain, by exactly one, or by more than one.
Note
Definition 1
The range or image of a function f:X→Y is the set of all function values,
im(f)={y∈Y:y=f(x) for some x∈X}.
Note
Definition 2
A function f:X→Y is said to be onto (or surjective) if the codomain is equal to the image, that is, if for all y∈Y there exists an x∈X such that y=f(x).
Note
Definition 3
A function f:X→Y is said to be one-to-one (or injective) if no point of the codomain is the value of more than one point of the domain, that is, if f(x1)=f(x2) implies x1=x2.
Basically, onto means "everything in the codomain gets hit" and one-to-one means "nothing gets hit twice". A function which is both hits everything exactly once. Notice how the same formula can be both, either or neither depending on the choice of domain and codomain, as the next three examples show.
Example. The function f:R→R, f(x)=x2, is neither one-to-one nor onto. It is not one-to-one since f(3)=f(−3)=9 with 3=−3, and it is not onto since no x∈R satisfies x2=−1.
Example. The function f:[0,∞)→R, f(x)=x2, is one-to-one but not onto. Restricting the domain removed the negative twin of each square root, but the negative half of the codomain is still never reached.
Example. The function f:[0,∞)→[0,∞), f(x)=x2, is both one-to-one and onto; every y≥0 is f(y) and of nothing else in the domain. Therefore "is f one-to-one/onto?" is a question about the whole package (f,X,Y), not just the formula.
Note
Definition 4
Let f:X→Y be a function. Then a function g:Y→X is called an inverse of f if it satisfies the two conditions:
a) g∘f=idX, i.e. g(f(x))=x for all x∈X, and
b) f∘g=idY, i.e. f(g(y))=y for all y∈Y.
Note
Theorem 1 A function has an inverse if and only if the function is both one-to-one and onto.
The idea of the proof: if f is one-to-one and onto, then every y∈Y is hit by exactly one x∈X, so "send y back to that unique x" is a well-defined function, and it undoes f in both directions; conversely, an inverse forces every point to be hit (onto) and forbids two points sharing a value (one-to-one, since g could not undo it). For the third example above, the inverse is g(y)=y, and indeed x2=x on [0,∞) and (y)2=y; for the first two examples no inverse exists. Combined with Section 7.8, this is exactly why a linear map is invertible if and only if nullity(T)=0 and rank(T)=dim(W); those two conditions are one-to-one and onto in linear-algebra clothing.