Description
1) Let x =
1
b
3
and w =
c
4
d
.
a) Write out and evaluate the inner product x
T w.
b) Now write out and evaluate the inner product wTx.
2) Consider the second-order polynomial y = 2(x − 1)2
.
a) Write y as the inner product of a vector x that depends on the value x and a
vector w containing the polynomial coefficients. That is, write y = x
T w. Define
x and w.
b) Suppose you have five (arbitrary) values yi = 2(xi − 1)2
, i = 1, 2, . . . , 5. Write
the vector y =
y1
y2
.
.
.
y5
= Xw and define the matrix X in terms of the xi
.
3) Food involves fats, proteins and carbohydrates. There are 9 calories for every gram of
fat, 4 calories for every gram of protein, and 4 calories for every gram of carbohydrates.
a) Define a vector x =
x1
x2
x3
where x1 is the number of grams of fat, x2 is the
number of grams of protein, and x3 is the number of grams of carbohydrate in a
serving. Find the vector w so that the number of calories in a serving may be
expressed as x
T w.
b) Write the calories per serving of four breakfast cereals in a vector y =
y1
y2
y3
y4
as a product of a matrix X and vector w (that is, y = Xw). yi
is the number
of calories per serving in cereal i where each cereal has the following data per
serving:
Cereal 1: 1 gram fat, 8 grams protein, 44 grams carbohydrate
Cereal 2: 0.5 grams fat, 2 grams protein, 25 grams carbohydrate
Cereal 3: 1.3 grams fat, 2.7 grams protein, 29.3 grams carbohydrate
Cereal 4: 9 grams fat, 4 grams protein, 16 grams carbohydrate
Identify both X and w.