Question: Write a code using python for the following task Task 2) Matrix product and determinants. a) write a function that given two (n n) matrices

Write a code using python for the following task  Write a code using python for the following task Task 2)

Task 2) Matrix product and determinants. a) write a function that given two (n n) matrices as input, returns their matrix product b) Test your function by computing the matrix product, AB, between the matrices, 1 20-1 A-2 1 34-2 2.4 15 -2 9 4 2.50 0.5 -1 2.5 0 0 2 0 6 Compute also the product BA and the commutator [A,B] = AB-BA. Do the matrices A and B commute? c) Use numpy.dot to compute the products AB and BA compare the result with the outcomes of b). Mention an example of two non-commuting operations. d) Use numpy.linalg.det to compute the determinant of the matrix, and compare to the exact value you can compute analytically e) Use the matrices A and B given in b) and compute the product of determinants, det(A) * det(B). Compute the detriment of the matrix product, det(AB). How do the results compare

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!