A linear map is a function that respects adding and scaling. What it sends to zero (the null space) and what it can reach (the range) trade off exactly. Their dimensions add up to the dimension of the input space.
Taught in 375/376Beyond the courseApostol 2.1 to 2.4Spagnolie, Lectures 7 and 8MATH 375 HW4
In JEE, “linear” meant a straight-line graph. Here it means a function that does not care whether you add first or apply it first, which turns out to be far more useful. Those functions are the main subject of linear algebra. Every matrix is one (chapter 2.5), and so are differentiation, integration, rotations, projections and the layers of a neural network. This chapter defines them and proves the most important fact about them: what a map destroys and what it produces always add up to what it started with.
Before you start
2.1: vector spaces and the subspace test. 2.2: span, basis, dimension, and extending an independent set to a basis (Apostol Thm 1.7). Here are three quick checks.
Quick checkWhat is dimP3, the polynomials of degree at most 3?
A basis is 1,t,t2,t3, which has four vectors. Degree at most 3 means four coefficients c0,c1,c2,c3. The tempting answer 3 counts the top degree and forgets the constant term.Review: dimension
Quick checkIn a 5-dimensional space, you have 3 independent vectors. Which statement is true?
Every independent set extends to a basis, and every basis of a 5-dimensional space has exactly 5 vectors, so we add 2. Three vectors are too few to span a 5-dimensional space, so they are not a basis yet. The rank–nullity proof below uses this extension step.Review: extending to a basis
Quick checkIs {(x,y):y=2x+1} a subspace of R2?
Every subspace contains O, and (0,0) does not satisfy 0=2⋅0+1. A straight line is a subspace only if it passes through the origin. This is the same trap as the 'linear function' y=mx+c warning below.Review: the subspace test
The picture
Each map below moves the whole plane. Pick “Squash to a line” and press “Apply the map”. Every point of the plane lands on the green line, the range. The whole red line, the null space, lands on the single point O, the origin. One dimension survived and one was destroyed, and 1+1=2, the dimension of the plane. That count is this chapter’s main theorem.
Two things to notice in every preset. Grid lines stay straight and evenly spaced (or get squashed flat together), and the origin stays put. Those two facts are what “linear” means geometrically. The arrows ^ and ^ are the standard basis vectors (1,0) and (0,1) of R2 from chapter 2.2.
The language: functions
Same idea elsewhere· Recap: functions (defined in chapter 0.3)
A function (or map, mapping, transformation) T:V→W assigns to each x∈V exactly one element T(x)∈W, the value of T at x (also called the image of x). The set V is the domain and W is the codomain. The set of all outputs, T(V)={T(x):x∈V}, is the range of T (some books call the whole set the image of T). The range can be smaller than the codomain.
T is one-to-one if different inputs always give different outputs: T(x)=T(y) only when x=y. T is onto if its range is all of W. We write x↦T(x), read ”x is sent to T(x)”. Chapter 0.3 has the full treatment, where one-to-one is called injective and onto is called surjective.
Definitions and theorems
Where this came from· Linear substitutions came first
Before anyone said “linear map”, mathematicians used linear substitutions: replace the variables x,y by ax+by and cx+dy. Gauss already composed such substitutions in his work on quadratic forms (1801), and the problem was always the same. A change of variables should simplify a form or an equation, so what does it keep and what does it lose? In 1858 Arthur Cayley wrote substitutions as arrays and defined their sum and product, which began matrix algebra (the word “matrix” is James Joseph Sylvester’s, from about 1850). The definition used here, a function between vector spaces that respects adding and scaling, comes from Peano’s axioms of 1888 and became standard in the twentieth century.
Definition T
Linear map
Let V and W be vector spaces. A function T:V→W is a linear map (Apostol: linear transformation) if, for all x,y∈V and every scalar c:
T(x+y)=T(x)+T(y) (it respects addition);
T(cx)=cT(x) (it respects scaling).
In one lineA function between vector spaces with T(x+y)=T(x)+T(y) and T(cx)=cT(x).
Why it existsThey are the functions that keep grid lines straight and evenly spaced (or collapse them) and keep the origin fixed, and they can be understood completely using bases.
In words: adding then mapping gives the same result as mapping then adding, and the same holds for scaling. Spagnolie’s picture from Lecture 7: the map sends the parallelogram that builds x+y to the parallelogram that builds T(x)+T(y).
Quick checkWhich of these maps R2→R2 is linear?
Each output entry of the first map is a fixed combination of the inputs, so sums and multiples pass straight through. The second has a product x1x2 of two inputs, and doubling the input would quadruple that entry. The third moves the origin, since T(0,0)=(1,0).
Two consequences come up all the time:
T(O)=O. Here the O on the left is the zero of V and the O on the right is the zero of W. (Likewise, in rule 1 the + on the left adds in V and the + on the right adds in W.) Proof: O=0⋅O in V by ‘Scaling by zero’ from 2.1, then rule 2 gives T(0⋅O)=0⋅T(O), and 0⋅T(O)=O in W by ‘Scaling by zero’ again. So a map that moves the origin is not linear.
T passes through every linear combination:T(∑cixi)=∑ciT(xi). Apply rule 1 repeatedly, then rule 2 to each term.
Why· Why linear maps are so easy to understand
The second consequence says a linear map is completely decided by what it does to a basis. If e1,…,en is a basis, every x is ∑ciei, so
T(x)=c1T(e1)+⋯+cnT(en).
Tell me the n vectors T(e1),…,T(en) and I can compute T of anything. In the picture above, the whole plane’s motion is fixed by where the two arrows ^ and ^ land. Chapter 2.5 writes those landing spots as the columns of a matrix.
Worked example
A linear map T:R2→R2 has T(1,0)=(2,1) and T(0,1)=(−1,3). Find T(4,−2).
Solution.
Write the input in the standard basis.(4,−2)=4(1,0)+(−2)(0,1). The values of T are known only on the basis vectors, so express the input with them.
Pass T through the combination.T(4,−2)=4T(1,0)−2T(0,1). Linearity: T respects addition and scaling, so it passes through any linear combination.
Substitute the known values.4(2,1)−2(−1,3)=(8,4)+(2,−6)=(10,−2). Ordinary arithmetic in R2.
Answer.T(4,−2)=(10,−2). The same method gives T of any input, so two vectors of information determine the whole map. This is why a matrix with two columns can describe T.
Your answerSame map: T(1,0)=(2,1) and T(0,1)=(−1,3). What is the SECOND entry of T(3,5)?
Write (3,5)=3(1,0)+5(0,1) and pass T through.
T(3,5)=3T(1,0)+5T(0,1)=3(2,1)+5(−1,3)=(6−5,3+15)=(1,18). The second entry is 3⋅1+5⋅3=18.
Examples, and how to check linearity
Matrix times vector. For a 2 by 2 array A, define T(x1,x2)=(a11x1+a12x2,a21x1+a22x2). Each output entry is a fixed combination of the inputs, so sums and multiples pass straight through. For the first entry: a11(x1+y1)+a12(x2+y2)=(a11x1+a12x2)+(a11y1+a12y2), and the second entry works the same way. Spagnolie’s examples:
[cosθsinθ−sinθcosθ] rotates the plane by θ;
[1000] projects onto the x-axis: (x1,x2)↦(x1,0).
Differentiation.D(f)=f′ is linear on differentiable functions, because (af+g)′=af′+g′. Taking a=1 gives the sum rule from school, and taking g=0 gives the constant-multiple rule. Those are exactly the two conditions.
Integration.T(f)=∫01f(t)dt+f(1) is linear from continuous functions on [0,1] to R (Spagnolie’s Lecture 7). Both parts respect sums and multiples: ∫01(af+g)=a∫01f+∫01g, and (af+g)(1)=af(1)+g(1).
Not linear: T(f)=f+1.T(0)=1=0. One failure is enough.
Not linear: T(x1,x2)=(x1,1) (Apostol 2.4 #7). T(O)=(0,1)=O.
Not linear: doubling the angle (Apostol 2.4 #15). Describe a point by its distance r from the origin and its angle θ measured from the positive x-axis. T keeps r and doubles θ. Then T(1,0)=(1,0) (angle 0 stays 0) and T(0,1)=(−1,0) (angle 90° becomes 180°). Since (1,1)=(1,0)+(0,1), additivity would force T(1,1)=T(1,0)+T(0,1)=(0,0). But (1,1) has angle 45° and radius 2, so T(1,1) has angle 90° and radius 2, which is (0,2). The two answers differ, so T is not linear.
Worked example
Show that T(x1,x2,x3)=(2x1−x3,x2+3x3) is a linear map from R3 to R2.
Solution. The plan: check both conditions for arbitrary inputs, with letters and no numbers.
Name the inputs. Let x=(x1,x2,x3) and y=(y1,y2,y3), and let c be a scalar. Linearity must hold for ALL inputs, so we assume nothing about them.
Check addition.T(x+y)=(2(x1+y1)−(x3+y3),(x2+y2)+3(x3+y3)). Regroup each entry: (2x1−x3)+(2y1−y3) and (x2+3x3)+(y2+3y3). That is T(x)+T(y). Each output entry is a fixed combination of the inputs, so the entry for x+y splits into the entry for x plus the entry for y.
Check scaling.T(cx)=(2cx1−cx3,cx2+3cx3)=c(2x1−x3,x2+3x3)=cT(x). Factor c out of each entry.
Answer. Both conditions hold, so T is linear. As a quick sanity check, T(0,0,0)=(0,0).
Worked example
Is T(x1,x2)=(x1x2,x1) linear?
Solution.
Test the zero vector first.T(0,0)=(0,0). A linear map must send O to O. This one passes, and passing proves nothing yet.
Look for a failure of scaling. Take x=(1,1) and c=2. Then T(x)=(1,1), so cT(x)=(2,2). The product x1x2 is suspicious, because scaling both inputs by 2 scales that product by 4.
Compute the other side.T(cx)=T(2,2)=(4,2). Linearity needs T(cx)=cT(x).
Compare.(4,2)=(2,2). One specific failure is enough to prove “not linear”.
Answer. Not linear, because T(2x)=2T(x) for x=(1,1). The map sends O to O and is still not linear.
Quick checkA function T satisfies T(O)=O. Must T be linear?
T(O)=O is necessary for linearity and not sufficient. The map x↦x2 sends 0 to 0, but T(1+1)=4=2=T(1)+T(1). The test is useful in one direction only: failing it proves a map is not linear.
Watch out· The school 'linear function' y = mx + c is not linear here
f(x)=3x+2 has a straight-line graph, but f(0)=2=0, so it is not a linear map. Its proper name is an affine map: a linear map plus a shift. Only f(x)=mx is linear in this book’s sense.
Your answerFor the school function f(x)=3x+2, compute f(1+1)−(f(1)+f(1)). A linear map would give 0.
Compute f(2), then f(1) twice.
f(2)=8 and f(1)+f(1)=5+5=10, so the difference is 8−10=−2. Additivity fails by exactly the shift 2, which is why 3x+2 is affine and not linear.
What a map kills, and what it reaches
Definition T
Null space
The null space of T:V→W is
N(T)={x∈V:T(x)=O}.
Many books call it the kernel, written kerT. It is part of the domain V.
In one lineAll inputs that T sends to zero, N(T)={x∈V:T(x)=O}. Also called the kernel.
Why it existsIt measures what T destroys. T is one-to-one exactly when only O is destroyed.
Definition T
Range
The range of T is T(V)={T(x):x∈V}, also written R(T) or imT. It is part of the codomain W.
In one lineAll outputs of T, T(V)={T(x):x∈V}. Also called the image.
Why it existsIt measures what T can produce. T(x)=b has a solution exactly when b is in the range.
Theorem TApostol Thms 2.1 and 2.2
Null space and range are subspaces
For a linear map T:V→W, the null space N(T) is a subspace of V and the range T(V) is a subspace of W.
In one lineN(T) is a subspace of the domain and T(V) is a subspace of the codomain.
Why it is trueLinearity carries sums and multiples through T, so both sets pass the subspace test.
ProofSpagnolie Lecture 7; Apostol 2.2
The idea: The subspace test, twice. Each closure check is one use of linearity.
T(O)=O, so O∈N(T) and O∈T(V).
Shown above: every linear map sends O to O.
If x,y∈N(T): T(x+y)=T(x)+T(y)=O+O=O, so x+y∈N(T).
Null space, addition. Linearity, then the assumption that both are sent to O.
If x∈N(T): T(cx)=cT(x)=cO=O, so cx∈N(T).
Null space, scaling. Then cO=O, proved as a problem in 2.1.
If w1=T(x1) and w2=T(x2), then w1+w2=T(x1)+T(x2)=T(x1+x2), which is in T(V).
Range, addition. An element of the range is T of something. Name the somethings.
cw1=cT(x1)=T(cx1)∈T(V). Both sets pass the subspace test.
Range, scaling.
Proof workshopGive the reason for each line: the null space and the range are subspaces
Each line of the proof is shown in order. Choose the reason that justifies it, then press Check.
T(O)=O, so O∈N(T) and O∈T(V).
If x,y∈N(T), then T(x+y)=T(x)+T(y)=O+O=O.
If x∈N(T), then T(cx)=cT(x)=cO=O.
If w1=T(x1) and w2=T(x2), then w1+w2=T(x1+x2)∈T(V).
cw1=cT(x1)=T(cx1)∈T(V).
So N(T) and T(V) are subspaces.
Quick checkT:R3→R2 is linear. The null space N(T) is a subspace of which space?
The null space is the set of INPUTS sent to O, so it lives in the domain R3. The range is the set of outputs and lives in the codomain R2. Mixing these up is the most common slip with rank–nullity.
Definition T
Nullity
The nullity of T is dimN(T).
In one lineThe dimension of the null space: how many independent directions T destroys.
Why it existsIt is the number that rank–nullity trades against the rank.
Definition T
Rank
The rank of T is dimT(V).
In one lineThe dimension of the range: how many independent directions survive in the output.
Why it existsIt is the true size of what T produces. For a matrix it is the number of independent columns (chapter 2.6).
Where this came from· Who named rank and nullity
The idea of rank grew out of a very old question. When does a system of linear equations have a solution, and how many free choices remain? Georg Frobenius gave the word “rank” its modern meaning in the late 1870s, in work on systems of linear equations and forms. Sylvester later coined the word “nullity” for the count of free choices. Rank–nullity says the two always add up to the number of unknowns, which is the budget idea in the box below.
The main theorem
Theorem TApostol Thm 2.3
Rank–nullity theorem
If V is finite-dimensional and T:V→W is linear, then T(V) is finite-dimensional and
dimN(T)+dimT(V)=dimV.
In one lineFor a linear map out of a finite-dimensional space, dimV=rankT+nullityT.
Why it is trueTake a basis of the null space and extend it to a basis of V. The extra vectors are exactly the ones whose images form a basis of the range.
Spagnolie stated this in Lecture 7 and left the proof to the book (“Read the proof in 2.3”). Here it is in full. It uses only two results from chapter 2.2: a subspace of a finite-dimensional space has a basis, and an independent set can be extended to a basis.
Why· The picture behind the proof
Use the “Squash to a line” map again. In it, T(x,y)=(x+2y,0.5x+y). The red line is the null space, the vectors along (−2,1), all sent to O. The green line is the range, the multiples of (1,0.5). Now follow the proof in the picture.
Start with a basis of the null space. Here it is one vector, e1=(−2,1), on the red line, so k=1.
Extend it to a basis of the whole plane by adding one vector off the red line, say e2=(1,0), which is ^. So n=2.
Every point of the plane is c1e1+c2e2. The map kills the e1 part, so all that survives is c2T(e2).
T(e2)=(1,0.5) lies on the green line and spans it. So the range has one basis vector, and k+(n−k)=1+1=2.
ProofApostol 2.3
The idea: Start with a basis of what T destroys, e₁…e_k. Extend it to a basis of all of V by adding e_{k+1}…e_n. Claim: the images of the ADDED vectors form a basis of the range. Then rank = n − k.
Let e1,…,ek be a basis of N(T).
N(T) is a subspace of the finite-dimensional space V, so it has a basis (a problem in 2.2). Call its size k, the nullity. If N(T)={O}, then k=0 and the basis is empty; the proof still works.In the picture: e1 is a vector along the red line.
Extend it to a basis e1,…,ek,ek+1,…,en of V.
Apostol Thm 1.7(a) from 2.2: any independent set extends to a basis. n=dimV.In the picture: e2 is a vector off the red line, such as ^.
Claim: T(ek+1),…,T(en) is a basis of T(V).
This is what we will show. Then dimT(V)=n−k, which rearranges to the theorem.
Let w=T(x)∈T(V), and write x=∑i=1nciei.
Spanning. Take any output T(x) and expand x in the basis of V.
w=∑i=1nciT(ei)=∑i=k+1nciT(ei), since T(ei)=O for i≤k. So the claimed vectors span T(V).
Linearity passes T through the combination. The first k basis vectors are in the null space, so their images are O and drop out.In the picture: the red part of every point is sent to O, and only the part along e2 lands on the green line.
Suppose ∑i=k+1nciT(ei)=O.
Independence. Suppose some combination of the claimed vectors is O, and show every coefficient is zero.
Then T(∑i=k+1nciei)=O, so z=∑i=k+1nciei is in N(T).
Linearity backwards: a combination of images is the image of the combination.
So z=∑i=1kdiei for some scalars di.
Everything in N(T) is a combination of its basis e1,…,ek.
∑i=1kdiei−∑i=k+1nciei=O.
Subtract the two expressions for z. This is a combination of the whole basis e1,…,en equal to O.
All ci=0. So T(ek+1),…,T(en) is independent.
e1,…,en is a basis, hence independent, so every coefficient is zero. In particular every ci is zero.
dimT(V)=n−k, so dimN(T)+dimT(V)=k+(n−k)=n=dimV.
It spans and is independent, so it is a basis. It has n−k vectors.
Quick checkIn the proof, why are T(e1),…,T(ek) left out of the basis of the range?
e1,…,ek are in the null space, so T(ei)=O for each. They are in the range, but a set containing O is dependent. They also add nothing to the span. In the picture, the red line contributes nothing to the green line.
Proof workshopRebuild the rank–nullity proof
Tap the lines in the order a proof would write them. Each line can only use what is already above it.
Start from what T destroys: the null space is a subspace of a finite-dimensional space, so it has a basis.
Any independent set extends to a basis (2.2).
To extend a basis of the null space, you first need that basis.
Expand x in the basis of V; the first k images are O. So T(ek+1),…,T(en) span the range.
This expands x in a basis of V, so that basis must exist first.
Linearity backwards: a combination of images is the image of the combination. This starts the independence check.
Show the vectors span before showing they are independent; independence only matters once you know they are the right candidates.
Anything in N(T) is a combination of its basis; moving everything to one side gives a combination of the whole basis of V equal to O.
This uses that the combination lies in the null space, which the previous line shows.
T(ek+1),…,T(en) span and are independent, so they are a basis of the range, with n−k vectors.
The count needs both spanning and independence to be established first.
Why· What the theorem means
Think of dimV as a budget of independent directions. A linear map spends each one in one of two ways: it destroys it (sends it to O) or keeps it alive in the output. Nothing is created and nothing goes missing. A map from R3 to R2 must destroy at least one direction, because its range has room for at most 2. A map from R2 to R3 can reach at most a plane in R3.
Your answerA linear map T:P5→R3 is onto. What is dimN(T)?
dimP5 is not 5. Count the coefficients.
Onto means the range is all of R3, so the rank is 3. The domain P5 has dimension 5+1=6 (coefficients c0,…,c5). Rank–nullity: dimN(T)=6−3=3. The common slip is using 5 for dimP5.
Worked example
Let T:R7→R4 be linear and onto. What is dimN(T)? Then decide whether a linear map S:R6→R3 can have a null space of dimension 2.
Solution, part 1.
Translate “onto”. The range is all of R4, so the rank is dimR4=4. Rank is the dimension of the range, and onto means the range is the whole codomain.
Apply rank–nullity to the domain.dimN(T)+4=dimR7=7. The theorem compares the total with the dimension of the DOMAIN, here 7.
Solve.dimN(T)=3. No computation with vectors was needed. Only the dimensions entered.
Solution, part 2.
Assume such an S exists and find the rank it would force. The nullity would be 2, so the rank is 6−2=4. Rank–nullity with dimR6=6.
Compare with the codomain. The range of S is a subspace of R3, so its dimension is at most 3. A subspace of a 3-dimensional space has dimension at most 3 (a problem in 2.2).
Conclude.4≤3 is false. The assumption led to a contradiction.
Answer.dimN(T)=3, and no such S exists. In fact every linear map R6→R3 has nullity at least 6−3=3.
Examples and non-examples
Projection onto the x-axis (Apostol 2.4 #3). T(x1,x2)=(x1,0). The null space is {(0,x2)}, the y-axis, with nullity 1. The range is {(w1,0)}, the x-axis, with rank 1. Check: 1+1=2=dimR2.
A map from R3 to R2 (Lecture 7). T(x1,x2,x3)=(x1,0). Its null space is {(0,a,b)}, the yz-plane, with nullity 2. Its range is the x-axis of R2, with rank 1. Check: 2+1=3.
Worked example
Find the null space, range, rank and nullity of T:R3→R3, T(x1,x2,x3)=(x1+x2,x2+x3,x1−x3).
Solution.
Find the null space by solving T(x)=O. The equations are x1+x2=0, x2+x3=0 and x1−x3=0. The null space is the set of inputs sent to O, so we set the output to O.
Solve. The first gives x1=−x2 and the second gives x3=−x2. The third then reads −x2+x2=0, which is always true. So x2=s is free and x=s(−1,1,−1). The third equation adds no new condition. This is why one unknown stays free.
Read off the null space.N(T)=L({(−1,1,−1)}), so the nullity is 1. One basis vector means dimension 1.
Find the range from the images of the standard basis.T(1,0,0)=(1,0,1), T(0,1,0)=(1,1,0), T(0,0,1)=(0,1,−1). Every input is a combination of the standard basis, and T passes through combinations, so the range is the span of these three images.
Remove the waste.(1,1,0)=(1,0,1)+(0,1,−1), so the second image is a combination of the others. The other two are independent, since neither is a multiple of the other. A basis of the span needs independence, so we drop the dependent vector (chapter 2.2).
Read off the range.T(V)=L({(1,0,1),(0,1,−1)}) is the plane of outputs (a,b,a−b), and the rank is 2. Two basis vectors mean dimension 2.
Check with rank–nullity.1+2=3=dimR3. The theorem must hold. If it did not, we would have made an arithmetic mistake.
Answer.N(T)={s(−1,1,−1)} with nullity 1, and T(V) is the plane {(a,b,a−b)} with rank 2.
Your answerLet T:R3→R3 be T(x1,x2,x3)=(x1+x2+x3,2x1+2x2+2x3,3x1+3x2+3x3). What is its rank?
Write the output as s times a fixed vector.
Every output is (s,2s,3s) with s=x1+x2+x3, a multiple of (1,2,3). So the range is that line, with rank 1. (Nullity is then 3−1=2: the plane x1+x2+x3=0.)
Worked example Apostol 2.4 #10
Show that T(x1,x2)=(2x1−x2,x1+x2) has nullity 0, and that it is onto R2.
Solution.
Set T(x)=O.2x1−x2=0 and x1+x2=0. This finds the null space.
Solve. The first gives x2=2x1. Put it into the second: x1+2x1=3x1=0, so x1=0 and x2=0. Substitution leaves one equation in one unknown.
Read off the nullity.N(T)={O}, so the nullity is 0. The only input sent to O is O itself.
Use rank–nullity. The rank is 2−0=2. dimN(T)+dimT(V)=dimR2.
Conclude onto. The range is a 2-dimensional subspace of R2, so it is all of R2. A subspace with the full dimension is the whole space (a problem in 2.2).
Check by hitting a target. To reach (w1,w2), take x1=(w1+w2)/3 and x2=(2w2−w1)/3. Then 2x1−x2=w1 and x1+x2=w2. An explicit formula confirms that every target is reached.
Answer. Nullity 0, rank 2, and T is onto. Compare this with the “Squash to a line” map, which has nullity 1 and is not onto. When the domain and codomain have the same dimension, the two properties go together.
Second derivative on polynomials (Lecture 7). Let V=Pn−1 and T(f)=f′′. (We use Pn−1 so that dimV=n, and take n≥2.) The null space is {a+bt}, because f′′=0 exactly for these, so the nullity is 2. Differentiating twice lowers the degree by 2, and every polynomial of degree at most n−3 is reached by integrating it twice. So the range is all polynomials of degree at most n−3, with rank n−2. Check: 2+(n−2)=n.
Your answerLet T(f)=f′′ on P6. What is the rank of T?
Find the nullity first, and remember dimP6=7.
dimP6=7. The null space is {a+bt} (the polynomials with zero second derivative), nullity 2. Rank–nullity gives rank 7−2=5. Indeed the range is P4, which has dimension 5.
Differentiation on all differentiable functions.N(D)={constant functions}, because f′=0 exactly when f is constant. See the application below. The domain is infinite-dimensional, so rank–nullity does not apply.
Worked example
Let D:P3→P3 be D(f)=f′. Show that D is linear, and find its null space, range, rank and nullity.
Solution.
Check linearity.D(af+g)=(af+g)′=af′+g′=aD(f)+D(g). The derivative rules from school are exactly the two conditions. The output of D has degree at most 2, so it lands in P3.
Write a general input and its image.f=c0+c1t+c2t2+c3t3 gives D(f)=c1+2c2t+3c3t2. Differentiate term by term.
Find the null space.D(f)=0 forces c1=0, 2c2=0 and 3c3=0. So f=c0, a constant. A polynomial is the zero polynomial exactly when all its coefficients are 0.
Read off the nullity.N(D)=L({1}), so the nullity is 1. The constants have basis {1}.
Find the range. The target p+qt+rt2 is reached by c1=p, c2=q/2, c3=r/3 (and any c0). So D(P3)=P2, with basis 1,t,t2 and rank 3. We solved for an input that hits an arbitrary target in P2. Nothing of degree 3 can be hit, because differentiating lowers the degree.
Check.1+3=4=dimP3. Rank–nullity.
Answer.N(D) is the constants, nullity 1. The range is P2, rank 3. Since P2 is smaller than the codomain P3, D is not onto. (On all differentiable functions the null space of D is again the constants, which is why every antiderivative carries a "+C".)
Worked example
Prove: for a linear map T, we have T(x)=T(y) exactly when x−y∈N(T).
Solution. The plan: both directions use the identity T(x−y)=T(x)−T(y), which comes from linearity.
Prove the identity.T(x−y)=T(x+(−1)y)=T(x)+(−1)T(y)=T(x)−T(y). Condition 1 splits the sum, and condition 2 takes the scalar −1 out.
(⇒) Assume T(x)=T(y). Then T(x−y)=T(x)−T(y)=O. Use the identity, then the assumption that the two outputs are equal.
Conclude this direction. So x−y∈N(T). That is the definition of the null space.
(⇐) Assume x−y∈N(T). Then O=T(x−y)=T(x)−T(y). The definition of the null space, then the identity.
Conclude this direction. Add T(y) to both sides to get T(x)=T(y). Axioms 3 to 6 from 2.1 let us move a term across.
Answer. Two inputs have the same output exactly when they differ by a vector of the null space. This lemma is the heart of “one-to-one iff N(T)={O}”, and of the fact that all solutions of T(x)=b are one solution plus the null space.
Worked example
For T(x1,x2,x3)=(x1+x2,x2+x3,x1−x3), find ALL solutions of T(x)=(3,5,−2).
We found N(T)={s(−1,1,−1)} and the range {(a,b,a−b)} in an example above.
Solution.
Check that a solution exists. The target (3,5,−2) has the form (a,b,a−b) with a=3, b=5, since 3−5=−2. T(x)=b is solvable exactly when b is in the range.
Find one solution by guessing a free value. Try x2=0. Then x1+x2=3 gives x1=3, and x2+x3=5 gives x3=5. The third entry is 3−5=−2, as required. Any one solution will do. We call it the particular solution x0=(3,0,5).
Add the whole null space. Every solution is x0+s(−1,1,−1). If T(x)=b and T(x0)=b, then T(x−x0)=O, so x−x0 is in the null space (the lemma above).
Check one member. For s=1: x=(2,1,4), and T(x)=(3,5,−2). Confirms that the family really solves the equation.
Answer.x=(3,0,5)+s(−1,1,−1) for any real s: a line of solutions, parallel to the null space.
Quick checkCan a linear map T:R3→R2 be one-to-one?
The rank is at most 2, so by rank–nullity the nullity is at least 3−2=1. Then some x=O has T(x)=O=T(O), so two different inputs share an output. The third reason is wrong because R3 and R2 have the same number of points, in the sense that a one-to-one matching exists. That matching cannot be linear.
Where it is used
Used inside maths· Inside maths: the + C in every integral
Why does every antiderivative come with "+C"? Because D(f)=f′ is linear, and its null space is the constants. Suppose D(F)=g and D(G)=g. By linearity, D(G−F)=D(G)−D(F)=g−g, the zero function. So G−F is in the null space, which means G=F+C for a constant C. In general, if T(x)=b has at least one solution x0, then all its solutions are x0 plus the null space. The reason is the same two lines: T(x)=b exactly when T(x−x0)=T(x)−T(x0)=b−b=O, that is, when x−x0∈N(T). The same reasoning gives “particular solution plus complementary function” for differential equations in MATH 376, and “one solution plus free variables” for Ax=b in chapter 2.6.
Used in the real world· Cameras: the null space is the line of sight
A simple (orthographic) camera looking along the z-axis records a 3D point (x,y,z) as the 2D point (x,y). That is a linear map from R3 to R2. Its null space is the z-axis: every point straight in front of the lens lands on the same pixel. Rank–nullity says 3=2+1, so exactly one direction of information is lost in every photo, and that direction is depth. So in this idealised camera, depth cannot be recovered from the image alone. Real cameras use perspective, which is not linear, and phones add a second lens or a depth sensor to measure depth directly.
Used in the real world· AI: what a neural-network layer cannot see
A dense layer computes y=Wx, a linear map from R2048 to R512 when W is a 512 by 2048 weight matrix. Its rank is at most 512, so by rank–nullity its null space has dimension at least 2048−512=1536. Any change to the input along those 1536 directions produces exactly the same output. The layer cannot see it. Designing bottleneck layers (autoencoders, the “down-projection” in transformers) means choosing which directions to throw away.
Traps
Watch out· Check T(0) = 0 first
It is the fastest way to catch a non-linear map. T(x)=x+1, T(x1,x2)=(x1,1) and T(f)=f+1 all fail it at once. But passing it proves nothing: T(x)=x2 has T(0)=0 and is not linear.
Watch out· Null space lives in the domain, range lives in the codomain
For T:R3→R2, the null space is a subspace of R3 and the range is a subspace of R2. Rank–nullity adds their dimensions and compares the total with the dimension of the DOMAIN. The codomain’s dimension does not appear in it.
Watch out· Examples cannot prove linearity
To show T is linear you must check both conditions for ARBITRARY x, y and c. One counterexample shows it is not linear, as with the angle-doubling map, where one pair of vectors breaks additivity.
Problems
checkApostol 2.4 #7
Is T(x1,x2)=(x1,1) linear?
Solution
No. T(0,0)=(0,1)=(0,0).
check
A linear map T:R5→R3 has rank 3. What is its nullity? Can a linear map R5→R3 have nullity 1?
Solution
Nullity =5−3=2. Nullity 1 would force rank 4, but the range sits inside R3, so the rank is at most 3. So no.
check
Is T(f)=f(0), from functions to R, linear? What is its null space?
Solution
Yes: (af+g)(0)=af(0)+g(0). The null space is all functions with f(0)=0.
useApostol 2.4 #13
Let T reflect the plane in a line through the origin at angle α. Show T is linear and find its null space and range.
Solution
Let v=(−sinα,cosα), a unit vector perpendicular to the mirror. Then T(x)=x−2(x⋅v)v: subtract twice the part of x that sticks out from the mirror, which flips that part to the other side. The dot product x⋅v is linear in x, so T is linear. Reflecting twice puts every point back where it started, so T(T(x))=x. If T(x)=O, then x=T(T(x))=T(O)=O, so N(T)={O}. Rank–nullity then gives rank 2, and a 2-dimensional subspace of R2 is all of R2 (a problem in 2.2). So the range is R2.
useApostol 2.4 #28
Let V be the convergent real sequences. For x=(xn) with limit a, define T(x)=(a−xn). Show T is linear and describe its null space and range.
Solution
If xn→a and yn→b, then xn+yn→a+b, so T(x+y)=(a+b−xn−yn)=T(x)+T(y). Similarly T(cx)=cT(x). The null space is the sequences with xn=a for all n: the constant sequences. Every T(x) converges to a−a=0. Every sequence yn→0 is reached: take x=−y, whose limit is 0, so T(x)=(0+yn)=y. So the range is all sequences converging to 0.
use
Find the null space, range, rank and nullity of T:P3→P3, T(f)=f′−f(0). (Here f(0) means the constant polynomial with that value.)
Solution
Write f=c0+c1t+c2t2+c3t3. Then T(f)=(c1−c0)+2c2t+3c3t2. T(f)=0 forces c2=c3=0 and c1=c0, so N(T)={c(1+t)} and the nullity is 1. The range is all of P2, since any p+qt+rt2 is hit with c2=q/2, c3=r/3, c0=0, c1=p. So the rank is 3. Check: 1+3=4=dimP3.
prove
Prove that a linear map T is one-to-one (that is, T(x)=T(y) implies x=y) if and only if N(T)={O}.
Solution
If T is one-to-one and T(x)=O=T(O), then x=O. So N(T)={O}.
Conversely, suppose N(T)={O} and T(x)=T(y). Then T(x−y)=T(x)−T(y)=O, so x−y∈N(T). Hence x−y=O and x=y.
prove
Let dimV=dimW=n and let T:V→W be linear. Prove that T is one-to-one if and only if it is onto (its range is all of W).
Solution
By the previous problem, one-to-one means nullity 0. By rank–nullity, nullity 0 is the same as rank n. A subspace of W with dimension n=dimW is all of W (a problem in 2.2), so rank n means the range is W, which is onto. Each step reverses.
prove
Let T:V→W be linear and x1,…,xk∈V. Prove: if T(x1),…,T(xk) are independent, then so are x1,…,xk. Is the converse true?
Solution
Suppose ∑cixi=O. Apply T: ∑ciT(xi)=T(O)=O. Independence of the images forces all ci=0.
The converse is false. x1=(0,1) is independent by itself, but the projection T(x1,x2)=(x1,0) sends it to O. The converse holds when N(T)={O}.
proveApostol 2.4, adapted
Prove that a linear map is determined by its values on a basis: if S and T are linear, e1,…,en is a basis of V, and S(ei)=T(ei) for every i, then S=T.
Solution
Any x∈V is ∑ciei. Then S(x)=∑ciS(ei)=∑ciT(ei)=T(x), using linearity of each map.
stretchAxler 3B
Prove that there is no linear map T:R5→R2 whose null space is {(x1,…,x5):x1=3x2 and x3=x4=x5}.
Solution
That set is {(3a,a,b,b,b)}=L({(3,1,0,0,0),(0,0,1,1,1)}), which has dimension 2. Rank–nullity would then give rank 5−2=3. But the range sits inside R2, so the rank is at most 2. So no such map exists.
stretch
Let T:V→V be linear with V finite-dimensional and T∘T=0 (applying T twice gives O for every input). Prove rankT≤21dimV.
Solution
If w=T(x) is in the range, then T(w)=T(T(x))=O, so w∈N(T). Thus T(V)⊆N(T), so rankT≤nullityT. Adding rankT to both sides and using rank–nullity: 2rankT≤rankT+nullityT=dimV.
Summary
A linear map respects addition and scaling. Consequences: T(O)=O, and T passes through linear combinations.
A linear map is determined by what it does to a basis. This is why matrices can describe them (2.5).
Null spaceN(T): inputs sent to O, a subspace of the domain. RangeT(V): all outputs, a subspace of the codomain.
Rank=dimT(V), nullity=dimN(T).
Rank–nullity:nullity+rank=dimV. Proof: extend a basis of the null space to a basis of V; the images of the added vectors are a basis of the range.
T is one-to-one exactly when N(T)={O}. Between spaces of equal finite dimension, one-to-one and onto are the same thing.
If T(x)=b has a solution x0, all its solutions are x0 plus the null space. That one fact explains the +C in integrals, the complementary function in ODEs, and the free variables of linear systems.
Watch and read
The same ideas explained by someone else. Use these when an explanation here does not land.
CS 240: Functions, domain and codomain, and one-to-one and onto come from CS 240's chapter on functions. Here the functions are linear, which makes them far easier to understand.
MATH 376: The operator L(y) = y'' + Py' + Qy is a linear map. Its null space is the set of solutions of L(y) = 0, and the general solution of L(y) = g is one solution plus the null space.
AI: A dense layer of a neural network computes Wx: a linear map. Rank–nullity tells you how many input directions the layer cannot see.