Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Homer - The Odyssey

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

Week-1

Mathematics for Data Science - 2


Vectors and Matrices
Assignment

1. Match the matrices in column A with their properties in column B and answer the
following question.

Matrix Properties of matrix


(Column A) (Column B)
 
2 0 0
a) 3 4 0 i) has determinant 0
5 6 7

 
1 1 1
b) 1 1 1 ii) is a scalar matrix
1 1 1

 
1 0 0
c) 0 2 0 iii) is a lower triangular matrix but not a diagonal matrix
0 0 3

 
2 0 0
d) 0 2 0 iv) is a diagonal matrix but not a scalar matrix
0 0 2

Table: M2W1G1

Which of the following are true? (MSQ)


□ Option 1: a) → iii)
□ Option 2: a) → ii)
□ Option 3: b) → i)
□ Option 4: b) → ii)

1
□ Option 5: c) → iv)
□ Option 6: c) → iii)
□ Option 7: d) → iv)
□ Option 8: d) → ii)

Solution:
 
2 0 0
a) 3 4 0
5 6 7
As all the elements of the matrix, above the diagonal elements are zero, it is a lower
triangular matrix.
Also there are elements below the diagonal that are non-zero. So it is not a diagonal
matrix.
Hence option (iii) ‘is a lower triangular matrix but not a diagonal matrix’ is correct.
Option 1: a) → iii) is correct.
 
1 1 1
b) 1 1 1
1 1 1
The determinant of the above matrix is zero. OR  
0 0 0
By applying the elementary row transformation R1 → R1 − R2 , we have 1 1 1. The
1 1 1
determinant of this matrix is 0 and note that the row operation R1 → R1 − R2 does not
change the determinant of the matrix and hence the determinant of the original matrix
is zero.
So option (i) ‘has determinant 0’, is correct.
Option 3: b) → i) is correct.
 
1 0 0
c) 0 2 0
0 0 3
Only the diagonal elements are non-zero, moreover they are not the same so it is diagonal
matrix but not a scalar matrix.
Hence the option (iv) ‘is diagonal matrix but not a scalar matrix’, is correct.
Option 5: c) → iv) is correct.

2
 
2 0 0
d) 0 2 0
0 0 2
As only the diagonal elements are non-zero, moreover they are same i.e. “2” only so it
is a scalar matrix.
Hence the option (ii) ‘is a scalar matrix’, is correct.
Option 8: d) → ii) is correct.

2. Match the systems of linear equations in Column A with their number of solutions in
column B and their geometric representation in Column C and answer the following
question.

System of linear equations Number of solutions Geometric representations


(Column A) (Column B) (Column C)

i) x + y = 3, x − y = −3 a) Infinite solutions 1)

ii) x + y + z = 1, x + y + z = 7 b) Unique solution 2)

iii) z = 0, x + y + z = 1 c) No solution 3)

Table: M2W1G2

Which of the following are true? (MSQ)


□ Option 1: i) → b) → 3)

3
□ Option 2: i) → a) → 3)
□ Option 3: ii) → c) → 2)
□ Option 4: ii) → c) → 1)
□ Option 5: iii) → a) → 2)
□ Option 6: iii) → a) → 1)
Solution:
i) Given x + y = 3, x − y = −3 a system of two linear equations in two unknowns
(variables) x and y.
Solving these equations we get x = 0, y = 3. (i.e., Adding these two equations we get
2x = 0, so x = 0. Substituting x = 0 in the first equation we have y = 3. )
As we get only one pair of values for x and y, so the given system of linear equations
has a unique solution.
So from Column (B) the option (b) is correct.
Now, in R2 both the equations represent straight lines and they intersect each other at
x = 0, y = 3 i.e. (0, 3) which is on Y-axis. So from Column (C) the option (3) is correct.
Hence, option 1: i) → b) → 3) is correct.
ii) Given x + y + z = 1, x + y + z = 7 a system of two linear equations in three unknowns
(variables) x, y and z. If there exists a solution (a, b, c) of this system of linear equations
then the point (a, b, c) should lie on both the planes, (as these system of linear equations
represents plane) which gives us a + b + c = 1 and a + b + c = 7 implies 1 = 7 which is
not true.
Hence there cannot exist any such point. This implies the system of linear equations has
no solution. So from Column (B) the option (c) is correct.
Observe that, each equation represents a plane on the coordinate system and the two
equations will have no solution if and only if the two planes that represent these two
equations are parallel. So from Column (C) the option (1) is correct.
So, option 4: ii) → c) → 1) is correct.
iii) Given z = 0, x + y + z = 1. z = 0 denotes the XY-plane and x + y + z = 1 denotes
a plane on the coordinate system.
Substituting z = 0 in the second equation we get, x + y = 1 =⇒ y = 1 − x, i.e., for any
arbitrary value of x say k we get some arbitrary value of y which is y = 1 − k.
=⇒ Any point of the form (k, 1 − k, 0) will satisfy both the equations, where k ∈ R.
So, the system of linear equations has infinitely many solutions. So from Column (B),
option (a) is correct.
As z = 0 denotes the XY -plane and x + y + z = 1 denotes a plane on the coordinate
system, intersection of these two planes gives a line (has infinitely many points). So
from Column (C) the option (2) is correct.
Hence, option 5: iii) → a) → 2) is correct.

4
 
1 0  
0 0
3. Let B =  0 1 and C = . Which of the following options are true for a
−1 2
−1 0
matrix A, such that AB = C? (MSQ)
□ Such a matrix does not exist.
□ There is a unique matrix A satisfying this property.
□ There are infinitely many such matrices.
□ A should be a 2 × 3 matrix.
□ A should be a 3 × 2 matrix.
Solution:
If A is a matrix of order m × n and B is a matrix of order n × p, then AB must be a
matrix of order m × p.
Here, B is a matrix of order 3 × 2, so n = 3, p = 2 and the resultant matrix C = AB is
of order 2 × 2, so m = 2, p = 2. Hence A must be a matrix of order 2 × 3.
Now, let us take any arbitrary matrix A of order 2 × 3 and try to see the conditions on
the elements of A for which AB = C.
 
a11 a12 a13
Let A =
a21 a22 a23
 
  1 0  
a11 a12 a13  a 11 − a13 a 12
AB = 0 1 =
a21 a22 a23 a21 − a23 a22
−1 0
   
a11 − a13 a12 0 0
So, =
a21 − a23 a22 −1 2
Comparing the elements we get, a11 − a13 = 0 =⇒ a11 = a13 ; a12 = 0; a21 − a23 = −1
=⇒ a21 = a23 − 1 and a22 = 2.
Hence,  
a11 0 a11
A=
a23 − 1 2 a23
where a11 and a23 can take any real number. So, there are infinitely many such matrices
A such that AB = C and the order of the matrix A is 2 × 3.
Hence options “There are infinitely many such matrices.” and “A should be a
2 × 3 matrix.” are correct.

5
4. Let A be a 2 × 2 real matrix and let trace(A) denote the sum of the elements in the
diagonal of A. Which of the following are true? (MSQ)
□ det(A − cI) is a polynomial in c of degree 1.
□ det(A − cI) is a polynomial in c of degree 2.
□ det(A − cI) = c2 − trace(A)c + det(A)
□ det(A − cI) = c2 + trace(A)c − det(A)
□ det(A − cI) = trace(A)c − det(A)
□ det(A − cI) = −trace(A)c + det(A)
Solution:
 
p q
Let A = . Then trace(A) = p + s and det(A) = ps − rq
r s
     
p q 1 0 p−c q
Now, A − cI = −c =
r s 0 1 r s−c

det(A − cI) = (p − c)(s − c) − rq


= ps − cs − cp + c2 − rq
= c2 − c(p + s) + ps − rq
= c2 − trace(A) + det(A)
So, det(A − cI) is a polynomial in c of degree 2 and det(A − cI) = c2 − trace(A) + det(A).
Hence options (2) det(A − cI) is a polynomial in c of degree 2 and option (3)
det(A − cI) = c2 − trace(A) + det(A) are correct.

5. Suppose there are two types of oranges and two types of bananas available in the market.
Suppose 1 kg of each type of orange costs |50 and 1 kg of each type of banana costs
|40. Gargi bought x kg of the first type of each fruit, orange and banana, and y kg
of the second type of each fruit, orange and banana. She paid |250 for oranges and
|200 for bananas. Which of the following options are correct with respect to the given
information? (MSQ)
□ Option 1: The matrix representation to find x and y can be
    
50 50 x 250
=
40 40 y 200
□ Option 2: The matrix representation to find x and y can be
    
50 40 x 250
=
50 40 y 200

6
□ Option 3: The matrix representation to find x and y can be
    
40 40 x 200
=
50 50 y 250

□ Option 4: x can be 2 and y can be 3.


□ Option 5: There are infinitely many real values possible for x and y.
□ Option 6: There are only finitely many real values possible for x and y.
□ Option 7: There are only finitely many natural numbers possible for x and
y.
Solution:
Given there are two types of oranges, say type 1 orange, type 2 orange and two types
of bananas, say type 1 banana and type 2 banana available in the market, 1 kg of each
type of orange costs |50 and 1 kg of each type of banana costs |40. Gargi bought x kg
of the first type of each fruit i.e., x kg of type 1 orange and x kg of type 1 banana, and y
kg of the second type of each fruit, i.e., y kg of type 2 orange and y kg of type 2 banana.
She paid |250 for oranges i.e., for purchasing x kg of orange of type 1 and y kg of orange
of type 2 and |200 for bananas i.e., for purchasing x kg of bananas of type 1 and y kg
of bananas of type 2.
i.e.,

Gargi brought Gargi paid

Orange type 1 : x kg Oranges : |250


Banana type 1 : x kg

Orange type 2 : y kg Bananas : |200


Banana type 2 : y kg

Orange type 1 cost : |50 Orange type 2 cost : |50


Banana type 1 cost : |40 Banana type 2 cost : |40

Hence,

50x + 50y = 250 (Equation for oranges) (1)


40x + 40y = 200 (Equation for Bananas) (2)

The matrix representation of the above equations are:


    
50 50 x 250
=
40 40 y 200

7
So option 1 is correct.
If we interchange the order of the equations we get:
40x + 40y = 200 (Equation for Bananas)
50x + 50y = 250 (Equation for oranges)

The matrix representation of the above equations are:


    
40 40 x 200
=
50 50 y 250
So option 3 is correct.
Now from the above equations we get,
50(x + y) = 250 =⇒ x + y = 5
40(x + y) = 200 =⇒ x + y = 5
Hence, the solution of the system of linear equations is (a, 5 − a), where a can take any
arbitrary real number but in this context, both of them should be positive i.e., a ≥ 0,
5 − a ≥ 0 =⇒ 5 ≥ a =⇒ 0 ≤ a ≤ 5. Hence, a can be any real number in between 0
and 5.
Clearly, there are infinitely many real values possible for x and y and also x = 2 and
y = 3 can be one possible solution.
So option (4) and (5) are also correct.
As solutions are of the form (a, 5 − a) and 0 ≤ a ≤ 5 so, there will be finitely many
natural numbers possible as solutions they are :
x = 0, y = 5
x = 1, y = 4
x = 2, y = 3
x = 3, y = 2
x = 4, y = 1
x = 5, y = 0
So, Option (7) is correct.

6. Suppose det(3A) = n × det(A) for any 3 × 3 real matrix A. What is the value of n?
[Answer: 27]
Solution:
If any real number c is multiplied to a row of a square matrix M , then the determinant
of the new matrix will be c times the determinant of the matrix M .
Now let c is a real number and A is a square matrix, cA means c is multiplied with all
the elements of matrix A.

8
If A is a square matrix of order p × p, then A has p rows. Hence det(cA) = cp det(A).
Here c = 3 and p = 3 substituting these values, we get det(3A) = 33 det(A) = 27det(A).
So, n = 27.

 
2019 100 2119
7. Suppose A = 2020 200 2220. What will be the value of det(A)? [Answer: 0]
2021 300 2321
Solution:
We know that adding a scalar multiple of one row (column) with another row does not
change the value of determinant of a matrix.

2019 100 2119 2019 100 2119 2019 100 2119
R3 −R2 R2 −R1
2020 200 2220 − − − −
→ 2020 200 2220 − −− −
→ 1 100 101

2021 300 2321 1 100 101 1 100 101
As two rows of the last matrix are identical, the determinant will be zero.
Hence, det(A) = 0.

8. Let A be a square matrix such that A2 = A. If (I + A)3 − 1A = I + mA, then find the
value of m. (NAT)
Solution: Given A2 = A =⇒ A.A2 = A.A =⇒ A3 = A2 = A
Now,

(I + A)3 − 1.A = I + m.A


I 3 + 3I 2 A + 3IA2 + A3 − 1.A = I + m.A
I + 3.A + 3.A2 + A3 − 1.A = I + m.A
3.A + 3.A + A − 1.A = m.A
7.A − 1.A = m.A
m=7−1=6

9
 
2 3 4
9. If A = 1 2 3, then what will be the determinant of A ? (NAT)
4 5 6
 
2 3 4
Solution: Given A = 1 2
 3.
4 5 6
Note if each element of any row (or column) of a matrix is multiplied by the same number
them the value of determinant is multiplied by that number.
Adding a scalar multiple of one row with another does not change the determinant of a
matrix.
2 3 4
2 3 4 1 1 1 1 1 1
R −R1
R1 −R2

A = 1
2 3 −−3−−→ 1 2 3 −
− − −
→ 1 2 3 = 2 1 2 3

4 5 6 2 2 2 2 2 2 1 1 1
As two rows of the last matrix are identical, the determinant will be zero.
Hence, det(A) = 0.

10. Let A be a square matrix of order 3 and B be a matrix that is obtained by adding the
first row of A to the third row of A and adding 3 times the second row of A to the first
row of A. If det(A) = 1, then find out the value of det(2A2 B −1 ).
Solution:
Given A is a square matrix of order 3, and B is a matrix that is obtained by adding
the first row of A to the third row of A and adding 3 times the second row of A to the
first row of A. Observe that the determinant will not be changed if we perform any row
operations of the above mentioned type. Thus det(B) = det(A).
Now det(B −1 ) = det(B)
1 1
= det(A) , det(AB) = det(A) det(B) and det(kA) = k n det(A)
where A is any square matrix of order n and k is any scalar.
Thus we have
det(2A2 B −1 ) = 23 det(A2 B −1 )
= 8det(A2 ) det(B −1 )
1
= 8det(A) det(A)
det(B)
1
= 8det(A) det(A)
det(A)
= 8(1), since det(A) = 1
= 8.

10
 
1 1 1
11. If A = 1 1 1, then what will be the value of the sum of the diagonal elements of
1 1 1
4
A?
 
1 1 1
Solution: Given A = 1 1 1. Let tr(A) denote the trace of a matrix A, i.e., the
1 1 1
sum of all diagonal elements of the matrix A.
Thus tr(A) = 1 + 1 + 1 = 3. Now
   
1 1 1 1 1 1
A2 = A.A = 1 1 1 . 1 1 1
1 1 1 1 1 1
 
1+1+1 1+1+1 1+1+1
= 1 + 1 + 1 1 + 1 + 1 1 + 1 + 1
1+1+1 1+1+1 1+1+1
 
3 3 3
= 3 3 3
3 3 3

Thus tr(A2 ) = 3 + 3 + 3 = 9 = 32 = (tr(A))2 . Also


   
3 3 3 1 1 1
A3 = A2 .A = 3 3 3 . 1 1 1
3 3 3 1 1 1
 
3+3+3 3+3+3 3+3+3
= 3 + 3 + 3 3 + 3 + 3 3 + 3 + 3
3+3+3 3+3+3 3+3+3
 
9 9 9
= 9 9 9
9 9 9

Thus tr(A3 ) = 9 + 9 + 9 = 27 = 33 = (tr(A))3


Similarly, tr(A4 ) = 27 + 27 + 27 = 81 = 34 = (tr(A))4

11
12. Let A = [αij ] be a square matrix of order 3, where αij = i + j. Find det(A).
Solution: A = [αij ] be a square matrix of order 3, where αij = i + j, 1 ≤ i, j ≤ 3.
 Given 
2 3 4
So, A = 3 4 5.

4 5 6
Note that adding a scalar multiple of one row with another does not change the deter-
minant of the matrix.
     
2 3 4 2 3 4 2 3 4
R3 −R2 R −R1
3 4 5 − −−−→ 3 4 5 −−2−−→ 1 1 1
4 5 6 1 1 1 1 1 1
Since two rows of the last matrix are identical, the determinant will be zero.
Hence, det(A) = 0 .

Comprehension Type Question:

Suppose there are three families F1 , F2 , F3 living in different cities and they pay |x1 , |x2 ,
|x3 per unit respectively for electricity consumption each month. In January 2021, the
electricity consumption by F1 , F2 , and F3 is 30 units, 20 units, and 25 units, respectively.
In February 2021, it is 20 units, 35 units, and 25 units, respectively. In March 2021, it is
20 units, 10 units, and 15 units, respectively. The total amount paid by the three families
together for electricity consumption in January, February, and March is |670, |730, and |400
respectively.
Answer the following questions using this given data.

13. If we want to find x1 , x2 , x3 by solving a system of linear


 equations represented by the
670
T
matrix form Ax = b, where x = (x1 , x2 , x3 ) , and b = 730 , then which of the following

400
options are correct? (MSQ)
 
□ Option 1: The first row of the matrix A is 30 20 25 .
 
□ Option 2: The second row of the matrix A is 20 35 10 .
 
□ Option 3: The third row of the matrix A is 20 10 15 .
 
□ Option 4: The third row of the matrix A is 20 10 25 .
Solution:
As per the given data we have,

12
Months Electric Consumption (in units) Total payments
(in 2021) F1 F2 F3 by F1 , F2 &F3 together
January 30 20 25 670
February 20 35 25 730
March 20 10 15 400

F1 , F2 , F3 live in different cities and they pay |x1 , |x2 , |x3 per unit respectively for
electricity consumption each month, that is, F1 pays |x1 , F2 pays |x2 , F3 pays |x3 .
Hence we have a system of three equations in three unknowns.

30x + 20y + 25z = 670


20x + 35y + 25z = 730
20x + 10y + 15z = 400

The matrix representation of the above system in the form of AX = B is:


    
30 20 25 x 670
20 35 25 y  = 730
20 10 15 z 400
     
30 20 25 x 670
where A = 20 35 25 , X = y , B = 730.
    
20 10 15 z 400
 
Therefore, the first row of the matrix A is 30 20 25 .
 
The second row of the matrix A is 20 35 25 .
 
The third row of the matrix A is 20 10 15 .
Hence, options 1, and 3 are correct.

14. If x′ is the solution of Ax = b, where x′ = (x′1 , x′2 , x′3 )T , then find the value of x′1 +x′2 +x′3 .
Solution:
Given x′ = (x′1 , x′2 , x′3 )T , be the solution of AX = B.
=⇒ Ax  ′ = B.   ′   
30 20 25 x1 670
=⇒ 20 35 25 x′2  = 730.
20 10 15 x′3 400
We have a system of three equations in three unknowns.

13
30x′1 + 20x′2 + 25x′3 = 670 (1)
20x′1 + 35x′2 + 25x′3 = 730 (2)
20x′1 + 10x′2 + 15x′3 = 400 (3)

Subtracting 1 from 2, we get

−10x′1 + 15x′2 = 60
=⇒ −2x′1 + 3x′2 = 12 (4)

Now, 6 × (2) − 10 × (3) gives

120x′1 + 210x′2 + 150x′3 = 4380


200x′1 + 100x′2 + 150x′3 = 4000
=⇒ −80x′1 + 110x′2 = 380 (5)

4 × (4) − (5) gives

−8x′1 + 12x′2 = 48
−8x′1 + 11x′2 = 38
=⇒ x′2 = 10 (6)

Substituting the value of x′2 in 4, we get,

−2x′1 + 3(10) = 12
=⇒ −2x′1 + 30 = 12
=⇒ −2x′1 = −18
=⇒ x′1 = 9

Finally, substituting the values of x′1 and x′2 in 1, we get

30(9) + 20(10) + 25x′3 = 670


=⇒ 270 + 200 + 25x′3 = 670
=⇒ 25x′3 = 200
=⇒ x′3 = 8

Thus x′1 + x′2 + x′3 = 9 + 10 + 8 = 27.

14
15. Which of the following are correct? (MSQ)
□ Option A:      
35 25 20 25 20 35
det(A) = 30 × det − 20 × det + 25 × det
10 15 20 15 20 10
□ Option B:      
35 25 25 20 20 35
det(A) = 30 × det + 20 × det + 25 × det
10 15 15 20 20 10
□ Option C:      
20 25 30 25 30 20
det(A) = −20 × det + 35 × det − 25 × det
10 15 20 15 20 10
□ Option D:      
20 25 30 25 30 20
det(A) = 20 × det − 35 × det + 25 × det
10 15 20 15 20 10
Solution: 
30 20 25
Here A =  20 35 25 . So
20 1015     
35 25 20 25 20 35
det(A) = 30 × det − 20 × det + 25 × det
10 15 20 15 20 10
Hence option A is correct.


35 25 20 25 20 35
det(A) = 30 ×
− 20 ×
+ 25 ×

10 15 20 15 20 10
= 30(35 × 15 − 10 × 25) − 20(20 × 15 − 25 × 20) + 25(20 × 10 − 20 × 25)
= 30(525 − 250) − 20(300 − 500) + 25(200 − 700)
= 30(275) − 20(−200) + 25(−500)
= 8250 + 4000 − 12500 = −250

Hence det(A) = −250.


As we know that interchanging the columns of a matrix changes the sign of the deter-
minant, we have      
35 25 20 25 20 35
det(A) = 30 × det − 20 × (−det ) + 25 × det
10 15  2015  20
 10 
35 25 20 25 20 35
Hence, det(A) = 30 × det + 20 × det + 25 × det
10 15 20 15 20 10
Hence option B is correct.
Similarly, expanding
 for the determinant
  of
A along the second
 row,
 we get det(A) =
20 25 30 25 30 20
−20 × det + 35 × det − 25 × det
10 15 20 15 20 10

15
Thus option C is correct.
For option D, we expand along the second column of A.
     
20 25 30 25 30 20
det(A) = 20 × det − 35 × det + 25 × det
10 15 20 15 20 10
= 20(20 × 15 − 10 × 25) − 35(30 × 15 − 20 × 25) + 25(30 × 10 − 20 × 20)
= 20(300 − 250) − 35(450 − 500) + 25(300 − 400)
= 20(50) − 35(−50) + 25(−100)
= 1000 + 1750 − 2500 = 250 ̸= det(A)

Hence, option D is not correct

16

You might also like