Mathematics For Data Science 2 - Week 2 GA

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

Week-2

Mathematics for Data Science - 2


Solutions of System of Linear Equations
Graded Assignment

1. In a particular year, the profit (in lakhs of |) of Star Fish company is given by the
polynomial P (x) = ax2 + bx + c where x denotes the number of months since the
beginning of the year (i.e., x = 1 denotes January, x = 2 denotes February, and so on).
In January and February the company made a loss of |45(in lakhs), and |19(in lakhs)
respectively, and in March the company made a profit of |3(in lakhs). Let the loss be
represented by negative of profit.
Choose the correct set of options based on the given information.
⃝ Option 1: The maximum profit will be in the month of May.
⃝ Option 2: The maximum profit will be in the month of August.
⃝ Option 3: The maximum monthly profit amount is |53 lakh.
⃝ Option 4: The maximum monthly profit amount is |35 lakh.

Solution:

In the month of January (x = 1), the company made a loss of |45 lakh. That is,
P (1) = a(1)2 + b(1) + c = −45 =⇒ a + b + c = −45 (1)

Similarly, for the month of February (x = 2) and March (x = 3), we have:


P (2) = 4a + 2b + c = −19
(2)
P (3) = 9a + 3b + c = 3

Thus, we have the following set of equations:


a + b + c = −45
4a + 2b + c = −19 (3)
9a + 3b + c = 3

The augmented matrix A using the above equations can be written as:
 
1 1 1 −45
A =  4 2 1 −19 
9 3 1 3
By reducing A to its reduced row echelon form R, we get:
 
1 0 0 −2
R= 0 1 0 32 
0 0 1 −75

Thus, we have: a = −2, b = 32, and c = −75. By substituting these values in the given
polynomial, we get:
P (x) = −2x2 + 32x − 75 (4)

Approach 1: The minima/maxima of a quadratic equation is given by:

−b
maxima =
2a
−32
= =8
−4

Approach 2: Take the derivative of the polynomial, and set it to zero:

P ′ (x) = −4x + 32 = 0
=⇒ x = 8

Since P ′′ (8) = −4 < 0, x = 8 is a point of local maximum. Also, since x = 8 is the only
critical point, it is the global maximum.

Thus, at x = 8 (the month of August), the value of the polynomial is the highest.
Evaluating P at x = 8, we get: P (8) = 53. Hence, Option 2 and Option 3 are correct.

2
2. If A be a 3 × 4 matrix and b be a 3 × 1 matrix, then choose the set of correct options.
⃝ Option 1: If (A|b) be the augmented matrix and (A′ |b′ ) be the matrix obtained
from (A|b) after a finite number of elementary row operations then the system
Ax = b and the system A′ x = b′ have the same set of solutions.
⃝ Option 2: If (A′ |b′ ) is the reduced row echelon form of (A|b) then the system
A′ x = b′ has at least one solution.
⃝ Option 3: If (A′ |b′ ) is the reduced row echelon form of (A|b), then A′ is also
in reduced row echelon form.
⃝ Option 4: If (A′ |b′ ) is the reduced row echelon form of (A|b) and there is no
row such that the only non zero entry lies in the last column of (A′ |b′ ) then
the system Ax = b has at least one solution.
Solution:

Option 1:
From Gaussian Elimination, we know that any number of elementary row operations on
an augmented matrix A does not affect the solution to Ax = b. Hence, this option is
correct.

Option 2:
To prove this option incorrect, take an example as follows:
 
1 2 3 0 1
[A|b] =  2 4 6 0 1 
3 6 9 0 1

Then its reduced row echelon form is:


 
1 2 3 0 0
[A′ |b′ ] =  0 0 0 0 1 
0 0 0 0 0

The system A′ x = b′ does not have a solution. Hence, this option is incorrect.

Option 3: Observe that if we reduce the augmented matrix to reduced row echelon
form, then its coefficient matrix also gets reduced to reduced row echelon form. (Check,
as an example, the matrix given for option 2.) Hence, this option too is correct.

Option 4: If [A′ |b′ ] is the reduced row echelon form and there is no row such that the
only non-zero entry lies in the last column of [A′ |b′ ] (that is, in b′ ), then the last row of
the reduced matrix A′ should contain a non-zero entry or all the entries of the last row
of [A′ |b′ ] should be zero. In either case, we have a solution to the system. Hence, option
4 is also correct.

3
3. Choose the set of correct options
⃝ Option 1: If the sum of all the elements of each row of a matrix A is 0, then
A is not invertible.
⃝ Option 2: If E is a matrix of order 3 × 3 obtained from the identity matrix
by a finite number of elementary row operations then E is invertible.
⃝ Option 3: Any system of linear equations has at least one solution.
⃝ Option 4: If A is a matrix of order 3 × 3 and det(A) = 3 then det(Adj(A)) = 3.
⃝ Option 5: If A is a matrix of order 3×3 and det(A) = 3 then det(Adj(A)) = 9.

Solution:

Option 1: Consider the matrix :


 
a11 a12 a13 a11 + a12 + a13 = 0
A = a21 a22 a23  , such that: a21 + a22 + a23 = 0
a31 a32 a33 a31 + a32 + a33 = 0

   
a11 a12 a13 a11 + a12 + a13 a12 a13
det(A) = det a21 a22 a23  = det a21 + a22 + a23 a22 a23 
a31 a32 a33 a31 + a32 + a33 a32 a33

 
0 a12 a13
=⇒ det(A) = det 0 a22 a23  = 0
0 a32 a33

As the determinant of the matrix is 0, the matrix A is not invertible. Hence this option
is correct.

Option 2:
det(I) = 1. Any matrix obtained by elementary row operations on I will have a
determinant as c det(I), where c is some non-zero constant.
Thus, det(E) = c det(I) = c, where c ̸= 0 Hence, the matrix E is invertible- this option
is correct.

Option 3: Consider the following example:

2x + 3y = 0
2x + 3y = 1

4
The above system does not have a solution, hence this option is incorrect.

Option 4 and 5:

We know:

Adj(A)
A−1 =
det(A)

det(A)A−1 = Adj(A) ...multiplying both sides by det(A)

det(det(A)A−1 ) = det(Adj(A)) ...take determinant on both sides

det(A)3 det(A−1 ) = det(Adj(A)) ...det(cA) = c3 det(A), when A is a 3 × 3 matrix

det(A)2 det(A)det(A−1 ) = det(Adj(A))

det(A)2 = det(Adj(A)) ...det(A)det(A−1 ) = 1

32 = 9

Thus, option 5 is correct and option 4 is incorrect.

5
4. Ramya bought 1 comic book, 2 horror books, and 1 novel from a bookshop which cost
her |1000. Romy bought 2 comic books, 5 horror books, and 1 novel which cost him
|2000. Farjana bought 4 comic books, 5 horror books, and c novels from a shop which
cost her |d. If x1 , x2 , and x3 represent the price of each comic book, horror book, and
novel, respectively, then choose the set of correct options.

⃝ Option 1: The matrix representation to find x1 , x2 and x3 is


    
1 2 1 x1 1000
2 5 1 x2  = 2000
4 5 c x3 d

⃝ Option 2: The matrix representation to find x1 , x2 and x3 is


 
  1 2 4  
x1 x2 x3 2 5 5 = 1000 2000 d
1 1 c

⃝ Option 3: The matrix representation to find x1 , x2 and x3 is


 
1 2 4    
2 5 5 x1 x2 x3 = 1000 2000 d
1 1 c

⃝ Option 4: If Farjana tries to find x1 , x2 , and x3 using appropriate matrix


representation by taking c = 2 and d = 4000, then the price of each comic
book that she thus arrives at, will not be unique.
⃝ Option 5: If c = 7 and d = 4000, then the price of each comic book cannot
be determined from this data.
⃝ Option 6: If c = 7 and d = 3000, then the shopkeeper has made a mistake.
⃝ Option 7: If c = 2 and d = 3000, then the price of each comic book can be
determined from the data.

Solution: Let x1 be the price of one comic book, x2 be the price of one horror book,

and x3 be the price of one novel. Then, Ramya’s purchase can be given by:

x1 + 2x2 + 1x3 = 1000

Similarly, Romy and Farjana’s purchases can be given by:

2x1 + 5x2 + x3 = 2000


4x1 + 5x2 + cx3 = d

6
Option 1:
The matrix representation Ax = b for the above system is:
    
1 2 1 x1 1000
2 5 1 x2  = 2000
4 5 c x3 d

Thus, Option 1 is correct.

Option 2 and Option 3:

If Ax = b, then:
=⇒ (Ax)T = bT ...taking transpose on both sides
T T T
=⇒ x A = b ...as (AB)T = B T AT

By taking the transpose on both sides, we can write the equation from option 1 as
follows:  
  1 2 4  
x1 x2 x3 2 5 5 = 1000 2000 d
1 1 c
Thus, Option 2 is correct and Option 3 is incorrect.

Options 4, 5, and 6:
The augmented matrix for the system can be given as follows:
 
1 2 1 1000
 2 5 1 2000 
4 5 c d

By reducing this matrix to its row echelon form, we get:


 
1 0 3 1000
 0 1 −1 0 
0 0 c − 7 d − 4000

7
Option 4: If c = 2 and d = 4000, we get:
 
1 0 3 1000
 0 1 −1 0  =⇒ The system has unique solution.
0 0 −5 0

Thus, option 4 is incorrect.

Option 5: If c = 7 and d = 4000, we get:


 
1 0 3 1000
 0 1 −1 0  =⇒ The system has infinitely many solutions.
0 0 0 0

which means, we cannot determine the price of each comic and thus option 5 is correct.

Option 6: If c = 7 and d = 3000, we get:


 
1 0 3 1000
 0 1 −1 0  =⇒ The system has no solutions.
0 0 0 −1000

which means, that the shopkeeper must have made a mistake. Hence, option 6 is also
correct.

Option 7: If c = 2 and d = 3000, we get:


 
1 0 3 1000
 0 1 −1 0  =⇒ The system has a unique solution.
0 0 −5 −1000

which means, that the price of each comic book can be determined from the given data.
Thus, option 7 is also correct.

8
5. Consider the system of equations given below:

x2021 y 2021 z 2021


+ − =π
2021 2021 2021

x2021 y 2021 z 2021


+ − =e
2021 2021 2021

x2021 y 2021 z 2021


− + = 1729.
2021 2021 2021
The number of solutions of the above system of equations is [Ans: 0]

Solution:
Consider the first two equations of this system. The left hand side of both the equations
is the same, which gives us π = e, which is not true. Hence, the system has no solutions.

9
6. Let the reduced row echelon form of a matrix A be
0 0 − 12
 
1
0 1 0 − 16  .
1
0 0 1 6

      
1 3 a −1
The first, second, third and fourth columns of A are  0 , 2 , b and
      0 ,
−1 1 c 0
respectively. The value of a + b + c is [Ans: 0]

Solution:

Approach 1:
From the question, we have:
 
1 3 a −1
A= 0 2 b 0
−1 1 c 0

To reduce this matrix to reduced row echelon form, we do the following elementary row
operations in this sequence:
R2 R3
R3 + R1 → → R3 − 4R2 → R1 − 3R2 → → R2 − R3 → R1 + 3R3
2 −6
The resultant matrix R is as follows:
 
a−b−c −1
1 0
2 2 


 
A = 0 1
 a + b + c −1 


 6 6 

 −a + 2b − c 1 
0 0
6 6
Compare this matrix to the matrix as given in the question, we get:

a−b−c
= 0, a−b−c=0
2
a+b+c =⇒
= 0, a+b+c=0
6
−a + 2b − c
=1 −a + 2b − c = 6
6

10
After solving the above system, we get a unique solution as follows: a = 0 , b = 2,
c = −2.
Thus, we get answer as: a + b + c = 0 + 2 − 2 = 0.

Approach 2:
   
 1 3 a −1 1 0 0 − 12 
   
   

A =  0 2 b 0  and its reduced row echelon form is A = 0 1 0 − 1  .
   
   6
   
   
1
−1 1 c 0 0 0 1 6

h iT

We know Ax = 0 and A x = 0 have the same set of solutions. Thus, let x = x1 x2 x3 x4
be a solution for both the systems. That is, Ax = 0 and A′ x = 0.

From A′ x = 0, we get:
1
x1 = x4
    2
x1 0
1 0 0 −1
 
2
   
x2  = 0 1
  
0 1 0 −1 =⇒ x2 = x4 (1)

6  x  0
 3   6
0 0 1 16
x4 0
−1
x3 = x4
6

From Ax = 0, we get:
 
  x1  
1 3 a −1   0 x1 + 3x2 + ax3 − x4 = 0
x 2   
 0 2 b 0 x  = 0 =⇒ 2x2 + bx3 = 0 (2)
 
 3
−1 1 c 0 0 −x1 + x2 + cx3 = 0
x4

From equations (1) and (2), we get:


1 1 a
x 4 + x4 − x4 − x4 = 0
2 2 6
a
=⇒ x4 = 0
6
=⇒ a = 0 .. we can choose x4 ̸= 0 (3)

11
Similarly, we can find values of b and c, as follows:
1 b
x4 − x4 = 0
3 6
x4 bx4
=⇒ =
3 6
=⇒ b = 2 (4)
−x4 x4 cx4
+ − =0
2 6 6
=⇒ c = −2 (5)

Thus, from (3), (4), and (5) we have a + b + c = 0 + 2 − 2 = 0. Hence, the answer is 0.

12
7. Three mobile shops- shop A, shop B and shop C, sell three brands of mobile phones:
brand R, brand S and brand T. In a week, shop A sold 1 mobile phone of brand R, 3k
mobile phones of brand S, and 3k + 4 mobile phones of brand T. Shop B sold 1 mobile
phone of brand R, k + 4 mobile phones of brand S, and 4k + 2 mobile phones of brand
T. Shop C sold 1 mobile phone of brand R, 2k + 2 mobile phones of brand S, and 3k + 4
mobile phones of brand T (assume, k ̸= 2). Assume that the price of a given model of a
given brand is the same in all the shops. Shop A, shop B, and shop C earned |61, |65
and |66 (in thousands), respectively by selling these three brands of mobile phones. If
the price of each mobile phone of brand S is |5 (in thousands), then what is the price of
each mobile phone of brand T (in thousands)? [Note: Suppose the price comes out to
be 20,000, then the answer should be 20]? [Answer: 6]

Solution:

Let xr , xs and xt be the price of mobile brands R, S, and T respectively. Thus, we can
write the number of mobiles sold by Shop A in a week as:

xr + 3kxs + (3k + 4)xt = 61 (1)

Similarly, the number of mobiles sold by Shop B and Shop C can be written respectively
as follows:

xr + (k + 4)xs + (4k + 2)xt = 65 (2)


xr + (2k + 2)xs + (3k + 4)xt = 66

From (1) and (2), The augmented matrix of the above system of equations can written
as:  
1 3k 3k + 4 61
 1 k + 4 4k + 2 65
 

1 2k + 2 3k + 4 66
The row echelon form of the above matrix comes out to be as follows:
 
 1 3k 3k + 4 61 
5 
 
 0 1 0 (3)

2−k 


 6 
0 0 1
2−k

13
Since we are given that k ̸= 2, we can write:
5
xs = (4)
2−k
6
xt = (5)
2−k
We are also given that xs = 5 (in thousands). Thus,
5
xs = =5
2−k
Solving the above gives us k = 1. Substituting this value of k in equation 5, we get
xt = 6. Hence, the answer is 6.

14
8. The number of solutions of the system of equations

2x + 3y + 5z = 1
x + 2y + 3z = 1
x + y + 2z = 7

is [Ans: 0]

Solution:

The matrix representation of the above system can be given as:


    
2 3 5 x 1
1 2 3 y  = 1
    

1 1 2 z 7
The augmented matrix can be given by:
 
2 3 5 1
 1 2 3 1 
 

1 1 2 7

Reducing the above matrix gives as:


 
1 0 1 0
 0 1 1 0 
 

0 0 0 1

It is clear from the last row of the matrix, that the system has no solutions. Hence, the
answer is 0.

15
9. A is the reduced row echelon form of the matrix
 
1 3 0 0
 
4 1 5 11
2 2 7 8  .
 
 
3 9 0 0

Then determinant of A is [Ans: 0]


Solution:

Approach 1:
The reduced row echelon form of the matrix can be given as follows:
 
37
1 0 0
19 


0 1 0 −37 
 
57 
 
R=
0 0 1 44 
 
57 
 

 
0 0 0 0

All the entries of the last row are zero. Hence, the determinant will be 0.

Approach 2:
If we perform the following row operation: R4 = 3R1 − R4 , we get a zero row. Thus, if
A is in the reduced row echelon form of the given matrix, it will have at least one row
of zeros. Hence, the determinant of the matrix will be 0.

16
 
x
10. If y  is a solution of the system of equations

z

7x + 2y + z = 7
3y − z = 2
−3x + 4y − 2z = 1,

then the value of x + y + z is


Solution:

The matrix representation of the above system of linear equations can be given by:
    
7 2 1 x 7
 0 3 −1 y  = 2
−3 4 −2 z 1

Then, the augmented matrix can be given by:


 
7 2 1 7
 0 3 −1 2 
−3 4 −2 1
Row reduced form of the above matrix is:

 
1 0 0 −3 x = −3
 0 1 0 6  =⇒ y=6
0 0 1 16 z = 16

Thus, x + y + z = 19.

17
11. Let A = [a1 , a2 , a3 , a4 ] and M denote the reduced row echelon form of AT A. The number
of non-zero rows of M is [Ans: 1]
Solution:
 
2
7
A = 2 7 3 9 =⇒ AT = 
 

3
9

   
2 4 14 6 18
 7 14 49 21 63
AT A = 
 
3 2 7 3 9 =  6
  
21 9 27
9 18 63 27 81

The reduced row echelon form of AT A is:

 14 6 18 
1
 4 4 4
M = 0 0 0 0


0 0 0 0
0 0 0 0

Hence, the number of non-zero rows of M is 1.

18
12. If the graph of the polynomial p(x) = a+bx+cx2 passes through the points (2, 4), (3, 6), (4, 10),
then the value of a − b + c is [Ans: 10]

Solution:

Given that p(x) = a+bx+cx2 passes through the points (2, 4), (3, 6), and (4, 10), we have:

p(2) = 4 =⇒ a + 2b + 4c = 4
p(3) = 6 =⇒ a + 3b + 9c = 6
p(4) = 10 =⇒ a + 4b + 16c = 10

Augmented matrix of the above system is as follows:


 
1 2 4 4
 1 3 9 6 
1 4 16 10

Row reduced echelon form of the above matrix is:


 
1 0 0 6 a=6
 0 1 0 −3  =⇒ b = −3
0 0 1 1 c=1

Hence, a − b + c = 6 − (−3) + 1 = 10.

19
Comprehension Type Question:

The network in Figure: M2W2GA1 shows a proposed plan for flow of traffic around a park.
All the streets are assumed to be one-way and the arrows denote the direction of flow of traffic.
The plan calls for a computerized traffic light at the South Street. Let 2x1 , 3x2 , 2x3 , and x4
denote the average number (per hour) of vehicles expected to pass through the connecting
streets (e.g., 2x1 denote the average number (per hour) of vehicles expected to pass through
the street connecting the North Street and West Street as shown in Figure: M2W2GA1).
400, 1000, 900, and c denote the average number (per hour) of vehicles expected to pass
through West, North, East, and South Streets respectively.

1000
North Street

2x1 3x2

400 Park 900


West Street East Street

x4 2x3

South Street
c

Figure: M2W2GA1

13. Which of the following options are correct?


⃝ Option 1: The system of equations corresponding to the flow of expected
traffic according to the given data above, will be

2x1 + 3x2 = 1000


3x2 + 2x3 = 900
2x3 + x4 =c
2x1 + x4 = 400

⃝ Option 2: The system of equations corresponding to the flow of expected traffic

20
according to the given data above, will be

2x1 + 3x2 = 900


3x2 + 2x3 = 1000
2x3 + x4 = 400
2x1 + x4 =c

⃝ Option 3: The matrix representation of the system of equations corresponding


to the flow of expected traffic according to the given data above is
    
2 3 0 0 x1 900
0 3 2 0 x2  1000
0 0 2 1 x3  =  400 
    

2 0 0 1 x4 c

⃝ Option 4: The matrix representation of the system of equations corresponding


to the flow of expected traffic according to the given data above is
    
2 3 0 0 x1 1000
0 3 2 0 x2   900 
0 0 2 1 x3  =  c 
    

2 0 0 1 x4 400

Solution:

The total average number of vehicles expected to pass through the West street is 400.
We are also given that:

2x1 = number of cars passing through the street connecting the West and North Streets
x4 = number of cars passing through the street connecting the West and South Streets

Thus, we have:

Total Vehicles through West st = 2x1 + x4 = 400

Similarly, we can arrive at the equations for other streets. We get:

2x3 + x4 = c
3x2 + 2x3 = 900
2x1 + 3x2 = 1000

21
The matrix representation of the above system is:
    
2 3 0 0 x1 1000
0 3 2 0 x2   900 
0 0 2 1 x3  =  c 
    

2 0 0 1 x4 400

Hence, the correct options are Option 1 and Option 4.

14. How many vehicles are expected to pass through the South Street per hour on an average?
[Answer: 300]
Solution:
The total average number of expected vehicles passing through the South Street is c.
Thus, we need to solve for the value of c. The system of equation is as follows:

2x1 + 3x2 + 0x3 + 0x4 = 1000 (1)


0x1 + 3x2 + 2x3 + 0x4 = 900 (2)
0x1 + 0x2 + 2x3 + x4 =c (3)
2x1 + 0x2 + 0x3 + x4 = 400 (4)

Subtracting equation (4) from equation (1), we get:

0x1 + 3x2 + 0x3 − x4 = 600 (5)

Subtracting equation (5) from equation (2), we get:

2x3 + x4 = 300 (6)

Thus, from (3) and (6),


2x3 + x4 = c = 300
Hence, c = 300. Thus, the number of vehicles expected to pass through South Street on
average is 300.

22
15. Match the names of the street in Column A with the maximum and minimum number
of vehicles expected to pass through the street on an average (per hour) in Column B
and Column C, respectively; in Table M2W2GA1.

Name of the The maximum number The minimum number


connecting street of vehicles of vehicles
expected to expected to
pass through pass through
the street the street
(per hour) (per hour)
Column A Column B Column C
a) Connecting i) 300 1) 0
West and North street
b) Connecting ii) 300 2) 100
East and North street
c) Connecting iii) 400 3) 600
East and South street
d) Connecting iv) 900 4) 0
West and South street

Table : M2W2GA1

⃝ Option 1: d → i → 2
⃝ Option 2: b → iii → 3.
⃝ Option 3: b → iv → 3.
⃝ Option 4: d → ii → 1.
⃝ Option 5: a → iii → 2.
⃝ Option 6 : a → iii → 4.
⃝ Option 7: c → i → 4.

Solution:
The system of equations is:

2x1 + 3x2 + 0x3 + 0x4 = 1000 (1)


0x1 + 3x2 + 2x3 + 0x4 = 900 (2)
0x1 + 0x2 + 2x3 + x4 = 300 (3)
2x1 + 0x2 + 0x3 + x4 = 400 (4)

From (3), we have: 2x3 = 300 − x4 , where 2x3 represents the number of vehicles passing
through the street connecting the East and the South Streets.

23
Observe that the average number of vehicles expected to pass through a street cannot
be negative. That is, 2x3 cannot be negative. Thus, x4 cannot be greater than 300.

x4 ≤ 300

which means that the maximum number of vehicles passing through the street that con-
nects West and South Streets(x4 ) is 300.

Also, observe that the number of vehicles passing through the street that connects West
and South Streets(x4 ) can be 0. That is, the minimum number of vehicles can be 0.
Thus,
0 ≤ x4 ≤ 300 (5)
Hence, option 4 is correct.
Similarly, with equation (2), we have:

2x3 = 300 − x4
3x2 = 900 − 2x3
= 900 − 300 + x4
= 600 + x4

Since x4 can be at minimum 0, and at maximum 300,

600 ≤ 3x2 ≤ 900 (6)

Hence, option 3 is correct.


Similarly, the average number of vehicles expected to pass through the West street is 400.

2x1 + x4 = 400 (...from Question 13)

Since x4 can be at minimum 0, and at maximum 300,

100 ≤ 2x1 ≤ 400 (7)

Hence, option 5 is correct.


Similarly, from equation (3), we have:

0 ≤ 2x3 ≤ 300

Hence, option 7 is correct.

24

You might also like