<jupyter_start><jupyter_text>Question 1  (20 points) Create a 4 x 4 matrix whose diagonal elements are all one (1's). Name it as matrix "C". Show your solutions using Python codes and do not forget to label them on the Text Cell.<jupyter_code>import numpy as np 
#Matrix c
a = np.array([1,1,1,1])
b = np.diag(a)
print(b)<jupyter_output>[[1 0 0 0]
 [0 1 0 0]
 [0 0 1 0]
 [0 0 0 1]]<jupyter_text>Question 2. (20 points) In relation to Question 1, show a solution that doubles all the values of each element. Show your solutions using Python codes and do not forget to label them on the Text Cell.<jupyter_code>a = np.array([1,1,1,1])
b = np.diag(a)
print(b*2)<jupyter_output>[[2 0 0 0]
 [0 2 0 0]
 [0 0 2 0]
 [0 0 0 2]]<jupyter_text>Question 3. (10 points) Find the cross-product of matrices, A = [2,7,4] andB = [3,9,8]. Show your solutions using Python codes and do not forget to label them on the Text Cell.<jupyter_code>a = np.array ([2,7,4])
b = np.array ([3,9,8])
output = np.cross(a,b)
print(output)<jupyter_output>[20 -4 -3]
StarcoderdataJupyterStructuredCleanDedup