~~$40.00~~ $24.00

Category: DSCC 465

Description

5/5 - (7 votes)

1) Write a program using Python that does the following:

– Takes two matrices of any size as the input

– Returns their dot product as the output

Note: You cannot use pre-packaged algorithms for matrix operations for this question.

You can use numpy or pandas to store your data (not for calculations).

Please do the following:

a. Please test the following matrix multiplications using your hand-written code

and report the result:

b. Compare the result to the packaged dot product numpy.dot. Are they same?

c. Please add your code to your .pdf file and also save it as an .ipynb file

Spring 2022: Int. to Statistical Machine Learning University of Rochester

2

2) Assume that we have two (2) d-dimensional real vectors x and y. And denote by xi (or yi)

the value in the i-th coordinate of x (or y). Prove or disprove the following statements by

checking non-negativity, definiteness, homogeneity, and triangle inequality.

a. The following distance function is a metric. (5 points)

b. The following distance function is a metric. (5 points)

c. The following distance function is a metric. (10 points)

3) Calculating by hand, find the characteristic polynomial, eigenvalues and the eigenvectors

of the following matrix:

4) Provide a proof for the following: Let A, B, and C be any n x n matrices:

a. Show that trace(ABC) = trace(CAB) = trace(BCA) (10 points)

b. trace(ABC) = trace(BAC). Provide a proof or a counterexample (10 points)

5) Let A and B be n x n matrices with AB = 0.

Each question below is 5 points. Provide a proof or counterexample for each of the

following:

a) BA = 0

b) Either A = 0 or B = 0 (or both)

c) If det(A) = -3, then B = 0

d) There is a vector v ≠ 0 such that BAv = 0

WhatsApp us