You are on page 1of 10

National University of Sciences & Technology

School of Electrical Engineering and Computer Science

Department of Computing

MATH-121: Linear Algebra &Ordinary Differential Equations (3+0): BEE-8ABC Fall 2016

Assignment 1
Maximum Marks: 80 Instructor: Dr. Naila Amir
Announcement Date: 14th October 2016 Due Date: 21st October 2016

1. Understanding the question is part of the assignment and copying is not allowed.
2. It is a group assignment.

Tasks: Attempt all questions.

Q - 1: [10 marks]
A nut distributor wants to know the nutritional content of various mixtures of almonds,
cashews, and pecans. Her supplier has provided the following nutrition information:

Her first mixture, a protein blend, consists of 6 cups of almonds, 3 cups of cashews, and 1 cup
of pecans. Her second mixture, a low fat mix, consists of 3 cups of almonds, 6 cups of
cashews, and 1 cup of pecans. Her third mixture, a low carb mix consists of 3 cups of
almonds, 1 cup of cashews, and 6 cups of pecans. Determine the amount of protein, carbs,
and fats in a 1 cup serving of each of the mixtures.

Solution: It makes sense to put the first group of data into a matrix with Almonds, Cashews,
and Pecans as columns, and then put the second group of data into a matrix with information
about Almonds, Cashews, and Pecans as rows. This way the columns of the first matrix lines
up with the rows of the second matrix, and we can perform matrix multiplication. This way we
get rid of the number of cups of Almonds, Cashews, and Pecans, which we dont need. So
here is the information we have in table/matrix form:
Then we can multiply the matrices since we want to end up with the amount of Protein, Carbs,
and Fat in each of the mixtures. The product of the matrices consists of rows of Protein,
Carbs, and Fat, and columns of the Protein, Low Fat, and Low Carb mixtures:

But we have to be careful, since these amounts are for 10 cups. Also, notice how the cups
unit canceled out when we did the matrix multiplication (grams/cup time cups = grams).
Therefore, to get the answers, we have to divide each answer by 10 to get grams per cup. So
the numbers in bold are our answers:

Q - 2: [10 marks]
An outbreak of Chicken Pox hit the local public schools. Approximately 15% of the male and
female juniors and 25% of the male and female seniors are currently healthy, 35% of the male
and female juniors and 30% of the male and female seniors are currently sick, and 50% of the
male and female juniors and 45% of the male and female seniors are carriers of Chicken
Pox. There are 100 male juniors, 80 male seniors, 120 female juniors, and 100 female seniors.
Using two matrices and one matrix equation, find out how many males and how many females
(dont need to divide by class) are healthy, sick, and carriers.

Solution: The best way to approach these types of problems is to set up a few manual
calculations and see what were doing.
For example, to find out how many healthy males we would have, wed set up the following
equation and do the calculation: .15(100) + .25(80) = 35. Likewise, to find out how
many females are carriers, we can calculate: .50(120) + .45(100) = 105.
We can tell that this looks like matrix multiplication. And since we want to end up with a
matrix that has males and females by healthy, sick and carriers, we know it will be either a 2 x
3 or a 3 x 2. But since we know that we have both juniors and seniors with males and females,
the first matrix will probably be a 2 x 2. That means, in order to do matrix multiplication, the
second matrix that holds the %s of students will have to be a 2 x 3, since there are 3 types of
students, healthy (H), sick (S), and carriers (C). Notice how the percentages in the rows in the
second matrix add up to 100%. Also notice that if we add up the number of students in the
first matrix and the last matrix, we come up with 400.
For the present case we have following:

So there will be 35 healthy males, 59 sick males, and 86 carrier males, 43 healthy females, 72
sick females, and 95 carrier females.

Q - 3: [20 marks]
Solve the following linear system using Gauss-Jordan elimination:

2x1 + 5x2 - 8x3 + 2x4 + 2x5 = 0

6x1 + 2x2 -10x3 + 6x4 + 8x5 = 6
3x1 + 6x2 + 2x3 + 3x4 + 5x5 = 6
3x1 + 1x2 - 5x3 + 3x4 + 4x5 = 3
6x1 + 7x2 - 3x3 + 6x4 + 9x5 = 9

What will be rank for the above matrix?

Q - 4: [10 marks]
For which values of will the following system have no solutions? Exactly one solution?
Infinitely many solutions?
+ =

+ =

+ + ( ) = +
Q - 5: [20 marks]
Determine whether the following are vector spaces or not? Justify your answers.

() = {(, ) : = + }

() = {(, ) : , }

() = {(, , ) : = = }
Q - 6: [10 marks]
Consider the vector space -- the space of polynomials with degree less than or equal to 4.
Lets consider the following four vectors in this vector space:

= , = + ,

= + , = + + .

Check whether the above set of vectors form basis for or not?

Solution: The set of vectors from a vector space V is called basis if it is:
Linearly independent and
It is a spanning set for V.
. Spanning set:

To check that these vectors form a spanning set for , we should take an arbitrary
vector from and try to express it as a linear combination of the vectors from the
basis. Let's take an arbitrary polynomial = + + + + , such that

w c1u1 c2u2 c3u3 c4u4 (1)

ax 4 bx 3 cx 2 dx e
c1 ( x 2) c2 x 2 4 x 4 c3 x 3 6 x 2 12 x 8 c4 x 4 8 x 3 24 x 2 32 x 16
c4 x 4 8c4 c3 x 3 24c4 6c3 c2 x 2 32c4 12c3 4c2 c1 x 16c4 8c3 4c2 2c1
Comparing the coefficients of the powers of x on both sides we get the following
system of equations:
a c4
b 8c4 c3 8a c3
c 24c4 6c3 c2
d 32c4 12c3 4c2 c1
e 112a 8b 4c 2d
By solving the above system, we get the following solution:
c4 a
c3 b 8a
c2 c 24a 6b
c1 d 32a 12b 4c
Note that the values of the unknown quantities c1 , c2 , c3 and c4 do not satisfy
equation (1) i.e., the vector cannot be expressed as a linear combination of the given
vectors. Thus, we deduce, that this system of vectors is not a spanning set.

Since one of the conditions for basis is not satisfied, therefore, we conclude that the
given set of vectors do not form basis for .