You are on page 1of 32

Linear Transformation

and Rank-Nullity Theorem

Dr. Dipankar Ghosh

Department of Mathematics
Indian Institute of Technology Kharagpur

January 24, 2024

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Linear Transformations
A ‘Linear Transformation’ is nothing but a map from one vector space
to another which respects (in other words, preserves) every linear
combination, i.e., it is a map which preserves vector addition and
scalar multiplication. Let us start with some well known maps:
T : R2 −→ R2
where c ∈ R
   
x x
7→ c
y y
y     
c 0 x cx
3 =
0 c y cy
c · (x, y) = (cx, cy)
2

1
(x, y)

0
−3 −2 −1 0 1 2 3 4 5 6 x
−1 Stretching
Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Reflection with x-axis as mirror

T : R2 −→ R2
   
x x
7→
y −y
    
1 0 x x
y =
0 −1 y −y
2

1
(x, y)

0 mirror
−3 −2 −1 0 1 2 3 4 x
−1
(x, −y)

−2

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Projection on the x-axis

S : R2 −→ R T : R2 −→ R2
 
x
   
7→ x x x
y 7→
y 0
 
  x
1 0 =x
y
    
1 0 x x
y =
0 0 y 0
2
(x, y)
1
(x, 0)
0 projection on x-axis
−3 −2 −1 0 1 2 3 4 x
−1

−2

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Rotation in Euclidean plane by an angle θ

Consider the map T : R2 → R2 which performs a rotation in the


  counterclockwise
xy-plane   byan angle
 θ about theorigin.
x cos θ − sin θ x x cos θ − y sin θ
T = = .
y sin θ cos θ y x sin θ + y cos θ
y
3
Counterclockwise rotation
• T(x, y) by an angle θ
2 θ

1 •
(x, y)

0
−3 −2 −1 0 1 2 3 4 x
−1

−2

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Linear transformation, or linear map

Definition
A map between vector spaces which satisfies the rule of linearity is
called linear transformation (or linear map).

More precisely, let V and W be vector spaces over the field R (or C).
A linear transformation T : V → W is a function such that

T(c1 v1 + c2 v2 ) = c1 T(v1 ) + c2 T(v2 )

for all c1 , c2 ∈ R and v1 , v2 ∈ V. Equivalently, a linear map is a map


which respects both vector addition and scalar multiplication.

Example (A matrix can be thought of as a linear map)


Starting with an m × n matrix A over R, one can construct a linear
map TA : Rn → Rm defined by TA (X) := AX for all X ∈ Rn .

Proof. TA (X + Y) = A(X + Y) = AX + AY = TA (X) + TA (Y) and TA (cX)


= A(cX) = c(AX) = cTA (X).
Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Differentiation and integration transformation
Example (Differentiation transformation)
Let V = R[x], the vector space of all polynomials in x over R. Define a map
D : V → V as follows: If f = a0 + a1 x + a2 x2 + · · · + ar xr , then

D(f ) := a1 + 2a2 x + · · · + rar xr−1 .

Is D a linear transformation?
Answer: Yes. Consider two polynomials f and g, a scalar c ∈ R. Verify that
D(f + g) = D(f ) + D(g) and D(cf ) = cD(f ).
Example (Integration transformation)
Let V be the vector space of all continuous functions from R into R. Define a
map T : V → V as follows: If f ∈ V, then T(f ) is given by
Z x
T(f )(x) = f (t)dt for all x ∈ R.
0

Is T a linear map? First convince yourself that V is a vector space over R.

Answer: Yes. Consider two continuous functions f , g : R → R, a scalar c ∈ R.


Note that T(f + g) = T(f ) + T(g) and T(cf ) = cT(f ).
Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
More examples

Example
Define f : C → C by f (z) = z (conjugate) for all z ∈ C. Consider C as a
vector space over itself.
1 Does f preserves vector addition?
2 Does f preserves scalar multiplication?
3 Is f a linear transformation?

Answers: Yes, No, No (respectively).

Example
Define f : C → C by f (z) = z (conjugate) for all z ∈ C. Consider C as a
vector space over R.
1 Is f a linear transformation?

Answer: Yes

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
A basic question

Question 1:
Let T : V → W be a linear transformation.
What is T(0), where 0 denotes the additive identity or the zero
vector in the vector space V?
Answer: T(0V ) = 0W (where 0W denotes the zero vector in W)
Justification: T(0V ) = T(0V + 0V ) = T(0V ) + T(0V ). Adding both
sides by −T(0V ), it follows that T(0V ) = 0W .

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
An observation on matrix multiplication

Multiplying a matrix A with a column vector b yields a linear


combination of the columns
 of A.
  x1
1 2 3 4  
5 6 7 8  x2  =
x3 
9 10 11 12
    x4    
1 2 3 4
x1 5 + x2  6  + x3  7  + x4  8 .
9 10 11 12
 
x1
x2 
   
C1 C2 · · · Cn m×n  .  = x1 (C1 ) + x2 (C2 ) + · · · + xn (Cn ),
 .. 
xn
where C1 , . . . , Cn ∈ Rm .

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Matrix representation of a linear map T : Rn → Rm

Theorem
Let T : Rn → Rm be a linear transformation. Then there exists an
m × n matrix A such that T can be represented by A, i.e., T(X) = AX
for every X ∈ Rn .
n
Proof.
 Let {e1 , . . . , en } be the 
standard
  R. Consider
basis of
x1 1 0
x2  0  ..  Xn
X =  .  ∈ Rn . Then X = x1  .  + · · · + xn  . = xi ei .
     
 ..   ..  0
i=1
xn 0 1
Applying T on the above equalities, we have that
T(X) = x1T(e1 ) + x2 T(e2 ) + · · · + xn T(e n)
=  T(e1 ) T(e2 ) · · · T(en ) X [by the observation].
Set A := T(e1 ) T(e2 ) · · · T(en ) . Note that T(ej ) ∈ Rm gives the
jth column of A. Thus A is an m × n matrix with T(X) = AX for X ∈ Rn .

Remark. A linear map T : Rn → Rm is uniquely determined by its


action on {e1 , . . . , en }, i.e., by T(ei ) for all 1 6 i 6 n.
Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Correspondence between linear maps and matrices
(Optional)

Corollary
There is a one to one correspondence between the set of all linear
transformations from Rn to Rm and the collection of all m × n matrices
over R.
Proof. The correspondences are given by
 
ϕ : T 7→ T(e1 ) T(e2 ) · · · T(en ) and ψ : A 7→ TA .

It can be verified that the compositions ϕ ◦ ψ and ψ ◦ ϕ are the identity


maps on the respective domains.

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Ordered bases
1 Let V be a finite dimensional vector space over R.
2 An ordered basis of V is nothing but a basis B = {v1 , v2 , . . . , vn }
with a specified ordering of its vectors.
3 It essentially enables us to introduce coordinates in V.
4 Let B = {v1 , v2 , . . . , vn } be an ordered basis of V.
5 Given v ∈ V, there is a UNIQUE n-tuple (x1 , x2 , . . . , xn ) of scalars
such that v = x1 v1 + x2 v2 + · · · + xn vn . Why?
6 We call such xi the ith coordinate of v relative to B.
7 We denote the coordinate vector of v relative to B by
 
x1
x2 
[v]B :=  .  .
 
 .. 
xn
8 On the other hand, every n-tuple (x1 , x2 , . . . , xn ) ∈ Rn is the
coordinate vector of some vector in V relative to B, namely, the
vector x1 v1 + x2 v2 + · · · + xn vn .
Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Correspondence between vectors in V and n-tuples in
Rn (Optional)

1 Let u, v ∈ V and c ∈ R. It can be easily verified that

[u + v]B = [u]B + [v]B and [cu]B = c[u]B .


2 Thus an ordered basis B of V determines a one-to-one
correspondence
v ←→ [v]B
between the set of all vectors in V and the set of all n-tuples in
Rn , and this correspondence respects both the vector additions
and scalar multiplications.
3 This also shows that any vector space V of dimension n over R is
isomorphic to Rn .

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Matrix representation of T : V → W w.r.t ordered bases of V and W

Theorem.
Let T : V → W be a linear transformation. Let B = {v1 , v2 , . . . , vn } and
B 0 = {w1 , w2 , . . . , wm } be two ordered bases of V and W respectively.
Then there exists an m × n matrix A such that T can be represented
by A, i.e., A[v]B = [T(v)]B0 for every v ∈ V. The ith column of A, which
is same as Aei , will be obtained by [T(vi )]B0 .

Definition
 
The matrix A := [T(v1 )]B0 [T(v2 )]B0 · · · [T(vn )]B0 m×n is called the
matrix representation of T : V → W with respect to the ordered bases
B = {v1 , v2 , . . . , vn } and B 0 = {w1 , w2 , . . . , wm } of V and W respectively.

Sketch of the Proof. (You may ignore the proof.)


VO
T
/W T
/ T(v) T
/W T
/W
O vO
O
VO O VO O

       
Rn Rm [v]B [T(v)]B0 Rn / Rm ???
Rn / Rm A

By the last theorem, there exists A such that the following diagram is
commutative. Observe that the ith column of A is [T(vi )]B0 .
Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Example 1: Matrix representation of a linear trans...
Example
Let P2 (R) be the vector space of all polynomials with real coefficients
of degree at most 2. Consider D : P2 (R) → P2 (R) defined by
D(a0 + a1 x + a2 x2 ) = a1 + 2a2 x for all a0 + a1 x + a2 x2 ∈ P2 (R).
Find the matrix representation of D with respect to the ordered basis
B = {1, x, x2 } for both domain and codomain of D.

Solution: Note that


D(1) = 0 = 0 × 1 + 0 × x + 0 × x2 .
D(x) = 1 = 1 × 1 + 0 × x + 0 × x2 .
D(x2 ) = 2x = 0 × 1 + 2 × x + 0 × x2 .
Therefore the desired matrix is
 
0 1 0
[D(1)]B [D(x)]B [D(x2 )]B = 0
 
0 2
0 0 0

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Example 2: Matrix representation of a linear trans...
Example
Consider D : P2 (R) → P2 (R) defined by

D(a0 + a1 x + a2 x2 ) = a1 + 2a2 x for all a0 + a1 x + a2 x2 ∈ P2 (R).

Find the matrix representation of D with respect to the ordered bases:


B = {1 + x + x2 , x + x2 , x2 } for the domain, and B0 = {2, 3x, 4x2 } for the
codomain of D.
Solution: Note that
1 2
D(1 + x + x2 ) = 1 + 2x = × 2 + × 3x + 0 × 4x2 .
2 3
1 2
D(x + x2 ) = 1 + 2x = × 2 + × 3x + 0 × 4x2 .
2 3
2
D(x2 ) = 2x = 0 × 2 + × 3x + 0 × 4x2 .
3
Therefore the desired matrix is
 
h i 1/2 1/2 0
2 2 2
[D(1 + x + x )]B0 [D(x + x )]B0 [D(x )]B0 = 2/3 2/3 2/3
0 0 0

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Null space and nullity of a linear transformation
Let T : V → W be a linear transformation. Then
Let Null(T) := {v ∈ V : T(v) = 0W } ⊆ V.
Is Null(T) a subspace of V?
Ans: Yes
Justification: It is non-empty as 0V ∈ Null(T).
If u, v ∈ Null(T) and c, d ∈ R,
then T(cu + dv) = cT(u) + dT(v) = 0W ,
and hence cu + dv ∈ Null(T).

Definition (Null space and nullity)


Null(T) := {v ∈ V : T(v) = 0W } is called the null space of T.
The nullity of T is defined to be the dimension of Null(T).

Example
Find the null space and nullity of the linear transformations discussed
in the beginning of the notes.

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Range (or Image) of a linear transformation, and rank
Let T : V → W be a linear transformation. Then
Let Image(T) := {w ∈ W : w = T(v) for some v ∈ V} ⊆ W.
Is Image(T) a subspace of W?
Ans: Yes
Justification: It is non-empty as 0W ∈ Image(T).
If w1 , w2 ∈ Image(T) and c1 , c2 ∈ R,
then w1 = T(v1 ) and w2 = T(v2 ) for some v1 , v2 ∈ V,
and hence c1 w1 + c2 w2 = T(c1 v1 + c2 v2 ) ∈ Image(T).

Definition (Range space and rank)


Image(T) := {w ∈ W : w = T(v) for some v ∈ V} is called the
range space of T.
The rank of T is the dimension of the range space of T.

Question to think: Is there any relation between rank (resp., nullity) of


a linear transformation and that of a matrix? (See Lecture 7)
Consider the correspondence TA ↔ A. Here A is an m × n real matrix,
and TA : Rn → Rm is the corresponding linear map.
Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Rank-Nullity Theorem

Theorem
Let T : V → W be a linear transformation, where dim(V) is finite.
Then rank(T) + nullity(T) = dim(V).

Proof. Start with a basis {u1 , . . . , un } of Null(T). Extend this to a


basis {u1 , . . . , un , v1 , . . . , vr } of V. It is enough to prove that
{T(v1 ), . . . , T(vr )} is a basis of Image(T).

Spanning: Any vector of Image(T) looks like T(v) for some v ∈ V.


Write v = c1 u1 + · · · + cn un + d1 v1 + · · · + dr vr . Then
T(v) = c1 T(u1 ) + · · · + cn T(un ) + d1 T(v1 ) + · · · + dr T(vr )
= d1 T(v1 ) + · · · + dr T(vr ).
Lin. Independence: Let b1 T(v1 ) + · · · + br T(vr ) = 0.
This implies that b1 v1 + · · · + br vr ∈ Null(T).
So b1 v1 + · · · + br vr = a1 u1 + · · · + an un for some ai ∈ R.
Thus b1 v1 + · · · + br vr − a1 u1 − · · · − an un = 0.
Therefore b1 = · · · = br = 0.

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Row and column spaces

Definition
Let A be an m × n matrix over R.
The subspace of Rm generated by all columns (column vectors)
of A is called the column space of A.
The subspace of Rn generated by all rows (row vectors) of A is
called the row space of A.

Example
 
1 2 4 3
Let A = 5 6 8 .
7
9 10 1211
       
 1 2 3 4 
Column space of A is Span 5 ,  6  ,  7  ,  8  .
9 10 11 12
 

Column space of A is a subspace of R3 .

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Examples: Row and column spaces

Example
 
1 2 4 3
Let A = 5 6 8 . 7
9 1012 11
      

 1 5 9 
      
2 6 10

Row space of A is Span  , ,  .
3 7 11

 
4 8 12
 

Row space of A is a subspace of R4 .

Example
    
1 0 2 0  x1 
If A = 0 1 3 0, Column Sp. is x2  ∈ R3 : x3 = 0 .
0 0 0 0 x3
 

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Row rank and column rank

Definition
Let A be an m × n matrix over R.
The dimension of the column space of A is called the column
rank of A.
The dimension of the row space of A is called the row rank of A.

Example
   
1 0 2 0 1 1 1 1
Let A = 0 1 3 0 and B = 0 2 1 1.
0 0 0 0 0 0 3 1
Column rank of A is 2. Row rank of A is 2.
Column rank of B is 3. Row rank of B is 3.
As a consequence of Rank-Nullity Theorem, we can verify that for an
arbitrary matrix D, row rank(D) = column rank(D).

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
For every matrix, row rank = column rank (an
application of the Rank-Nullity Theorem)

Theorem
For an m × n matrix A over R, row rank(A) = column rank(A).

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Some observations to prove: row rank = column rank

1 Consider A as a linear map A : Rn → Rm .


2 An element of Image(A) looks like AX for some X ∈ Rn .
3 But AX = x1 A1 + · · · + xn An , where Ai is the ith column of A.
4 Therefore Image(A) = Span{A1 , . . . , An } = Column Sp.(A).
5 Hence rank(A) := dim(Image(A)) = column rank(A).
6 Rank-nullity theorem: rank(A) + nullity(A) = dim(Rn ).
7 Therefore column rank(A) = n − nullity(A).
So it is enough to show that

row rank(A) = n − nullity(A).

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Elementary row operations preserve row space, hence
rank

Theorem
Let A and B be row equivalent. Then A and B have the same row
space. In particular, row rank(A) = row rank(B).

Proof. Note that A and B have the same order (say, m × n).
Let R1 , . . . , Rm ∈ Rn be the row vectors of A. We observe that the
elementary row operations preserve the row space:
1 Effect of the 1st type elementary row operation, e.g.,
Span{R1 , R2 , R3 , . . . , Rm } = Span{R2 , R1 , R3 , . . . , Rm }.
2 Effect of the 2nd type elementary row operation, e.g.,
Span{R1 , R2 , R3 , . . . , Rm } = Span{R1 , c · R2 , R3 , . . . , Rm }, where
c 6= 0 (important!).
3 Effect of the 3rd type elementary row operation, e.g.,
Span{R1 , R2 , R3 , . . . , Rm } = Span{R1 , R2 − c · R1 , R3 , . . . , Rm }, where
c ∈ R.

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Elementary row operations preserve the nullity of a
matrix

1 Let A and B be row equivalent matrices over R.


2 Then AX = 0 and BX = 0 have the same solution set,
i.e., Null(A) = Null(B).
3 Therefore nullity(A) = nullity(B).

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Proof of “row rank(A) = n − nullity(A)”

1 Let A be an m × n matrix over R.


2 A is row-equivalent to a row-reduced echelon matrix B.
3 Since row rank(A) = row rank(B) and nullity(A) = nullity(B), it is
enough to prove that

row rank(B) + nullity(B) = n.


4 We will study some examples to observe this equality. But I will
leave it as an exercise to verify this equality in the general
situation.

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
For a row-reduced echelon B,
row rank(B) = n − nullity(B)
3 7
 
1 0 5 5
Consider a row-reduced echelon matrix B=0 1 − 15 1
5
.
0 0 0 0
We shall show that row rank(B) + nullity(B) = 4.
It can be observed that row rank(B) is the number of non-zero
rows of B, i.e., the number of pivots of B.
So row rank(B) = 2.
Consider the system BX = 0. The pivot variables are x1 , x2 . The
free variables are x3 and x4 . The system BX = 0 is
3 7
x1 + x3 + x4 = 0
5 5
1 1
x2 − x3 + x4 = 0
5 5
We claim that nullity(B) is the number of free variables, because
...

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
How to solve BX = 0 when B is row-reduced echelon?
3 7
 
1 0 5 5
Consider B=0 1 − 15 15 , a row-reduced echelon matrix.
0 0 0 0
The corresponding homogeneous system can be written as

3 7
x1 + x3 + x4 = 0
5 5
1 1
x2 − x3 + x4 = 0
5 5
The solutions of the system are given by
 
3 7
 
x1 − x
 5 3 5 4 − x 
−3/5
 
−7/5

x2   1 1   1/5  −1/5
 =
x3   5 x 3 − x4  = x3 
 1  + x4  0 
  
5 

x4  x3  0 1
x4
nullity(B) = dim(Null(B)) = the number of free variables.

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Isomorphism of vector spaces

Definition
1 A linear map T : V → W is said to be an isomorphism if there is
a linear map S : W → V such that S ◦ T = 1V : V → V (identity
map) and T ◦ S = 1W : W → W.
2 Equivalently, a linear map T : V → W is said to be an
isomorphism if it is bijective (as a set map).
3 If T : V → W is an isomorphism, we say that V and W are
isomorphic, and we write V ∼
= W.

Example
Let A be an n × n matrix over R. Consider A : Rn → Rn as a linear
map. When is it an isomorphism?
Answer: When there is an inverse linear map B : Rn → Rn such that
A ◦ B = 1Rn and B ◦ A = 1Rn , i.e., when there is an n × n matrix B over
R such that AB = In and BA = In , i.e., when A is an invertible matrix.

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem
Thank You!

Dr. Dipankar Ghosh (IIT Kharagpur) Linear Transformation and Rank-Nullity Theorem

You might also like