Mathematics 2Week 5 · Rank, Nullity and Linear Transformations
Week 5 Notes
Mathematics for Data Science 2
Rank, nullity and linear maps: the null space and how to find its basis, the rank–nullity theorem, linear mappings and their matrices, and linear transformations with one-one and onto tests.
7 chapters43 worked examples~59 min read
Null spaceNullityRank–nullityLinear mapsOne-one and onto
Every matrix A sends some vectors to zero. This chapter is about that set: what it is, why it is always a subspace, and how big it is.
1.1Definition
The null space of a matrix A of order m×n is the set of all vectors that A sends to the zero vector:
N(A)={x∈Rn:Ax=0}
In other words, the null space is the set of all solutions of the homogeneous system Ax=0. Each solution is a vector with n entries, so the null space lives inside Rn.
Trap
The null space lives in Rn, where n = number of columns, not rows. The null space of a 2×3 matrix is in R3, not R2. If an option gives a vector of the wrong size (for example 2 entries for a matrix with 3 columns), it is wrong straight away.
One thing is always true: A⋅0=0. So the zero vector is in the null space of every matrix. The real question is what else is in it.
Notation
ej is the vector with 1 in position j and 0 everywhere else, for example e3=(0,0,1,0) in R4. In matrices, blue marks a pivot and orange marks a free variable or free column.
1.2What the null space means: a recipe that cancels the columns
Look at a matrix–vector product column by column: Ax is a linear combination of the columns of A, and the weights are the entries of x. For example:
Every vector in the null space is a recipe: "take this much of column 1, this much of column 2, … and everything cancels to zero." If the columns are linearly independent, the only recipe is the one with all weights zero. If some columns are dependent on the others, non-zero recipes exist.
Example 1.1A null space that is a line
Find and draw the null space of A=[1224].
Solution
1. Look at the columns.C1=[12] and C2=[24]. Notice C2=2C1, so
2C1−1⋅C2=0⇒x=(2,−1)∈N(A)
2. Confirm with equations.Ax=0 means:
x+2y=02x+4y=0
The second equation is twice the first, so there is really one equation: x+2y=0, i.e. x=−2y. Let y be free, y=t:
(x,y)=(−2t,t)=t(−2,1)t∈R
3. Picture. This is a straight line through the origin (Figure 1). Every point on it gives Ax=0. A point off the line, such as (1,1), does not: A(1,1)=(3,6).
Answer.N(A)={t(−2,1):t∈R}=span{(−2,1)}. It is a line, so its dimension is 1.
Figure 1. The null space of A=[1224] is a line through the origin. Every point on the line (blue) gives Ax=0; the point off the line (red) does not.
1.3The null space is always a subspace
In Figure 1 the null space came out as a line through the origin. That is not a coincidence: the null space is always a subspace of Rn (a flat piece through the origin: a point, a line, a plane, …). All three checks follow directly from Ax=0:
It contains zero:A⋅0=0. ✓
It is closed under addition: if Au=0 and Av=0, then
A(u+v)=Au+Av=0+0=0
It is closed under scalar multiplication: if Au=0, then for every number c
A(cu)=c(Au)=c⋅0=0
Because it is a subspace, it has a basis and a dimension. That dimension is called the nullity.
1.4Nullity
nullity(A)=dimN(A)
Nullity measures how much freedom (how many independent directions) the solutions of Ax=0 have. In Example 1.1 the null space is a line, so the nullity is 1.
Nullity
What the null space looks like
Solutions of Ax=0
0
Just one point: {0}
Only x=0 (unique)
1
A line through the origin
Infinitely many (one free variable)
2
A plane through the origin
Infinitely many (two free variables)
k
A k-dimensional subspace
Infinitely many (k free variables)
Three examples worth remembering:
IdentityIn: Inx=x, so Inx=0 only when x=0. N(In)={0}, nullity 0.
Zero matrix0m×n: 0x=0 for every x. N(0)=Rn, nullity n.
Diagonal200000005: the equations are 2x1=0,0=0,5x3=0. So x1=x3=0 and x2 is anything. N=span{e2}, nullity 1.
1.5Is a vector in the null space? Just multiply
Example 1.2Which vectors are in N(A)? (MSQ)
A=[12−1121]. Which vectors are in N(A)?
A
(−1,1,1)
B
(2,−2,−2)
C
(1,1,−1)
D
(−1,1)
E
(0,0,0)
Solution
Plan
A has 3 columns, so only vectors with 3 entries make sense. Multiply each one by A and see whether you get zero.
A−111=[−1−1+2−2+1+1]=[00]
A11−1=[1−1−22+1−1]=[−22]=0
A: correct.A(−1,1,1)=(0,0).
B: correct.(2,−2,−2)=−2⋅(−1,1,1). The null space is a subspace, so multiples stay inside (Section 1.3). You can also multiply to check.
C: wrong.A(1,1,−1)=(−2,2)=0.
D: wrong. It has only 2 entries, but A has 3 columns, so the product is not even defined. The null space is in R3.
E: correct. The zero vector is in every null space.
Answer. A, B, E.
1.6Two shortcuts that save time
Shortcut 1: Aej is the j-th column of A. In ej only the j-th weight is 1, so Aej=Cj. Therefore:
ej∈N(A)⟺the j-th column of A is entirely zero
For example, in [301200] column 3 is zero, so e3=(0,0,1)∈N(A). Column 1 is not zero, so e1∈/N(A).
Shortcut 2: spot dependent columns by eye. If one column is clearly a combination of others, that combination is a null space vector. In [132601] we have C2=2C1, so 2C1−C2+0C3=0, i.e. (2,−1,0)∈N(A). Check: A(2,−1,0)=(2−2,6−6)=(0,0). ✓
1.7Do not confuse the null space with the row space
Row by row, Ax=0 says: every row of A, multiplied entry by entry with x and added up, gives 0 (each row has dot product 0 with x).
This gives a useful fact: a non-zero row of A is never in N(A). Multiply a row r=(r1,…,rn) with itself:
r12+r22+⋯+rn2>0(if r=0)
So that row does not give zero against itself, which means Ar=0.
Trap (seen in graded assignments)
Options often contain the rows of the matrix (or vectors like them) and ask whether they span the null space. Rows belong to the row space, not the null space. Multiply every vector in every option by A.
Key takeaway
N(A)={x:Ax=0} lives in Rn (n = number of columns).
A null space vector is a recipe that cancels the columns.
The null space is always a subspace and always contains 0. Nullity is its dimension.
N(In)={0} (nullity 0), N(0)=Rn (nullity n).
ej∈N(A)⟺ column j is zero. A non-zero row is never in the null space.
Revision overview
DefinitionN(A) = all x with Ax = 0 lives in ℝⁿ, n = columns
Subspacecontains 0, closed under + and × so it has a basis
Nullitydim N(A) number of free directions
The null spaceWeek 5 · Part 1
Quick testsmultiply the vector by A eⱼ ∈ N(A) ⟺ column j is zero
Watch outa non-zero row is never in N(A) wrong size = wrong option
This is the method you will use most this week. Once it is automatic, every "null space", "nullity" and "possible basis" question takes a couple of minutes.
2.1The method in 5 steps
Two terms to know
In the RREF, a variable whose column has a pivot (leading 1) is a dependent variable. A variable whose column has no pivot is an independent (free) variable: it can take any value. IIT Madras assignments use the words "dependent variables" and "independent variables".
Reduce to RREF. Row operations do not change the solutions of Ax=0, so they do not change the null space.
Mark pivot and free columns. Variables of pivot columns are dependent; the rest are independent (free).
Write each dependent variable in terms of the free variables. Each non-zero row of the RREF is one equation: "pivot variable = combination of free variables".
Build one vector per free variable: set that free variable to 1, all other free variables to 0, and fill in the dependent variables from step 3.
These vectors form a basis. Their number = number of free variables = nullity.
Formula
nullity(A) = number of independent (free) variables = number of columns without a pivot in the RREF
If there are no free variables, then N(A)={0}, its basis is the empty set ∅, and the nullity is 0.
2.2Why the method gives a basis
A basis has two jobs: span the whole null space, and be linearly independent. The method does both automatically.
Spanning: every solution of Ax=0 is completely determined by the values of the free variables. If the free variables are x2=s and x4=t, the solution is s⋅v1+t⋅v2, where v1,v2 are the vectors from step 4. So every solution is a combination of them.
Independence: in the free positions, each vector from step 4 has a 1 in its own slot and 0 in the other free slots (Figure 2). No vector can be built from the others, because the others all have 0 where it has its 1.
Figure 2. The basis vectors from Example 2.1. The orange columns belong to the free variables. Each vector has 1 in its own free slot and 0 in the other.
2.3A complete worked example
Example 2.1Basis and nullity of a 3×4 matrix
A=12124213014−1. Find a basis of N(A) and nullity(A).
Solution
1. RREF. Clear the entries below the first pivot, then create a pivot in column 3:
Answer. Basis {(−2,3,1,0,0),(1,−2,0,−4,1)}, nullity(A)=2. (A and R have the same null space, because row operations do not change solutions.)
Sign trap
Do not copy RREF entries straight into the basis vector. The row x1+2x3−x5=0 gives x1=−2x3+x5: the entries change sign. Always finish by multiplying with the original A.
2.5A matrix with a zero column ("possible basis" questions)
Example 2.3Which set is a possible basis of N(A)?
A=2010130000000040. Which sets are possible bases of N(A)?
A
{(0,0,1,0),(0,0,0,1)}
B
{(0,0,1,0)}
C
{(0,1,0,0)}
D
{(0,0,−3,0)}
E
{(1,0,0,0)}
Solution
1. Write the equations. The rows of Ax=0:
2x1+x2=03x2=0x1+4x4=00=0
2. Solve one by one. The second equation gives x2=0. Then the first gives 2x1=0⇒x1=0, and the third gives 4x4=0⇒x4=0. x3 appears in no equation, so it is free.
x=(0,0,t,0)=t(0,0,1,0)
Shortcut
Column 3 is entirely zero, so e3∈N(A) (Section 1.6). The other three columns are independent, so the nullity is exactly 1.
3. Options. Nullity 1 means a basis has exactly one non-zero vector from the null space.
A: wrong. Two vectors, but the nullity is 1. Also (0,0,0,1)∈/N(A), since Ae4 = column 4 = (0,0,4,0)=0.
B: correct.e3∈N(A), and one non-zero vector is a basis of a 1-dimensional space.
C: wrong.Ae2 = column 2 = (1,3,0,0)=0.
D: correct.(0,0,−3,0)=−3e3. Any non-zero multiple of a basis vector is also a basis. That is what "possible basis" means: bases are not unique.
E: wrong.Ae1 = column 1 = (2,0,1,0)=0.
Answer. B and D. nullity(A)=1, rank(A)=3.
2.6When the nullity is 0
Example 2.4No free variables
Find the null space and nullity of A=120011201.
2. Read off. Every column has a pivot, so there are no free variables. The equations say x1=0,x2=0,x3=0.
Shortcut
For a square matrix, check the determinant (expanding along the first row):
detA=1(1⋅1−0⋅1)−0+2(2⋅1−1⋅0)=1+4=5=0
A non-zero determinant means rank 3, so nullity 0.
Answer.N(A)={0}, basis =∅ (the empty set), nullity(A)=0.
Trap
The basis of {0} is not{(0,0,0)}. Any set containing the zero vector is linearly dependent, so it cannot be a basis. The basis of {0} is the empty set, and its dimension is 0.
2.70–1 (rating) matrices: "spans" versus "basis"
Several assignment questions encode data as vectors of 0s and 1s. With a 5-star rating, "3 stars" becomes (0,0,1,0,0): 1 in position 3, 0 elsewhere. Someone who gives no rating gets a zero row. So every row of such a matrix is either zero or some ej.
Example 2.5A matrix of movie ratings
Five friends rate a movie from 1 to 5 stars. Riya: 3★, Kabir: 3★, Meera: 1★, Dev: no rating, Sara: 4★. Each friend's row is the 0–1 vector of their rating:
2. Free variables.x1,x3,x4 must be zero. x2,x5 appear in no equation, so they are free. In words: nobody gave 2★ or 5★, so columns 2 and 5 are zero.
N(A)={(0,s,0,0,t)}=span{e2,e5},nullity(A)=2
3. Rank. The distinct non-zero rows are e3,e1,e4 (Riya and Kabir have the same row; Dev's row is zero). These three are independent, so the rank is 3. Check: 3+2=5 columns. ✓
A: wrong.e1∈/N(A) (column 1 is not zero: Meera gave 1★). If even one vector of a set lies outside the null space, its span cannot equal the null space.
B: correct. Both vectors are in the null space, and every null space vector is a combination of them.
C: correct. All three are in the null space and their span is still span{e2,e5}. The set spans; it is just not a basis (the third vector is redundant). The option asks about spanning, so it is true.
D: correct. Two free variables.
E: wrong. There are only two free variables (x2,x5), so the nullity is 2.
F: correct. Three distinct non-zero 0–1 rows.
Answer. B, C, D, F.
Shortcut for 0–1 matrices
When every row is zero or some ej: (1) rank = number of differentej that appear as rows; (2) a star rating nobody gave has a zero column, and those ej form a basis of the null space; (3) nullity = number of zero columns.
2.8Is a given set a basis? Three checks
In MSQs you usually check options instead of finding a basis yourself. First find the nullity (count the free variables), then apply three checks to each option:
Inside? Multiply every vector by the original A. You must get zero.
Right count? The number of vectors must equal the nullity. Fewer cannot span; more must be dependent.
Independent? No vector may be a multiple or combination of the others. Tip: look only at the free slots. If the short vectors formed by the free slots are independent, the full vectors are independent too.
If the question asks whether a set spansN(A), check 1 is essential and the set needs at least as many independent vectors as the nullity. Extra (redundant) vectors are allowed.
Example 2.6Check the options
Take A from Example 2.1: A=12124213014−1 (nullity=2, free x2,x4). Which sets are bases of N(A)?
A
{(−2,1,0,0)}
B
{(−2,1,0,0),(1,0,−2,1)}
C
{(−2,1,0,0),(−4,2,0,0)}
D
{(−1,1,−2,1),(1,0,−2,1)}
E
{(1,1,1,1),(1,0,−2,1)}
F
{(−2,1,0,0),(1,0,−2,1),(−1,1,−2,1)}
Solution
Checking the first vector of option D:
A−11−21=−1+2−2+1−2+4−6+4−1+2+0−1=000
A: wrong. Only one vector, but the nullity is 2. It cannot span the null space (check 2 fails).
D: correct. Both are in the null space (the first is v1+v2). Free slots (x2,x4): (1,1) and (0,1), not multiples of each other, so independent. Two independent vectors and nullity 2: a basis.
E: wrong.A(1,1,1,1)=(5,13,2)=0 (check 1 fails).
F: wrong. All three are in the null space and they span it, but three vectors in a 2-dimensional space are dependent. Not a basis. (If the question asked "spans", this would be true.)
Answer. B and D.
2.9How many solutions does Ax = 0 have?
The solution set of a homogeneous system is the null space, so the nullity tells you how many solutions there are:
Condition
Solutions of Ax=0
nullity(A)=0 (i.e. rank=n)
Only one: x=0 (the trivial solution)
nullity(A)≥1 (i.e. rank<n)
Infinitely many
More unknowns than equations (n>m)
Always infinitely many, because rank≤m<n
Square matrix, detA=0
Only x=0
Square matrix, detA=0
Infinitely many
There are never exactly two or three solutions. If one non-zero solution v exists, then 2v,3v,−v,… are solutions too (Section 1.3). So it is either one solution or infinitely many.
2.10Application: balancing chemical equations
Balancing a chemical equation means choosing a coefficient for each molecule so that every element has the same number of atoms on both sides. This turns directly into a homogeneous system.
Method:
Give each molecule an unknown coefficient x1,x2,…, in the order the molecules appear.
Write one equation per element (C, H, O, …): atoms on the left = atoms on the right. Each molecule contributes (its atom count) × (its coefficient).
Move everything to the left: "left − right = 0". This is Ax=0, with rows = elements and columns = molecules. Columns of the right-hand molecules get a minus sign.
Find a basis of the null space. Usually the nullity is 1, so there is one basis vector.
Scale the basis vector to the smallest positive whole numbers. That is the balanced equation.
Small example:x1C+x2O→x3CO2. Carbon: x1=x3. Oxygen: x2=2x3. So x3=t is free and the solution is t(1,2,1), i.e. C+2O→CO2. Here there are 2 equations and 3 unknowns: rank 2, nullity 1.
Why infinitely many ways?
Nullity 1 means every solution is t⋅v. Every t=1,2,3,… gives a valid balance (for example 2C+4O→2CO2 is also balanced). In chemistry we simply pick the smallest whole numbers.
Example 2.7Burning methane (full method)
Balance x1CH4+x2O2⟶x3CO2+x4H2O. Also give the matrix, its rank, its nullity and a basis of its null space.
Solution
1. Count atoms
Element
CH4 x1
O2 x2
CO2 x3
H2O x4
C
1
0
1
0
H
4
0
0
2
O
0
2
2
1
2. Equations: left = right
C: x1=x3H: 4x1=2x4O: 2x2=2x3+x4
3. Everything on the left. The product columns (x3,x4) get a minus sign:
Answer.CH4+2O2→CO2+2H2O. rank=3, nullity=1, basis {(1,2,1,2)} (or {(21,1,21,1)}; both are correct).
Example 2.8Burning propane (MSQ)
Propane (C3H8) has 3 carbon and 8 hydrogen atoms. Reaction: x1C3H8+x2O2⟶x3CO2+x4H2O. Which statements about the linear system for balancing this equation are true?
A
The nullity of the matrix is 1.
B
The nullity of the matrix is 2.
C
{(1,5,3,4)} is a basis of the null space.
D
{(2,10,6,8)} is a basis of the null space.
E
{(5,1,4,3)} is a basis of the null space.
F
{(1,5,3,4),(2,10,6,8)} is a basis of the null space.
G
There are infinitely many ways to balance the equation.
H
The rank of the matrix is 3.
Solution
1. Equations
C: 3x1=x3H: 8x1=2x4O: 2x2=2x3+x4
A=380002−10−20−2−1
2. Solve quickly by substitution. Let x1=t:
x3=3t,x4=28t=4t,x2=22(3t)+4t=5t
x=t(1,5,3,4)
One free parameter, so the nullity is 1 and the rank is 4−1=3 (rank–nullity theorem, Section 3.1).
A: correct. One free variable.
B: wrong. There is only one free parameter (t), so the nullity is 1.
C: correct.t=1.
D: correct.t=2. A non-zero multiple is also a basis.
E: wrong. Wrong order. Carbon check: 3⋅5=15, but x3=4. Entries always follow (x1,x2,x3,x4), the order of molecules in the equation.
F: wrong. Two vectors, but the nullity is 1; the second is twice the first, so they are dependent.
G: correct. Every t>0 gives a balance.
H: correct. Rank–nullity: 4−1=3.
Answer. A, C, D, G, H. Balanced: C3H8+5O2→3CO2+4H2O.
Traps
(1) Forgetting the minus sign in the product columns. (2) Writing the basis vector in a different order from the molecules in the equation. (3) Confusing the nullity with the number of molecules: molecules = columns = n, and nullity = n − rank.
Key takeaway
RREF → free variables → set one free variable to 1 (others 0) → basis vector. Their count = nullity.
Solving a row for its pivot variable flips signs. Check by multiplying with the original A.
No free variables → N(A)={0}, basis ∅, nullity 0.
A basis is not unique (non-zero multiples and combinations work too); the nullity is unique.
Basis check: inside? right count? independent? A spanning set may have extra vectors; a basis may not.
Ax=0 has only x=0 when the nullity is 0, otherwise infinitely many solutions.
Chemical equations: rows = elements, columns = molecules, product columns negative; scale the null space vector to whole numbers.
Revision overview
MethodRREF → free variables one vector per free variable
Signssolving for the pivot variable flips the sign
Nullity 0N(A) = {0} basis = empty set
Basis of N(A)Week 5 · Part 2
Option checksinside? right count? independent?
Applications0–1 rating matrices balancing chemical equations
Revision: finding and checking a basis of the null space
Rank counts the pivot columns, nullity counts the free columns, and together they make up all the columns. This one fact answers most size-only and product questions.
3.1The rank–nullity theorem and why it is true
For every m×n matrix A:
rank(A)+nullity(A)=n(n=number of columns)
The proof is just counting. In the RREF, every column is one of two kinds (Figure 3):
Pivot column: their number = number of pivots = rank (from Week 4: rank = number of pivots in the RREF).
Free column: their number = number of free variables = nullity (Section 2.1).
Every column is either a pivot column or a free column, never both. So pivot columns + free columns = all columns = n.
Figure 3. The 4 columns of the matrix in Example 2.1. Each column is either a pivot column (blue) or a free column (orange), so rank + nullity = n.
The big benefit: if you know the rank, you know the nullity, and the other way round, without solving for the null space.
nullity(A)=n−rank(A)rank(A)=n−nullity(A)
3.2n is the number of columns, not rows
The null space lives in Rn (n = columns), and each column is one variable. That is why the theorem uses columns.
Trap
m−rank(A) is not the nullity; it only counts the zero rows of the RREF. For a 5×3 matrix of rank 3: nullity =3−3=0, while m−rank=5−3=2.
3.3Only the size is given: the possible rank and nullity
If you only know the size m×n, use these rules:
1≤rank(A)≤min(m,n)(if A=0)
nullity(A)=n−rank(A)
n−min(m,n)≤nullity(A)≤n−1
The lower bound 1 holds because a non-zero matrix has at least one pivot. If the matrix is not said to be non-zero, the rank can also be 0 (the zero matrix), and then the nullity is n.
Example 3.1A ∈ M₃ₓ₆(ℝ), non-zero (MSQ)
A∈M3×6(R) is a non-zero matrix (a 3×6 real matrix with at least one non-zero entry). Which statements are true?
A
The rank is at most 3.
B
The rank must be at least 3.
C
The nullity is at least 3.
D
The nullity is at most 5.
E
The nullity can be 6.
F
Ax=0 has infinitely many solutions.
Solution
1. Bounds on the rank.m=3,n=6. The matrix is non-zero, so 1≤rank≤min(3,6)=3.
2. List every case. Nullity =6−rank:
rank
1
2
3
nullity = 6 − rank
5
4
3
A: correct. Rank ≤min(3,6)=3.
B: wrong. The rank can be 1, for example a matrix with a single entry 1 and all other entries 0.
C: correct. The smallest possible nullity is 6−3=3.
D: correct. The largest possible nullity is 6−1=5.
E: wrong. Nullity 6 means rank 0, i.e. the zero matrix, which is excluded.
F: correct. Nullity ≥3>0, so the null space contains non-zero vectors and all their multiples.
Answer. A, C, D, F.
Easy way to remember
More columns than rows (n>m) → nullity at least n−m>0 → always infinitely many solutions. More rows than columns → the nullity can be 0.
3.4Nullity from the RREF: which quantities are equal
Row operations do not change solutions. So if A is the RREF of M:
N(M)=N(A),rank(M)=rank(A),nullity(M)=nullity(A)
Therefore the nullity of M equals each of these:
n−rank(M) and n−rank(A)
the number of independent (free) variables of Mx=0
the number of independent (free) variables of Ax=0 (the same, because the solutions are the same)
the number of columns of the RREF without a pivot
These, on the other hand, equal the rank, not the nullity: the number of pivots in A, and the number of non-zero rows in A.
Example 3.2Which quantities equal the nullity? (MSQ)
M=[12−1−2240036] (m=2,n=5) and A is its RREF. Which options equal nullity(M)?
A
m−rank(M)
B
n−rank(A)
C
The number of non-zero rows of M
D
The number of pivots in A
E
The number of independent variables of Mx=0
F
The number of independent variables of Ax=0
G
The number of zero columns of A
Solution
1. RREF. Row 2 = 2 × Row 1, so:
MR2→R2−2R1A=[10−10200030]
2. Rank and nullity. One pivot, so rank 1 and nullity =5−1=4 (free: x2,x3,x4,x5). Every quantity in this example has a different value, so nothing matches by accident:
A: wrong.2−1=1=4.
B: correct.5−1=4.
C: wrong. Both rows of M are non-zero: 2. Non-zero rows of the original matrix mean nothing here.
D: wrong. Pivots = 1 = rank, not nullity.
E: correct. 4 free variables.
F: correct. Also 4 (A and M have the same solutions).
G: wrong. Only column 4 of A is zero: 1. A free column does not have to be zero (columns 2, 3 and 5 are free but not zero).
Why ≤rank(A)?ABx=A(Bx), so every output of AB is also an output of A. The column space of AB cannot have more directions than the column space of A.
Why ≤rank(B)? If Bx=0 then ABx=A⋅0=0. Every null vector of B is a null vector of AB, so nullity(AB)≥nullity(B). Both have p columns, so by rank–nullity:
rank(AB)=p−nullity(AB)≤p−nullity(B)=rank(B)
Think of a pipe (Figure 4): first B acts, then A. The narrowest part decides how many directions survive. This maximum min(rankA,rankB) can always be reached by a suitable choice of matrices, so it is the answer to "maximum possible rank" questions.
Figure 4. Applying AB means applying B first, then A. At each stage the number of surviving directions cannot exceed that matrix's rank, so the narrowest stage sets the limit.
Example 3.5Maximum rank of AB from nullities (numerical)
A is a 3×5 matrix and B is a 5×4 matrix. The null spaces of A and B have dimensions 3 and 1. What is the maximum possible rank of AB?
Solution
1. Each matrix has its own n.A has 5 columns and B has 4.
rank(A)=5−3=2rank(B)=4−1=3
2. Apply the bound.rank(AB)≤min(2,3)=2.
3. Is 2 actually reached?. Yes. Take A with rows e1,e2,0 in R5 (rank 2, nullity 3) and B with rows e1,e2,e3,0,0 in R4 (rank 3, nullity 1); then AB has rows e1,e2,0 and rank 2.
Answer. 2
Example 3.6When one matrix sends everything to zero
A is a 4×2 matrix and B is a 2×4 matrix. Their null spaces are 2- and 3-dimensional. What is the maximum possible rank of AB?
Solution
1. Rank of A.rank(A)=2−2=0. Only the zero matrix has rank 0, so A=0.
2. The product.AB=0⋅B=0, so its rank is 0. (The bound agrees: ≤min(0,4−3)=0.)
Answer. 0
Trap
When converting nullity to rank, use that matrix's own number of columns. For a 4×2 matrix, n = 2, not 4. This is the most common mistake.
3.7Dimension of the span of a set of vectors
To find the dimension of the span of some vectors: write them as the rows of a matrix, reduce to RREF and count the non-zero rows. That number is the dimension (= dimension of the row space = rank).
Example 3.7Span of three vectors
Find the dimension of span{(1,2,1),(2,4,2),(0,1,1)}.
Answer. 2 non-zero rows, so the dimension is 2. (The second vector is twice the first, so it adds nothing.)
Shortcut for 0–1 (one-hot) vectors: if every vector is either zero or some ej, the dimension of the span = the number of different ej that appear. Different ej are always independent (their 1s are in different places), repeats add no new direction, and the zero vector adds nothing.
Example 3.8Vectors for favourite subjects (MSQ)
Each of 6 students picks a favourite subject from 5: Maths, Stats, CT, Python, English. A student who picks subject j gets the vector ej∈R5 (Maths =e1, Stats =e2, CT =e3, Python =e4, English =e5); a student who picks nothing gets the zero vector. Which statements about the dimension of the span of these 6 row vectors are true?
So far a matrix has been a table of numbers. From here on, think of it as a machine: a vector goes in and another vector comes out. The simplest, most well-behaved machines are called linear mappings.
4.1Functions (maps) between ℝⁿ and ℝᵐ
A function f:A→B is a rule that assigns to each element of the domainA exactly one element of the codomainB. f:Rn→Rm takes n numbers in and gives m numbers out.
f(x,y)=(x+y,x−y,2x)f:R2→R3
For example f(3,1)=(4,2,6): two numbers in, three out.
4.2A real-life starting point: a shop bill
A grocery shop sells rice at ₹50/kg, dal at ₹120/kg and oil at ₹150/litre. You buy x1 kg of rice, x2 kg of dal and x3 litres of oil. The bill is
bill(x1,x2,x3)=50x1+120x2+150x3
This is a function R3→R (3 quantities in, 1 bill out). Two properties are obvious even without maths:
Double the order, double the bill: 2 kg rice, 2 kg dal and 2 L oil cost twice as much.
Combine two orders, add the bills: buying the morning and evening orders together costs the morning bill plus the evening bill.
Now add a ₹40 delivery charge to every bill: 50x1+120x2+150x3+40. Both properties fail: doubling the order does not double the ₹40. A separate added constant is exactly what breaks linearity.
For the bills at two shops at once (shop B: ₹45, ₹130, ₹140) the output has 2 numbers:
(The output is written as a column here; writing it as a row (…,…) means the same thing.)
In plain words, every component of the output must look like
(number)⋅x1+(number)⋅x2+⋯+(number)⋅xn
No added constant, no squares, no product of two variables, no ∣x∣, sin or . Some coefficients may be 0 (so some variables can be missing), and a whole component may be 0.
4.4Every linear mapping has a matrix
Put the coefficients in a matrix: row i holds the coefficients of output i. Then
f(x)=Ax,A is m×n(outputs×inputs)
Example 4.1From a formula to a matrix, and back
f(x,y,z)=(2x−y+3z,4y−z). Write its matrix and compute f(1,1,1) both ways.
Solution
1. Sizes. 3 numbers in, 2 numbers out, so f:R3→R2 and the matrix is 2×3.
2. Rows. Each output's coefficients form one row. The second output has no x, so its coefficient is 0:
The columns of A are the outputs of the standard basis vectors: f(1,0,0)=(2,0) is column 1, f(0,1,0)=(−1,4) is column 2, f(0,0,1)=(3,−1) is column 3. This becomes very useful in Chapter 5.
Answer.A=[20−143−1], f(1,1,1)=(4,3).
Trap
The matrix is (outputs × inputs), not (inputs × outputs): R3→R2 gives a 2×3 matrix. And write 0 for every variable that is missing from an output.
4.5Linear or not: a quick checklist
A component containing
Linear?
Why
3x, −y, 21z, 2x, πy
✓ Yes
Number × variable (the number can be anything)
0 (whole component zero)
✓ Yes
All coefficients are 0
4x−4y, 7x+0y
✓ Yes
A sum of number × variable
x+1, 7x+1, 4x+6y+6
✗ No
An added constant: f(0)=0
x2, y3
✗ No
The power is not 1
xy, xz
✗ No
A product of two variables
∣x∣, 6∣x∣
✗ No
It swallows the minus sign: ∣−1∣=−∣1∣
sinx, ex, x, x1, max(x,y)
✗ No
Not straight-line behaviour
If even one component contains a "no" item, the whole function is not a linear mapping.
4.6Weighted total marks (graded assignment style)
Final marks are often weighted: some percent of Quiz 1, some of Quiz 2, some of the End sem. If the weights are the variables, the total is a linear mapping of the weights.
Example 4.2Three students, three exams (MSQ)
Marks of Asha, Bilal and Chetan (each exam out of 100):
Quiz 1
Quiz 2
End sem
Asha
60
40
70
Bilal
30
80
50
Chetan
50
50
60
The total takes x1% of Quiz 1, x2% of Quiz 2 and x3% of the End sem, giving TA(x1,x2,x3), TB(x1,x2,x3) and TC(x1,x2,x3). Which options are correct?
A
TB=1001(30x1+80x2+50x3)
B
TB=1001(60x1+30x2+50x3)
C
If x1=10,x2=30,x3=60, then TA=60
D
If x1=10,x2=30,x3=60, then TA=57
E
If x1=10,x2=30,x3=60, then Chetan has the highest total
F
If x1=10,x2=60,x3=30, then Bilal has the highest total
G
Each Ti is a linear mapping R3→R
Solution
1. Where the formula comes from.x1% of 60 is 100x1⋅60. Do this for each exam and add. A student's formula uses that student's row:
TA=1001(60x1+40x2+70x3)
TB=1001(30x1+80x2+50x3)
TC=1001(50x1+50x2+60x3)
2. Weights 10, 30, 60
TA=1001(600+1200+4200)=1006000=60
TB=1001(300+2400+3000)=1005700=57
TC=1001(500+1500+3600)=1005600=56
3. Weights 10, 60, 30
TA=1001(600+2400+2100)=1005100=51
TB=1001(300+4800+1500)=1006600=66
TC=1001(500+3000+1800)=1005300=53
A: correct. Bilal's row: 30, 80, 50.
B: wrong. 60, 30, 50 is the Quiz 1 column (all three students' Quiz 1 marks), not Bilal's row. The most common trap.
C: correct. 60.
D: wrong. 57 is Bilal's total.
E: wrong. 60 > 57 > 56, so Asha is on top.
F: correct. 66 > 53 > 51. Changing the weights changed the topper.
G: correct. Each formula is a sum of number × variable, with no constant.
Answer. A, C, F, G.
All three totals together form one linear mapping T:R3→R3, whose matrix is the marks table divided by 100:
A linear mapping was defined by its formula. A linear transformation is defined by how it behaves: it respects addition and scaling. In ℝⁿ the two ideas turn out to be the same thing, and that is what makes every graded assignment question here solvable with a matrix.
5.1Definition of a linear transformation
Let V and W be vector spaces (in this course mostly V=Rn, W=Rm). A function T:V→W is a linear transformation if for all u,v∈V and every real number c both rules hold:
(1) Additivity: T(u+v)=T(u)+T(v)
(2) Homogeneity (scaling): T(cu)=cT(u)
The two rules can also be checked together in one line (an equally valid test):
T(cu+dv)=cT(u)+dT(v)for all u,v and all c,d
Think of the shop bill from Section 4.2: (1) combine two orders and the bills add; (2) multiply the order by c and the bill is multiplied by c. Every linear mapping does both, because A(u+v)=Au+Av and A(cu)=cAu.
5.2Three consequences of the definition
(a) T(0)=0. Put c=0 in the scaling rule:
T(0)=T(0⋅v)=0⋅T(v)=0
This is the fastest test: if T(0)=0, then T cannot be linear. But note that T(0)=0 does not prove linearity (see options B and E of Example 5.1).
(b) T(−v)=−T(v). Put c=−1 in the scaling rule. This is the best way to catch functions like ∣x∣.
So to build the matrix of T, just put T(e1),…,T(en) in as the columns. This matrix is called the (standard) matrix of T.
5.4How to check whether a map is linear
Figure 5. A flowchart for checking linearity. Step 1 quickly rejects maps with a constant; Step 2 confirms the linear ones; Step 3 catches the hidden non-linear ones (such as |x| or xy).
Example 5.1Which maps are linear transformations? (MSQ)
A
T:R2→R2,T(x,y)=(2x−5y,3x+y)
B
T:R→R2,T(x)=(0,4∣x∣)
C
T:R2→R3,T(x,y)=(x+2,3y,x−y)
D
T:R2→R,T(x,y)=5y−2x
E
T:R2→R2,T(x,y)=(xy,x)
F
T:R3→R3,T(x,y,z)=(x−z,0,7y)
Solution
Prove A fully from the definition
(you should be able to do this once). Let u=(x1,y1), v=(x2,y2):
Option E.T(0,0)=(0,0), passes. But there is an xy. Take c=2, u=(1,1):
T(2,2)=(4,2)2T(1,1)=2(1,1)=(2,2)(4,2)=(2,2)
A: correct. Proved above. Matrix [23−51].
B: wrong. Fails even though T(0)=0: T(−1)=−T(1).
C: wrong.T(0)=0 (the constant 2).
D: correct.−2x+5y: number × variable. Matrix [−25] (1×2).
E: wrong.xy is a product: T(2u)=2T(u).
F: correct. A zero component is fine. Matrix 100007−100.
Answer. A, D, F.
Trap
Do not call a map linear just because T(0)=0. B and E both give T(0)=0 and are still not linear. T(0)=0 is necessary, not sufficient.
5.5Finding T from its values on the standard basis
A direct use of Section 5.3: T(x,y)=xT(1,0)+yT(0,1). Geometrically (Figure 6), wherever the corners e1,e2 of the unit square go, the whole grid follows.
Example 5.2A formula from T(1,0) and T(0,1)
T is linear with T(1,0)=(2,1) and T(0,1)=(−1,3). Find T(x,y), its matrix, and T(3,2).
Solution
T(x,y)=x(2,1)+y(−1,3)=(2x−y,x+3y)
A=[21−13](column 1=T(e1),column 2=T(e2))
T(3,2)=(6−2,3+6)=(4,9)
Answer.T(x,y)=(2x−y,x+3y), T(3,2)=(4,9).
Figure 6.T(x,y)=(2x−y,x+3y). The unit square becomes a parallelogram whose edges are T(e1) and T(e2). T(1,1)=T(e1)+T(e2)=(1,4): the sum came out of T.
5.6Finding T from its values on another basis
Sometimes the values are given not at (1,0),(0,1) but on some other basis. Method: first write (x,y) as a combination of that basis, then apply 5.2(c).
Example 5.3Given T(1,1) and T(1,−1)
T is linear, T(1,1)=(3,1) and T(1,−1)=(1,5). Find T(x,y) and T(4,2).
Solution
1. Write (x,y)=a(1,1)+b(1,−1) and match components:
4.T(4,2)=(8+2,12−4)=(10,8). (Shortcut: (4,2)=3(1,1)+1(1,−1), so T(4,2)=3(3,1)+(1,5)=(10,8).)
Answer.T(x,y)=(2x+y,3x−2y), T(4,2)=(10,8).
5.7Is a third given value consistent? (questions with k)
Once T(1,0) and T(0,1) are given, linearity already fixes the value of T at every point. If the question also gives a value at a third point, it must equal that fixed value. This gives a condition on the unknown (such as k).
Example 5.4For which k can T be linear?
For T:R2→R2 we know T(1,0)=(k,2), T(0,1)=(2,k) and T(1,2)=(k2+2k−2,k2+3k−4). For which values of k can T be a linear transformation?
Solution
1. What T(1,2) must be by linearity.(1,2)=1⋅(1,0)+2⋅(0,1), so
T(1,2)=T(1,0)+2T(0,1)=(k,2)+(4,2k)=(k+4,2k+2)
2. Equate with the given value, one component at a time
1st: k2+2k−2=k+4⇒k2+k−6=0⇒(k+3)(k−2)=0⇒k∈{−3,2}
2nd: k2+3k−4=2k+2⇒k2+k−6=0⇒k∈{−3,2}
3. Both components must hold at the same time, so take the common part of the two sets: {−3,2}.
4. Check k = 2. Given: (4+4−2,4+6−4)=(6,6). By linearity: (2+4,4+2)=(6,6). ✓
Answer.k=−3 or k=2. (The second part of this question, "not injective", is Example 5.9.)
Trap
Do not stop after finding k from one component. Take the intersection of the conditions from both components. Sometimes one component gives two values and the other gives only one; then the answer is only the common value.
5.8Injective (one-one), surjective (onto) and bijective
Graded assignment questions often ask "is T one-one or onto?" or "for which k is T not injective?". With rank, nullity and the determinant, these take a minute. The definitions hold for any function:
Injective (one-one): different inputs always give different outputs; two different inputs never land on the same output. Formally: T(u)=T(v)⇒u=v.
Surjective (onto):every element of the codomain is the output of some input. Nothing in the codomain is left out.
Bijective: both one-one and onto. A bijective linear T is called an isomorphism, and its inverse is also linear.
Figure 7. Three situations. The red circle marks the problem: in the first, one element of the codomain is left empty (onto fails); in the second, two inputs land on one output (one-one fails).
5.9Kernel and image
For a linear T:Rn→Rm, T(x)=Ax, there are two special sets:
ker(T)={v:T(v)=0}=N(A)Im(T)={T(v):v∈Rn}
Kernel = the vectors that go to zero = the null space of A. Its dimension is the nullity.
Image (range) = all possible outputs = the span of the columns of A (column space). Its dimension is the rank, because Ax is a combination of the columns.
The rank–nullity theorem in the language of transformations:
dimker(T)+dimIm(T)=n=dim(domain)
The n input directions split into two parts: some are "lost" (the kernel), the rest build the output (the image).
5.10Checking injectivity and surjectivity with rank, nullity and determinant
One-one ⇔ kernel = {0} ⇔ nullity 0. If some non-zero v goes to zero, then u and u+v have the same output: T(u+v)=T(u)+0=T(u). Two different inputs, one output, so T is not one-one. Conversely, if the kernel is only {0} and T(u)=T(v):
T(u−v)=T(u)−T(v)=0⇒u−v∈kerT={0}⇒u=v
T one-one⟺kerT={0}⟺nullity(A)=0⟺rank(A)=n
Onto ⇔ rank = m. Onto means the image is all of Rm. The dimension of the image is the rank, and a subspace of Rm with dimension m is the whole Rm:
T onto⟺ImT=Rm⟺rank(A)=m
Deciding from the size alone. Remember rank(A)≤min(m,n). This settles some cases immediately:
Size of T:Rn→Rm
Can it be one-one?
Can it be onto?
How to decide
n>m more inputs, e.g. R3→R2
✗ Never nullity≥n−m>0
Possibly
Onto ⟺rank=m
n<m fewer inputs, e.g. R2→R3
Possibly
✗ Never rank≤n<m
One-one ⟺rank=n
n=m square
One-one ⟺ onto ⟺detA=0
Just the determinant
Recall that for a square matrix detA=0⟺rank(A)=n, and for 2×2, det[acbd]=ad−bc.
Why is the square case special? When n=m, "rank = n" means "nullity 0" (one-one) and "rank = m" (onto) at the same time. Both are true together or false together. So for a square matrix, "one-one but not onto" or "onto but not one-one" is impossible.
n=m:detA=0⟺bijectivedetA=0⟺neither one-one nor onto
5.11Worked examples
Example 5.5T(v) = Av with det ≠ 0 (MSQ)
T:R2→R2, T(v)=Av, where v=[xy] and A=[69−45]. Which options are correct?
A
T is one-one but not onto.
B
T is a linear transformation.
C
T is both one-one and onto.
D
T is neither one-one nor onto.
E
kerT={0}.
Solution
1. A map given by a matrix is always linear (Section 5.3).
2. The matrix is square, so use the determinant:
detA=6⋅5−(−4)⋅9=30+36=66=0
3. Non-zero determinant → rank 2 → nullity 0 (one-one) and rank = 2 = m (onto).
A: wrong. For a square matrix "one-one but not onto" is impossible.
B: correct.T(v)=Av.
C: correct.det=0.
D: wrong. That would need detA=0.
E: correct. Nullity 0.
Answer. B, C, E.
Example 5.6A square matrix with det = 0
A=[3−26−4], T(v)=Av. Is T one-one? Onto? Find the kernel and the image.
Solution
detA=3(−4)−6(−2)=−12+12=0
Kernel
3x+6y=0 and −2x−4y=0 both mean x=−2y. So kerT=span{(−2,1)}, nullity 1.
Two inputs, one output (proof that it is not one-one)
T(0,0)=(0,0) and T(−2,1)=(−6+6,4−4)=(0,0).
Image
The columns are (3,−2) and (6,−4)=2(3,−2). The image is span{(3,−2)}, a line, not all of R2. Rank 1.
Answer. Neither one-one nor onto. ker=span{(−2,1)}, Im=span{(3,−2)}. Check: 1+1=2. ✓
Answer. Onto, not one-one. (The size already told us it cannot be one-one: 3>2.)
Example 5.8ℝ² → ℝ³ (fewer inputs)
T(x,y)=(x,y,x+y). One-one? Onto?
Solution
A=101011. The first two rows already form the identity, so rank 2 =n → nullity 0 → one-one. Rank 2 <3=m → not onto.
A vector that is never an output: (0,0,1). If T(x,y)=(0,0,1), then x=0,y=0, but the third component is x+y=0=1.
Answer. One-one, not onto.
5.12Linear but not injective: questions with k
Example 5.9The second part of Example 5.4 (numerical)
T:R2→R2: T(1,0)=(k,2), T(0,1)=(2,k), T(1,2)=(k2+2k−2,k2+3k−4), k∈R. Find the value of k for which T is a linear transformation that is not injective.
Solution
1. When is T linear. From Example 5.4: k∈{−3,2}.
2. The matrix. Columns =T(e1),T(e2):
A=[k22k]
3. When is it not injective. The matrix is square, so not injective ⟺detA=0:
detA=k⋅k−2⋅2=k2−4=0⇒k=2ork=−2
4. Both conditions together. The common part of the "linear" list {−3,2} and the "det = 0" list {2,−2} is only k=2.
5. Check. For k=2: A=[2222] and T(1,−1)=(2−2,2−2)=(0,0). A non-zero vector goes to zero, so T is not injective. ✓ For k=−3, det=9−4=5=0, so there T is both linear and injective.
Answer.k=2. (If the question asked for "linear and injective", the answer would be −3.)
Traps
(1) Writing k=±2 from det=0 alone and forgetting the linearity condition. At k=−2, T is not even linear. (2) Building the matrix wrongly: the columns are T(e1),T(e2). (In this example the matrix is symmetric, so it makes no difference, but that is not always the case.)
Key takeaway
Linear transformation: T(u+v)=T(u)+T(v) and T(cu)=cT(u).
T(0)=0 is necessary (if it fails, the answer is "no") but not sufficient. Try c=−1 for ∣x∣, and c=2 for xy or x2.
Rn→Rm: linear transformation = linear mapping = Ax. The columns of the matrix are T(e1),…,T(en).
Values on another basis: first write (x,y) in that basis, then use linearity. A third value with k: compute the value linearity demands, equate each component, intersect.
Kernel = null space (dim = nullity), image = column space (dim = rank). One-one ⟺ nullity 0 ⟺ rank = n. Onto ⟺ rank = m.
n>m: never one-one. n<m: never onto. Square: det=0⟺ bijective; det=0⟺ neither. A "just one of the two" option is always wrong for a square matrix.
Revision overview
DefinitionT(u + v) = T(u) + T(v) T(cu) = c T(u)
Quick testT(0) ≠ 0 → not linear then try c = −1 or c = 2
Matrix of Tcolumns are T(e₁), …, T(eₙ) other basis: rewrite first
Linear transformationsWeek 5 · Part 5
Kernel and imageker T = N(A), dim = nullity Im T = column space, dim = rank
One-one and ontoone-one ⟺ nullity 0 onto ⟺ rank = m · square: det
Revision: linear transformations, one-one and onto
These 14 questions follow the graded assignment format (MSQ and numerical). Solve each one yourself first, then open "Show solution". Every solution names the section it uses.
6.1Null space, rank and nullity
Q1Basis of the null space
Multiple Select Question (MSQ): select all that apply.
A=1023060112−13. Which options are correct?
A
nullity(A)=2
B
{(−3,1,0,0),(−2,0,1,1)} is a basis of the null space
C
{(3,−1,0,0),(−2,0,1,1)} is a basis of the null space
D
{(−3,1,0,0)} is a basis of the null space
E
{(1,3,0,2),(0,0,1,−1)} is a basis of the null space
F
rank(A)=3
Solution
R3→R3−2R1 gives (0,0,1,−1), then R3→R3−R2 gives a zero row. RREF:
Answer.A, B, C. In C the first vector is multiplied by −1 (still fine). D has only one vector (the nullity is 2). E contains rows of A, and A(1,3,0,2)=0. F: the rank is 2. (Sections 2.1, 2.8, 1.7)
Q2Nullity from the size and the rank
Numerical Answer Type (NAT): enter a number.
A∈M4×7(R) has rank 3. What is nullity(A)?
Solution
nullity=n−rank=7−3=4. (The 4 rows, m, play no part.) Answer: 4. (Section 3.1)
Q3Only the size is given
Multiple Select Question (MSQ): select all that apply.
A∈M6×4(R) is non-zero. Choose the correct statements.
A
The rank is at most 4.
B
The nullity is at most 3.
C
The nullity is at least 2.
D
Ax=0 must have a non-zero solution.
E
The rank can be 6.
Solution
1≤rank≤min(6,4)=4, so the nullity =4−rank∈{3,2,1,0}.
Answer.A, B. C is wrong (rank 4 gives nullity 0). D is wrong (the nullity can be 0). E is wrong (there are only 4 columns). (Section 3.3)
Q4Maximum rank of a product
Numerical Answer Type (NAT): enter a number.
A is a 5×3 matrix and B is a 3×6 matrix. The null space of A is 1-dimensional and the null space of B is 5-dimensional. What is the maximum possible rank of AB?
Solution
rank(A)=3−1=2rank(B)=6−5=1rank(AB)≤min(2,1)=1
Answer.1. This time the narrow pipe is B. (Section 3.6)
Q5A diagonal matrix
Numerical Answer Type (NAT): enter a number.
D is a 5×5 diagonal matrix with diagonal entries 0,4,0,0,9. What is nullity(D)?
Solution
Rank = number of non-zero diagonal entries = 2. Nullity =5−2=3, and N(D)=span{e1,e3,e4}. Answer: 3. (Section 3.5)
Q6Independent variables from the RREF
Numerical Answer Type (NAT): enter a number.
M is a 4×6 matrix whose RREF is 100001002−1000010000013−20. How many independent (free) variables does Mx=0 have?
Solution
The pivots are in columns 1, 2 and 4 (rank 3). Free: x3,x5,x6. Column 5 is entirely zero, and it is free too. Answer: 3=6−3. (Section 3.4)
6.2Ratings and chemical equations
Q7Vectors from cafe ratings
Multiple Select Question (MSQ): select all that apply.
4 customers rate a cafe from 1 to 4 stars. A rating of j stars is the vector ej∈R4; no rating is the zero vector. Which statements about the dimension of the span of the 4 row vectors are correct?
A
2★, 2★, 4★, 1★ → dimension 3
B
Everyone gives 3★ → dimension 1
C
1★, 2★, 3★, 4★ → dimension 4
D
4★, 1★, (no rating), 4★ → dimension 3
Solution
Count the different ej. A: e2,e4,e1 → 3. B: e3 → 1. C: all four → 4. D: e4,e1 → 2.
Answer.A, B, C. (Section 3.7)
Q8Null space of a rating matrix
Multiple Select Question (MSQ): select all that apply.
The matrix of the ratings in option A of Q7 is A=0001110000000010. Which statements are correct?
A
{e3} is a basis of the null space.
B
nullity(A)=1.
C
{e1,e3} spans the null space.
D
rank(A)=3.
E
{(0,0,5,0)} spans the null space.
Solution
Nobody gave 3★, so only column 3 is zero. N(A)=span{e3}, nullity 1, rank 3.
Answer.A, B, D, E. C is wrong because e1∈/N(A) (column 1 is not zero). (Sections 2.7, 1.6)
Q9Making water
Multiple Select Question (MSQ): select all that apply.
x1H2+x2O2⟶x3H2O. Which options about the linear system that balances it are correct?
Answer.A, B, D, E. C is wrong: for (1,2,1) hydrogen balances (2⋅1=2 on both sides), but oxygen gives 2⋅2=4=1. (Section 2.10)
6.3Linear mapping and linear transformation
Q10Weighted marks
Numerical Answer Type (NAT): enter a number.
Ravi scores 70 in the Quiz and 50 in the End sem; Sita scores 40 and 80. Total =x1% of the Quiz +x2% of the End sem. What is Ravi's total for x1=40,x2=60?
Solution
TR=1001(70x1+50x2)=1001(2800+3000)=58
Answer.58. (Sita: 1001(1600+4800)=64, so Sita is ahead.) (Section 4.6)
Q11Which maps are linear transformations?
Multiple Select Question (MSQ): select all that apply.
A
T(x,y)=(x−y,0,2y)
B
T(x,y)=(x+y+1,x)
C
T(x)=(2x,x2)
D
T(x,y,z)=3x−2y+z
E
T(x,y)=(∣x−y∣,0)
F
T(x,y)=(2x,πy)
Solution
B: T(0,0)=(1,0)=0. C: T(2⋅1)=(4,4) but 2T(1)=(4,2). E: T(−1,0)=(1,0) but −T(1,0)=(−1,0). In A, D and F every component is "number × variable" (2 and π are just numbers).
Answer.A, D, F. (Section 5.4)
Q12A map with det = 0
Multiple Select Question (MSQ): select all that apply.
T(v)=Av, A=[24−3−6]. Which options are correct?
A
T is one-one but not onto.
B
T is neither one-one nor onto.
C
(3,2)∈kerT.
D
The image is all of R2.
Solution
detA=2(−6)−(−3)(4)=−12+12=0. Square with det 0 → neither one-one nor onto. A(3,2)=(6−6,12−12)=(0,0).
Answer.B, C. (Sections 5.10, 5.11)
Q13Values on another basis
Numerical Answer Type (NAT): enter a number.
T is linear, T(1,2)=(5,0) and T(0,1)=(1,−1). What is the first component of T(2,3)?