Week 5

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Week-5

Mathematics for Data Science - 2


Rank and Nullity of a matrix
Graded Assignment

1. The marks obtained by Karthika, Romy and Farzana in Quiz 1, Quiz 2 and End sem
(with the maximum marks for each exam being 100) are shown in Table M2W5G1.

Quiz 1 Quiz 2 End sem


Karthika 40 50 60
Romy 20 50 50
Farzana 30 40 70

Table: M2W5G1

If x1 % of Quiz 1, x2 % of Quiz 2, and x3 % of End sem is taken to calculate the total


marks T1 (x1 , x2 , x3 ), T2 (x1 , x2 , x3 ), and T3 (x1 , x2 , x3 ) of Karthika, Romy, and Farzana,
respectively, then choose the correct set of options.
1
⃝ Option 1: T2 (x1 , x2 , x3 ) = 100
(20x1 + 50x2 + 50x3 ).
1
⃝ Option 2: T2 (x1 , x2 , x3 ) = 100
(40x1 + 20x2 + 30x3 ).
⃝ Option 3: If x1 = 20%, x2 = 20%, and x3 = 60%, then T1 (x1 , x2 , x3 ) = 44.
⃝ Option 4: If x1 = 20%, x2 = 20%, and x3 = 60%, then T1 (x1 , x2 , x3 ) = 54.
⃝ Option 5: If x1 = 20%, x2 = 20%, and x3 = 60%, then Farzana obtained the
highest total marks.
⃝ Option 6: Ti (x1 , x2 , x3 ) is a linear mapping from R3 to R, for each i = 1, 2, 3.
Solution:

Quiz 1 Quiz 2 End sem


Karthika 40 50 60
Romy 20 50 50
Farzana 30 40 70

x1 % of Quiz1, x2 % of quiz2 , x3 % of end sem is taken to calculate the total marks.


T1 : Karthika , T2 : Romy , T3 : Farzana
1
T1 (x1 , x2 , x3 ) = (40x1 + 50x2 + 60x3 )
100
1
T2 (x1 , x2 , x3 ) = (20x1 + 50x2 + 50x3 )
100
1
T3 (x1 , x2 , x3 ) = (30x1 + 40x2 + 70x3 )
100
Hence Option 1 is right and Option 2 is wrong.
If x1 = 20%, x2 = 20%, x3 = 60% then, T1 (x1 , x2 , x3 ) would be:
1
T1 (x1 , x2 , x3 ) = (40 · 20 + 50 · 20 + 60 · 60)
100
= 54

Hence Option 3 is wrong and Option 4 is right.


1
T2 (20, 20, 60) = (20 · 20 + 50 · 20 + 50 · 60) = 4 + 10 + 30 = 44
100
1
T3 (20, 20, 60) = (30 · 20 + 40 · 20 + 70 · 60) = 6 + 8 + 42 = 56
100
Hence Option 5 is correct.
T3 (20, 20, 60) is the maximum and so Farzana obtained the highest total marks.
Hence Option 6 is correct.
Ti : R3 → R, i = 1, 2, 3 are all linear because

Ti ((x1 , y1 , z1 ) + (x2 , y2 , z2 )) = Ti (x1 , y1 , z1 ) + Ti (x2 , y2 , z2 )


and Ti (c(x1 , y1 , z1 )) = cṪi (x1 , y1 , z1 )

2. A molecule of carbon dioxide (CO2 ) consists of one carbon atom and two oxygen atoms.
A molecule of water consists of two hydrogen atoms and one oxygen atom, whereas a
molecule of oxygen consists of two oxygen atoms. One molecule of glucose consists of
six atoms of carbon, twelve atoms of hydrogen, and six atoms of oxygen.
In the presence of sunlight, the leaves of trees take carbon dioxide and water to produce
glucose and oxygen.
The chemical equation corresponding to this chemical reaction (R) is given below.

2
x1 CO2 + x2 H2 O −→ x3 C6 H12 O6 + x4 O2 . . . . (R)

In order to balance the chemical equation, we have to choose x1 , x2 , x3 , andx4 such that
both sides have the same number of carbon atoms on each side, the same number of
hydrogen atoms on each side, and the same number of oxygen atoms on each side.
An example of the system of linear equations obtained for balancing a chemical equation
is the following :

x1 C + x2 O −→ x3 CO2

corresponding system of linear equations is:

x1 = x 3
x2 = 2x3

Consider the system of linear equations obtained for balancing the chemical equation
(R) and choose the set of correct options.
⃝ Option 1: The nullity of the matrix corresponding to this system is 1.
⃝ Option 2: The nullity of the matrix corresponding to this system is 2.
⃝ Option 3: {(6, 6, 1, 6)} is a basis of the null space of the matrix corresponding
to this system.
⃝ Option 4: {(1, 1, 6, 1)} is a basis of the null space of the matrix corresponding
to this system.
⃝ Option 5: {(1, 1, 1, 6), (6, 6, 6, 1)} is a basis of the null space of the matrix
corresponding to this system.
⃝ Option 6: {(6, 6, 0, 6), (0, 0, 1, 0)} is a basis of the null space of the matrix
corresponding to this system.
⃝ Option 7: There are infinitely many ways to balance the chemical equation
(R).
Solution:
For the reaction x1 · CO2 + X2 · H2 O −→ x3 · C6 H12 O6 + X4 · O2 to be balanced, we want:
x1 = 6 · x3 (carbon atoms)
2 · x1 + x2 = 6 · x3 + 2 · x4 (oxygen atoms)
2 · x2 = 12 · x3 (hydrogen atoms)
That is
x1 − 6 · x 3 = 0
2 · x1 + x2 − 6 · x3 − 2 · x 4 = 0
2 · x2 − 12 · x3 = 0

3
Thematrix form of
 the  system
  is:
  x1 0
1 0 −6 0    
x 2 0
2 1 −6 −2  x3  = 0
0 1 −6 0
x4 0
     
1 0 −6 0 1 0 −6 0 1 0 −6 0
R2 →R2 −2R1 R →R −R2
2 1 −6 −2 − −−−−−−→ 0 1 6 −2 −−3−−−3−−→ 0 1 6 −2
0 1 −6 0 0 1 −6 0 0 0 −12 2

Row echelon form is (obtained by dividing R3 by -12 in the last matrix).


 
1 0 −6 0
2 1 6 −2
0 1 1 −1 6

x1 , x2 , x3 are dependent and x4 is an independent variable. Thus nullity of the matrix is


1 (Option 1 is right).
The solution is x1 = x4 ; x2 = x4 ; x3 = x64
(1, 1, 16 , 1) is the basis for the null space of A.
i.e., (6, 6, 1, 6) is a basis for the null space of A (Option 3).
Since, x4 is an independent variable, it can take any positive value and hence there are
infinitely many ways to balance R(Option 7).

3. Choose the set of correct options.


⃝ Option 1: The null-space of a scalar matrix is always the zero vector space.
⃝ Option 2: The null-space of a non-zero scalar matrix is always the zero vector
space.
⃝ Option 3: The nullity of a non-zero scalar matrix is always 0.
⃝ Option 4: The rank of a non-zero scalar matrix is always same as the order
of the matrix.
⃝ Option 5: The rank of a non-zero scalar matrix is always 0.
Solution:  
α 0 0
A non-zero 3 × 3 scalarmatrix is of the form  0 α 0 , where α ̸= 0.
0 0 α
Clearly, rank=3 (order of the matrix) and hence nullity=0. Hence, Option1 is not
correct. Options 2,3,4 are right and hence, Option 5 is not right.

4
4. Which of the following maps are linear transformations?
⃝ Option 1: T : R2 → R2 defined by T (x, y) = (2x + y, x − 3y).
⃝ Option 2: T : R2 → R3 defined by T (x, y) = (x + 1, 3x, 3x − 3y + 6).
⃝ Option 3: T : R → R2 defined by T (x) = (−3|x|, 0).
⃝ Option 4: T : R2 → R defined by T (x, y) = 3x − 2y.
Solution:
Option 1:

T (x1 , y1 ) = (2x1 + y1 , x1 − 3y1 )


T (x2 , y2 ) = (2x2 + y2 , x2 − 3y2 )
T (x1 , y1 ) + T (x2 , y2 ) = (2x1 + y1 , x1 − 3y1 ) + (2x2 + y2 , x2 − 3y2 )
= (2(x1 + x2 ) + (y1 + y2 ), (x1 + x2 ) − 3(y1 + y2 )) → (i)
T ((x1 , y1 ) + (x2 , y2 )) = T (x1 + x2 , y1 + y2 )
= (2(x1 + x2 ) + (y1 + y2 ), (x1 + x2 ) − 3(y1 + y2 )) → (ii)

We can see that (i) = (ii) and hence T (v1 + v2 ) = T (v1 ) + T (v2 ) property 1 is satisfied.

T (c(x1 , y1 )) = T (cx1 , cy1 )


= (2cx1 + cy1 , cx1 − 3cy1 )
= (c(2x1 + y1 ), c(x1 − 3y1 ))
= c(2x1 + y1 , x1 − 3y1 ) → (i)
cT (x1 , y1 ) = c(2x1 + y1 , x1 − 3y1 ) → (ii)

(i) = (ii) satisfies property 2, namely T (cv1 ) = cT (v1 ).


Hence, Option 1 is a linear transformation.
Similarly, Option 4 is the linear transformation.
Option 2: T ((1, 0)+(2, 0)) = T (3, 0) = (4, 3, 9) but T ((1, 0)+(2, 0)) = (2, 1, 7)+(3, 2, 9) =
(5, 3, 16). T in Option 2 is not a linear transformation.
Option 3: T (−1) = (1, 0) but −T (1) = (−1, 0) ̸= (1, 0). Option 3 is not a linear
transformation.

5
   
2 2 x 1 2
5. Consider a map T : R → R defined as T (v) = Av, where v = and A = .
y 2 1
Which of the following options are correct?
⃝ Option 1: T is a linear transformation.
⃝ Option 2: T is both one-one and onto.
⃝ Option 3: T is neither one-one nor onto.
⃝ Option 4: T is one-one but not onto.
Solution:    
2 2 x 1 2
T : R → R defined as T (v) = Av , v = ,A= .
y 2 1
Clearly, T is a linear transformation.
     
1 2 x 0
T (v) = 0 =⇒ Av = 0 =⇒ A = = = .
2 1 y 0
Hence we are finding the null space of A. But nullity of A is 0.
nullity(A) = 0 =⇒ {x : Ax = 0} = {0}
=⇒ nullity(T ) = 0 =⇒ Rank(T ) = 2
=⇒ T is both 1-1 and onto .
Hence Option 2 is correct.

6. Consider the matrix A given as follows:


 
1 1 0 0
0 1 0 0
A= 1

0 1 0
0 0 0 0
Which of the following sets is a possible basis for the null space of A?
⃝ Option 1: {(0, 1, 0, 0), (0, 0, 0, 1)}
⃝ Option 2: {(0, 0, 0, 1)}
⃝ Option 3: {(0, 0, 1, 0)}
⃝ Option 4: {(0, 0, 1, 0), (0, 0, 0, 1)}
Solution:
       
a 1 1 0 0 a 0
b 0 1 0 0  b  0
If v = 
 c  is in the null space of A, then Av = 0 =⇒ 1 0
     =  .
1 0  c  0
d 0 0 0 0 d 0

6
Option 1: {(0, 1, 0, 0), (0, 0, 0, 1)}

if the vector v is in the basis for the null space then it should satisfy Av = 0.
          
1 1 0 0 0 1 1 0 0
0 1 0 0 1 0 + 1 1 + 0 0 + 0 0
          

1 0 = 0
1 0 0 1 0 1 0
0 0 0 0 0 0 0 0 0
 
0·1+1·1+0·0+0·0
0 · 0 + 1 · 1 + 0 · 0 + 0 · 0
= 
0 · 1 + 1 · 0 + 0 · 1 + 0 · 0
0·0+1·0+0·0+0·0
   
1 0
1 0
=0 ̸= 0
  

0 0

Hence Option 1 cannot be a basis for the null space of A.


Option 2: {(0, 0, 0, 1)}
    
1 1 0 0 0 0
0 1 0 0 0 0
   =  
1 0 1 0 0 0
0 0 0 0 1 0

Av = 0 =⇒ v is in the null space of A and nullity of A is 1. Hence Option 2 is correct.


Similarly, options 3 and 4 are incorrect.

7. Let A be a 4 × 3 matrix and B be a 3 × 4 matrix. If the null spaces of A and B are 2


and 1 dimensional vector spaces, respectively, then what is the maximum possible rank
of the matrix AB?
Solution:
Given: A is 4×3 matrix and the null space is 2 dimensional. By the rank-nullity theorem:

Rank + N ullity = columns of the matrix


RA + 2 = 3
RA = 1

7
B is 3 × 4 matrix and the null space is 1 dimensional. By the rank-nullity theorem

Rank + N ullity = columns of the matrix


RB + 1 = 4
RB = 3

The maximum possible rank of matrix AB is minimum of ranks of A and B and hence
is 1.

8
Comprehension Type Question:

Shubham, Poulami, Asrifa, Raphael, and Vicky bought the same type of pen drives from
a shop. The shopkeeper asked them to give ratings on the quality of the pen drives, 1-
star being the lowest denoting not satisfied and 5-stars being the highest denoting extremely
satisfied. Whenever a customer gives a rating, say 3-stars rating, then the vector we consider
corresponding to that rating is (0, 0, 1, 0, 0). Note that one customer can rate only once and
the same rating can be given by more than one customer.
Example: Table M2W5G2 shows an example of the rating given by the customers mentioned
above as: Shubham gave 2-stars rating, Poulami gave 1-star rating, Asrifa gave 1-star rating,
Raphael gave 5-stars rating, and Vicky did not give any rating.

ratings
Customers 1-star 2-stars 3-stars 4-stars 5-stars

Shubham 0 1 0 0 0

Poulami 1 0 0 0 0

Asrifa 1 0 0 0 0

Raphael 0 0 0 0 1

Vicky 0 0 0 0 0

Table: M2W5G2

Based on the above information answer the following questions.

8. Choose the set of correct options from the following.


⃝ Option 1: If Shubham and Poulami both gave 2-stars rating, Asrifa and
Raphael both gave 1-star rating, and Vicky gave 3-stars rating, then the di-
mension of the vector space spanned by the row vectors corresponding to the
ratings is 3.
⃝ Option 2: If Shubham and Vicky both gave 3-stars rating, Poulami gave 2-
stars rating, Asrifa gave 5-stars rating, and Raphael gave 1-star rating then

9
the dimension of the vector space spanned by the row vectors corresponding
to the ratings is 4.
⃝ Option 3: If Shubham gave 5-stars rating, Poulami gave 3-stars rating, As-
rifa gave 1-star rating, Raphael gave 2-stars rating, and Vicky gave 4-stars
rating then the dimension of the vector space spanned by the row vectors
corresponding to the ratings is 5.
⃝ Option 4: If Shubham, Poulami, and Asrifa, all gave 2-stars rating, and
Raphael and Vicky gave 1-star rating then the dimension of the vector space
spanned by the row vectors corresponding to the ratings is 1.
Solution:
 
0 1 0 0 0
0 1 0 0 0
 
Option 1: The matrix corresponding to the 1
first option is  0 0 0 0.
1 0 0 0 0
0 0 1 0 0
 
1 0 0 0 0
0 1 0 0 0
 
0
The row reduced echelon form is  0 1 0 0 .
0 0 0 0 0
0 0 0 0 0
There are three linear independent vectors and hence dimension is 3.
 
0 0 1 0 0
0 1 0 0 0
 
0
Option 2: The matrix corresponding to the second option is  0 0 0 1.
1 0 0 0 0
0 0 1 0 0
 
1 0 0 0 0
0 1 0 0 0
 
The row reduced echelon form is 0 0 1 0 0 .

0 0 0 0 1
0 0 0 0 0
There are 4 linearly independent vectors and so the dimension is 4.
Similarly, Option 3 is right and Option 4 is wrong.

10
9. Consider the matrix A corresponding to the ratings given in Table M2W5G2, which is
given as follows:  
0 1 0 0 0
1 0 0 0 0
 
A= 1 0 0 0 0
0 0 0 0 1
0 0 0 0 0
Which of the following statements about the matrix A are true?
⃝ Option 1: The set {(1, 0, 0, 0, 0), (0, 1, 0, 0, 0), (0, 0, 0, 1, 0)} spans the nullspace
of A.
⃝ Option 2: The set {(0, 0, 1, 0, 0), (0, 0, 0, 1, 0)} spans the nullspace of A.
⃝ Option 3: Nullity of A is 2.
⃝ Option 4: Nullity of A is 3.
Solution:
 
0 1 0 0 0
1 0 0 0 0
 
1
A= 0 0 0 0
0 0 0 0 1
0 0 0 0 0

Ax = 0 gives x2 = 0 , x1 = 0 , x5 = 0.
There are two independent variables so nullity is 2 (Option 3).
The independent variables are x3 and x4 .
Hence {(0, 0, 1, 0, 0), (0, 0, 0, 1, 0)} forms a basis for the null space of A (option 2).

10. What will be the rank of the matrix A defined in the above question? [Ans: 3]

Solution:
Nullity(A)=2 and A is 5 × 5 matrix.
By rank-nullity dimension theorem,

Rank(A) + nullity(A) = 5
=⇒ Rank(A) = 3

11

You might also like